类 ToolkitConfig.Builder
java.lang.Object
io.agentscope.core.tool.ToolkitConfig.Builder
- 封闭类:
ToolkitConfig
Builder for ToolkitConfig.
-
方法概要
修饰符和类型方法说明allowToolDeletion(boolean allowToolDeletion) Set whether tool deletion is allowed.build()Build the ToolkitConfig.defaultContext(ToolExecutionContext defaultContext) Set the default tool execution context for all tools.executionConfig(ExecutionConfig executionConfig) Set the execution configuration for timeout and retry behavior.executorService(ExecutorService executorService) Set a custom executor service for tool execution.parallel(boolean parallel) Set whether to execute tools in parallel.
-
方法详细资料
-
parallel
Set whether to execute tools in parallel.- 参数:
parallel- true for parallel execution, false for sequential- 返回:
- this builder
-
executorService
Set a custom executor service for tool execution. If not set, Reactor's Schedulers.boundedElastic() will be used.- 参数:
executorService- Custom executor service- 返回:
- this builder
-
executionConfig
Set the execution configuration for timeout and retry behavior. If not set, tool execution defaults will be applied (5 minutes timeout, no retry).- 参数:
executionConfig- Execution configuration for tools- 返回:
- this builder
-
allowToolDeletion
Set whether tool deletion is allowed. When set to false, calls to removeTool(), removeToolGroups(), and updateToolGroups(groups, false) will be ignored.- 参数:
allowToolDeletion- true to allow deletion (default), false to prevent- 返回:
- this builder
-
defaultContext
Set the default tool execution context for all tools.This context will be used as the base for all tool executions and can be overridden by agent-level or call-level contexts through the merge mechanism.
- 参数:
defaultContext- The default execution context- 返回:
- this builder
-
build
Build the ToolkitConfig.- 返回:
- Configured ToolkitConfig instance
-