FunctionCall
public static class FunctionCall
源码Source
io/agentscope/core/chat/completions/model/ToolCall.java:128–163函数调用,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.core.chat.completions.model 包。核心成员包括 getName、setName、getArguments、setArguments、FunctionCall。
Represents the function details within a tool call.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public FunctionCall() | 初始化 `FunctionCall` 实例。 Default constructor for deserialization. |
public FunctionCall(String name, String arguments) | 创建新的函数调用。 Creates a new function call. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getName() | 获取名称。 Returns the name. |
public void setName(String name) | 设置名称。 Sets the name. |
public String getArguments() | 获取参数。 Returns the arguments. |
public void setArguments(String arguments) | 设置参数。 Sets the arguments. |
构造器详情Constructor Detail
FunctionCall
public FunctionCall()
初始化 FunctionCall 实例。
Default constructor for deserialization.
源码Source
io/agentscope/core/chat/completions/model/ToolCall.java:135FunctionCall
public FunctionCall(String name, String arguments)
创建新的函数调用。
Creates a new function call.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 名称(类型 `String`)。Function name |
arguments | String | 参数(类型 `String`)。JSON string of function arguments |
源码Source
io/agentscope/core/chat/completions/model/ToolCall.java:143–146方法详情Method Detail
getName
public String getName()
获取名称。
Returns the name.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/chat/completions/model/ToolCall.java:148–150setName
public void setName(String name)
设置名称。
Sets the name.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 名称(类型 `String`)。The name. |
源码Source
io/agentscope/core/chat/completions/model/ToolCall.java:152–154getArguments
public String getArguments()
获取参数。
Returns the arguments.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/chat/completions/model/ToolCall.java:156–158setArguments
public void setArguments(String arguments)
设置参数。
Sets the arguments.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
arguments | String | 参数(类型 `String`)。The arguments. |
源码Source
io/agentscope/core/chat/completions/model/ToolCall.java:160–162