ToolCallRequestPart
@JsonClassDescription("Tool call request part") @JsonInclude(JsonInclude.Include.NON_NULL) public class ToolCallRequestPart implements MessagePart
源码Source
io/agentscope/core/tracing/telemetry/model/ToolCallRequestPart.java:30–81工具调用请求片段,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.core.tracing.telemetry.model 包,实现 MessagePart。核心成员包括 getType、getId、getName、getArguments、create。
Represents a tool call requested by the model.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getType() | 获取类型。 Returns the type. |
public String getId() | 获取标识。 Returns the id. |
public String getName() | 获取名称。 Returns the name. |
public Object getArguments() | 获取参数。 Returns the arguments. |
public static ToolCallRequestPart create(String name)static | 创建并返回实例。 Creates and returns an instance. |
public static ToolCallRequestPart create(String id, String name, Object arguments)static | 创建并返回实例。 Creates and returns an instance. |
方法详情Method Detail
getType
public String getType()
获取类型。
Returns the type.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/tracing/telemetry/model/ToolCallRequestPart.java:42–47getId
public String getId()
获取标识。
Returns the id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/tracing/telemetry/model/ToolCallRequestPart.java:49–53getName
public String getName()
获取名称。
Returns the name.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/tracing/telemetry/model/ToolCallRequestPart.java:55–59getArguments
public Object getArguments()
获取参数。
Returns the arguments.
Object返回对象。Returns object.
源码Source
io/agentscope/core/tracing/telemetry/model/ToolCallRequestPart.java:61–65create
public static ToolCallRequestPart create(String name)
static
创建并返回实例。
Creates and returns an instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 名称(类型 `String`)。The name. |
ToolCallRequestPart返回ToolCallRequestPart。Returns tool call request part.
源码Source
io/agentscope/core/tracing/telemetry/model/ToolCallRequestPart.java:67–69create
public static ToolCallRequestPart create(String id, String name, Object arguments)
static
创建并返回实例。
Creates and returns an instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
id | String | 标识(类型 `String`)。The id. |
name | String | 名称(类型 `String`)。The name. |
arguments | Object | 参数(类型 `Object`)。The arguments. |
ToolCallRequestPart返回ToolCallRequestPart。Returns tool call request part.
源码Source
io/agentscope/core/tracing/telemetry/model/ToolCallRequestPart.java:71–73