类 ToolUseBlock.Builder

java.lang.Object
io.agentscope.core.message.ToolUseBlock.Builder
封闭类:
ToolUseBlock

public static class ToolUseBlock.Builder extends Object
Builder for constructing ToolUseBlock instances.
  • 构造器详细资料

    • Builder

      public Builder()
  • 方法详细资料

    • id

      public ToolUseBlock.Builder id(String id)
      Sets the unique identifier for the tool call.
      参数:
      id - The tool call ID
      返回:
      This builder for chaining
    • name

      public ToolUseBlock.Builder name(String name)
      Sets the name of the tool to execute.
      参数:
      name - The tool name
      返回:
      This builder for chaining
    • input

      public ToolUseBlock.Builder input(Map<String,Object> input)
      Sets the input parameters for the tool.
      参数:
      input - The tool input parameters map
      返回:
      This builder for chaining
    • content

      public ToolUseBlock.Builder content(String content)
      Sets the raw content for streaming tool calls.
      参数:
      content - The raw content for streaming
      返回:
      This builder for chaining
    • metadata

      public ToolUseBlock.Builder metadata(Map<String,Object> metadata)
      Sets the provider-specific metadata.

      For Gemini, use ToolUseBlock.METADATA_THOUGHT_SIGNATURE as the key to store thought signatures.

      参数:
      metadata - The metadata map
      返回:
      This builder for chaining
    • build

      public ToolUseBlock build()
      Builds a new ToolUseBlock with the configured properties.
      返回:
      A new ToolUseBlock instance