Class ReadFileTool
java.lang.Object
com.alibaba.cloud.ai.graph.agent.extension.tools.filesystem.ReadFileTool
- All Implemented Interfaces:
BiFunction<ReadFileTool.ReadFileRequest,org.springframework.ai.chat.model.ToolContext, String>
public class ReadFileTool
extends Object
implements BiFunction<ReadFileTool.ReadFileRequest,org.springframework.ai.chat.model.ToolContext,String>
Tool for reading file contents with pagination support.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRequest structure for reading a file. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(ReadFileTool.ReadFileRequest request, org.springframework.ai.chat.model.ToolContext toolContext) static org.springframework.ai.tool.ToolCallbackcreateReadFileToolCallback(String description) 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
-
DESCRIPTION
- See Also:
-
-
Constructor Details
-
ReadFileTool
public ReadFileTool()
-
-
Method Details
-
apply
public String apply(ReadFileTool.ReadFileRequest request, org.springframework.ai.chat.model.ToolContext toolContext) - Specified by:
applyin interfaceBiFunction<ReadFileTool.ReadFileRequest,org.springframework.ai.chat.model.ToolContext, String>
-
createReadFileToolCallback
public static org.springframework.ai.tool.ToolCallback createReadFileToolCallback(String description)
-