类 ToolkitConfig.Builder

java.lang.Object
io.agentscope.core.tool.ToolkitConfig.Builder
封闭类:
ToolkitConfig

public static class ToolkitConfig.Builder extends Object
Builder for ToolkitConfig.
  • 方法详细资料

    • parallel

      public ToolkitConfig.Builder parallel(boolean parallel)
      Set whether to execute tools in parallel.
      参数:
      parallel - true for parallel execution, false for sequential
      返回:
      this builder
    • executorService

      public ToolkitConfig.Builder executorService(ExecutorService 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

      public ToolkitConfig.Builder executionConfig(ExecutionConfig 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

      public ToolkitConfig.Builder allowToolDeletion(boolean 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

      @Deprecated public ToolkitConfig.Builder defaultContext(ToolExecutionContext defaultContext)
      已过时。
      Use RuntimeContext instead.
      Set the default tool execution context for all tools.
      参数:
      defaultContext - The default execution context
      返回:
      this builder
    • build

      public ToolkitConfig build()
      Build the ToolkitConfig.
      返回:
      Configured ToolkitConfig instance