类 ToolResultBlock.Builder
java.lang.Object
io.agentscope.core.message.ToolResultBlock.Builder
- 封闭类:
ToolResultBlock
Builder for constructing ToolResultBlock instances.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明build()Builds a new ToolResultBlock with the configured properties.Sets the tool call ID.Sets the metadata for the tool result.Sets the tool name.output(ContentBlock output) Sets a single content block as output.output(List<ContentBlock> output) Sets a list of content blocks as output.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
id
Sets the tool call ID.- 参数:
id- The tool call ID- 返回:
- This builder for chaining
-
name
Sets the tool name.- 参数:
name- The tool name- 返回:
- This builder for chaining
-
output
Sets a single content block as output.- 参数:
output- Single content block- 返回:
- This builder for chaining
-
output
Sets a list of content blocks as output.- 参数:
output- List of content blocks- 返回:
- This builder for chaining
-
metadata
Sets the metadata for the tool result.- 参数:
metadata- Metadata map- 返回:
- This builder for chaining
-
build
Builds a new ToolResultBlock with the configured properties.- 返回:
- A new ToolResultBlock instance
-