Class ListFilesTool
java.lang.Object
com.alibaba.cloud.ai.graph.agent.extension.tools.filesystem.ListFilesTool
- All Implemented Interfaces:
BiFunction<String,org.springframework.ai.chat.model.ToolContext, String>
public class ListFilesTool
extends Object
implements BiFunction<String,org.springframework.ai.chat.model.ToolContext,String>
Tool for listing files in a directory.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.ai.tool.ToolCallbackcreateListFilesToolCallback(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
-
ListFilesTool
public ListFilesTool()
-
-
Method Details
-
apply
public String apply(@ToolParam(description="The directory path to list files from") String path, org.springframework.ai.chat.model.ToolContext toolContext) - Specified by:
applyin interfaceBiFunction<String,org.springframework.ai.chat.model.ToolContext, String>
-
createListFilesToolCallback
public static org.springframework.ai.tool.ToolCallback createListFilesToolCallback(String description)
-