Class SkillsInterceptor.Builder
java.lang.Object
com.alibaba.cloud.ai.graph.agent.interceptor.skills.SkillsInterceptor.Builder
- Enclosing class:
- SkillsInterceptor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()groupedTools(Map<String, List<org.springframework.ai.tool.ToolCallback>> groupedTools) Set grouped tools: map from skill name to the list of tools for that skill.skillRegistry(SkillRegistry skillRegistry) Set a shared SkillRegistry instance.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
skillRegistry
Set a shared SkillRegistry instance. This must be the same instance used by SkillsAgentHook to share skills data.- Parameters:
skillRegistry- the SkillRegistry to use (must not be null)- Returns:
- this builder
-
groupedTools
public SkillsInterceptor.Builder groupedTools(Map<String, List<org.springframework.ai.tool.ToolCallback>> groupedTools) Set grouped tools: map from skill name to the list of tools for that skill. When the interceptor finds "read_skill" tool calls in AssistantMessage with a given skill_name, it adds the corresponding tools to the request'sdynamicToolCallbacks.- Parameters:
groupedTools- map from skill name to list of ToolCallbacks (can be null or empty)- Returns:
- this builder
-
build
-