Builder
public static class Builder
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:111–144构建器,用于构建并配置目标实例。位于 io.agentscope.extensions.model.openai.dto 包。核心成员包括 id、type、function、index、thoughtSignature、build。
A class in io.agentscope.extensions.model.openai.dto that talks to model services and returns generated or embedded output. Declared in io.agentscope.extensions.model.openai.dto.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder id(String id) | 设置标识。 Performs the id operation. |
public Builder type(String type) | 设置类型。 Performs the type operation. |
public Builder function(OpenAIFunction function) | 设置函数。 Performs the function operation. |
public Builder index(Integer index) | 设置索引。 Performs the index operation. |
public Builder thoughtSignature(String thoughtSignature) | 设置该配置项。 Performs the thought signature operation. |
public OpenAIToolCall build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
id
public Builder id(String id)
设置标识。
Performs the id operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
id | String | 标识(类型 `String`)。The id. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:114–117type
public Builder type(String type)
设置类型。
Performs the type operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
type | String | 类型(类型 `String`)。The type. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:119–122function
public Builder function(OpenAIFunction function)
设置函数。
Performs the function operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
function | OpenAIFunction | 函数(类型 `OpenAIFunction`)。The function. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:124–127index
public Builder index(Integer index)
设置索引。
Performs the index operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
index | Integer | 索引(类型 `Integer`)。The index. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:129–132thoughtSignature
public Builder thoughtSignature(String thoughtSignature)
设置该配置项。
Performs the thought signature operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
thoughtSignature | String | thought Signature(类型 `String`)。The thought signature. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:134–137build
public OpenAIToolCall build()
构建并返回最终实例。
Creates and returns an instance.
OpenAIToolCall返回OpenAIToolCall。Returns OpenAI tool call.
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:139–143