Class ReadSkillTool
java.lang.Object
com.alibaba.cloud.ai.graph.agent.hook.skills.ReadSkillTool
- All Implemented Interfaces:
BiFunction<ReadSkillTool.ReadSkillRequest,org.springframework.ai.chat.model.ToolContext, String>
public class ReadSkillTool
extends Object
implements BiFunction<ReadSkillTool.ReadSkillRequest,org.springframework.ai.chat.model.ToolContext,String>
Tool for reading skill content from SkillRegistry.
This tool allows the agent to read the full content of a skill by providing
the skill name and path. It works with any SkillRegistry implementation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRequest structure for reading a skill. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(ReadSkillTool.ReadSkillRequest request, org.springframework.ai.chat.model.ToolContext toolContext) static org.springframework.ai.tool.ToolCallbackcreateReadSkillToolCallback(SkillRegistry skillRegistry, String description) Create a ToolCallback for the read skill tool.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThen
-
Field Details
-
READ_SKILL
- See Also:
-
DESCRIPTION
- See Also:
-
-
Constructor Details
-
ReadSkillTool
-
-
Method Details
-
createReadSkillToolCallback
public static org.springframework.ai.tool.ToolCallback createReadSkillToolCallback(SkillRegistry skillRegistry, String description) Create a ToolCallback for the read skill tool. -
apply
public String apply(ReadSkillTool.ReadSkillRequest request, org.springframework.ai.chat.model.ToolContext toolContext) - Specified by:
applyin interfaceBiFunction<ReadSkillTool.ReadSkillRequest,org.springframework.ai.chat.model.ToolContext, String>
-