Class WriteFileTool
java.lang.Object
com.alibaba.cloud.ai.graph.agent.extension.tools.filesystem.WriteFileTool
- All Implemented Interfaces:
BiFunction<WriteFileTool.WriteFileRequest,org.springframework.ai.chat.model.ToolContext, String>
public class WriteFileTool
extends Object
implements BiFunction<WriteFileTool.WriteFileRequest,org.springframework.ai.chat.model.ToolContext,String>
Tool for writing content to a new file.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRequest structure for writing a file. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(WriteFileTool.WriteFileRequest request, org.springframework.ai.chat.model.ToolContext toolContext) static org.springframework.ai.tool.ToolCallbackcreateWriteFileToolCallback(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
-
WriteFileTool
public WriteFileTool()
-
-
Method Details
-
apply
public String apply(WriteFileTool.WriteFileRequest request, org.springframework.ai.chat.model.ToolContext toolContext) - Specified by:
applyin interfaceBiFunction<WriteFileTool.WriteFileRequest,org.springframework.ai.chat.model.ToolContext, String>
-
createWriteFileToolCallback
public static org.springframework.ai.tool.ToolCallback createWriteFileToolCallback(String description)
-