ToolkitConfig
public class ToolkitConfig
io/agentscope/core/tool/ToolkitConfig.java:33–205用于工具包执行行为的配置。位于 io.agentscope.core.tool 包。核心成员包括 isParallel、getExecutorService、hasCustomExecutor、getExecutionConfig、isAllowToolDeletion、getDefaultContext。
Configuration for Toolkit execution behavior.
This class defines how tools are executed: - Parallel vs Sequential execution - Custom ExecutorService (optional) - Execution configuration for timeout and retry
By default, multiple tool calls in one turn run in parallel on Reactor's Schedulers.
The default execution config provides 5-minute timeout with no retry (1 attempt).
Pass parallel(false) to serialize tool execution.
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Builder | 类class | ToolkitConfig的构建器。 Builder for ToolkitConfig. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public boolean isParallel() | 判断是否 `isParallel`。 Whether tools should be executed in parallel. |
public ExecutorService getExecutorService() | 获取执行器服务。 Get the custom executor service if provided. |
public boolean hasCustomExecutor() | 判断是否具有自定义执行器。 Check if a custom executor service was provided. |
public ExecutionConfig getExecutionConfig() | 获取执行配置用于超时和重试。 Get the execution configuration for timeout and retry. |
public boolean isAllowToolDeletion() | 判断是否 `isAllowToolDeletion`。 Check if tool deletion is allowed. |
public ToolExecutionContext getDefaultContext()deprecated | 获取默认工具执行上下文。 Get the default tool execution context. |
public static Builder builder()static | 创建用于ToolkitConfig的构建器。 Create a new builder for ToolkitConfig. |
public static ToolkitConfig defaultConfig()static | 返回默认配置。 Get the default configuration (parallel execution using Reactor). |
方法详情Method Detail
isParallel
public boolean isParallel()
判断是否 isParallel。
Whether tools should be executed in parallel.
booleanio/agentscope/core/tool/ToolkitConfig.java:54–56getExecutorService
public ExecutorService getExecutorService()
获取执行器服务。
Get the custom executor service if provided.
ExecutorServiceio/agentscope/core/tool/ToolkitConfig.java:63–65hasCustomExecutor
public boolean hasCustomExecutor()
判断是否具有自定义执行器。
Check if a custom executor service was provided.
booleanio/agentscope/core/tool/ToolkitConfig.java:72–74getExecutionConfig
public ExecutionConfig getExecutionConfig()
获取执行配置用于超时和重试。
Get the execution configuration for timeout and retry.
ExecutionConfigio/agentscope/core/tool/ToolkitConfig.java:81–83isAllowToolDeletion
public boolean isAllowToolDeletion()
判断是否 isAllowToolDeletion。
Check if tool deletion is allowed.
booleanio/agentscope/core/tool/ToolkitConfig.java:90–92getDefaultContext
public ToolExecutionContext getDefaultContext()
获取默认工具执行上下文。
Get the default tool execution context.
ToolExecutionContextio/agentscope/core/tool/ToolkitConfig.java:100–103builder
public static Builder builder()
创建用于ToolkitConfig的构建器。
Create a new builder for ToolkitConfig.
Builderio/agentscope/core/tool/ToolkitConfig.java:110–112defaultConfig
public static ToolkitConfig defaultConfig()
返回默认配置。
Get the default configuration (parallel execution using Reactor).
ToolkitConfigio/agentscope/core/tool/ToolkitConfig.java:119–121嵌套类详情Nested Class Detail
Builder
public static class BuilderToolkitConfig的构建器。位于 io.agentscope.core.tool 包。核心成员包括 parallel、executorService、executionConfig、allowToolDeletion、defaultContext、build。
Builder for ToolkitConfig.