OpenAIToolCall
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class OpenAIToolCall
io/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:40–145OpenAI 工具调用,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.extensions.model.openai.dto 包。核心成员包括 getId、setId、getType、setType、getFunction、setFunction。
OpenAI tool call DTO.
This class represents a tool call made by the assistant.
Example:
`{
"id": "call_abc123",
"type": "function",
"function": {
"name": "get_weather",
"arguments": "{\"location\": \"Beijing\"}"
}
}
`
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Builder | 类class | 构建器,用于构建并配置目标实例。 A class in io.agentscope.extensions.model.openai.dto that talks to model services and returns generated or embedded output. |
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public OpenAIToolCall() | 初始化 `OpenAIToolCall` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getId() | 获取标识。 Returns the id. |
public void setId(String id) | 设置标识。 Sets the id. |
public String getType() | 获取类型。 Returns the type. |
public void setType(String type) | 设置类型。 Sets the type. |
public OpenAIFunction getFunction() | 获取函数。 Returns the function. |
public void setFunction(OpenAIFunction function) | 设置函数。 Sets the function. |
public Integer getIndex() | 获取索引。 Returns the index. |
public void setIndex(Integer index) | 设置索引。 Sets the index. |
public String getThoughtSignature() | 获取 `getThoughtSignature`。 Returns the thought signature. |
public void setThoughtSignature(String thoughtSignature) | 设置 `setThoughtSignature`。 Sets the thought signature. |
public static Builder builder()static | 返回构建器实例。 Returns the builder. |
构造器详情Constructor Detail
OpenAIToolCall
public OpenAIToolCall()
初始化 OpenAIToolCall 实例。
Creates a new instance.
io/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:65方法详情Method Detail
getId
public String getId()
获取标识。
Returns the id.
Stringio/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:67–69setId
public void setId(String id)
设置标识。
Sets the id.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
id | String | 标识(类型 `String`)。The id. |
io/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:71–73getType
public String getType()
获取类型。
Returns the type.
Stringio/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:75–77setType
public void setType(String type)
设置类型。
Sets the type.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
type | String | 类型(类型 `String`)。The type. |
io/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:79–81getFunction
public OpenAIFunction getFunction()
获取函数。
Returns the function.
OpenAIFunctionio/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:83–85setFunction
public void setFunction(OpenAIFunction function)
设置函数。
Sets the function.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
function | OpenAIFunction | 函数(类型 `OpenAIFunction`)。The function. |
io/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:87–89getIndex
public Integer getIndex()
获取索引。
Returns the index.
Integerio/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:91–93setIndex
public void setIndex(Integer index)
设置索引。
Sets the index.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
index | Integer | 索引(类型 `Integer`)。The index. |
io/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:95–97getThoughtSignature
public String getThoughtSignature()
获取 getThoughtSignature。
Returns the thought signature.
Stringio/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:99–101setThoughtSignature
public void setThoughtSignature(String thoughtSignature)
设置 setThoughtSignature。
Sets the thought signature.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
thoughtSignature | String | thought Signature(类型 `String`)。The thought signature. |
io/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:103–105builder
public static Builder builder()
返回构建器实例。
Returns the builder.
Builderio/agentscope/extensions/model/openai/dto/OpenAIToolCall.java:107–109嵌套类详情Nested Class Detail
Builder
public static class Builder构建器,用于构建并配置目标实例。位于 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.