Class GrepSearchTool
java.lang.Object
com.alibaba.cloud.ai.graph.agent.tools.GrepSearchTool
- All Implemented Interfaces:
BiFunction<GrepSearchTool.Request,org.springframework.ai.chat.model.ToolContext, String>
public class GrepSearchTool
extends Object
implements BiFunction<GrepSearchTool.Request,org.springframework.ai.chat.model.ToolContext,String>
Grep search tool for fast content search.
Searches file contents using regular expressions.
Supports full regex syntax and filters files by pattern with the include parameter.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionGrepSearchTool(String rootPath) GrepSearchTool(String rootPath, boolean useRipgrep, int maxFileSizeMb) -
Method Summary
Modifier and TypeMethodDescriptionapply(GrepSearchTool.Request request, org.springframework.ai.chat.model.ToolContext toolContext) static GrepSearchTool.BuilderMethods 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
-
Constructor Details
-
GrepSearchTool
-
GrepSearchTool
-
-
Method Details
-
apply
public String apply(GrepSearchTool.Request request, org.springframework.ai.chat.model.ToolContext toolContext) - Specified by:
applyin interfaceBiFunction<GrepSearchTool.Request,org.springframework.ai.chat.model.ToolContext, String>
-
builder
-