Class ToolEmulatorInterceptor.Builder
java.lang.Object
com.alibaba.cloud.ai.graph.agent.interceptor.toolemulator.ToolEmulatorInterceptor.Builder
- Enclosing class:
- ToolEmulatorInterceptor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a tool name to emulate.addTools(Collection<String> toolNames) Add multiple tool names to emulate.build()emulateAllTools(boolean emulateAll) Set whether to emulate all tools or only specified ones.model(org.springframework.ai.chat.model.ChatModel model) Set the chat model used for emulation.promptTemplate(String template) Set a custom prompt template for emulation.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
model
Set the chat model used for emulation. Required. -
addTool
Add a tool name to emulate. If emulateAllTools is true, this is ignored. -
addTools
Add multiple tool names to emulate. -
emulateAllTools
Set whether to emulate all tools or only specified ones. Default is true (emulate all tools). Set to false to only emulate tools added via addTool(). -
promptTemplate
Set a custom prompt template for emulation. The template should accept 3 string format arguments: 1. Tool name 2. Tool description 3. Tool arguments (JSON) -
build
-