AS AgentScopeAPI 手册 / API Reference

DashScopeFunction

@JsonInclude(JsonInclude.Include.NON_NULL) public class DashScopeFunction
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeFunction.java:34–71

DashScope 函数,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.extensions.model.dashscope.dto 包。核心成员包括 getName、setName、getArguments、setArguments、of、DashScopeFunction。

DashScope function call DTO.

This class represents the function details in a tool call.

Example:

`{
"name": "get_weather",
"arguments": "{\"location\": \"Beijing\"}"
}
`

构造器摘要Constructor Summary

构造器Constructor说明Description
public DashScopeFunction()
初始化 `DashScopeFunction` 实例。
Creates a new instance.
public DashScopeFunction(String name, String arguments)
初始化 `DashScopeFunction` 实例。
Creates a new instance.

方法摘要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.
public static DashScopeFunction of(String name, String arguments)
static
创建并返回实例。
Creates and returns an instance.

构造器详情Constructor Detail

DashScopeFunction

public DashScopeFunction()

初始化 DashScopeFunction 实例。

Creates a new instance.

源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeFunction.java:45

DashScopeFunction

public DashScopeFunction(String name, String arguments)

初始化 DashScopeFunction 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
nameString名称(类型 `String`)。The name.
argumentsString参数(类型 `String`)。The arguments.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeFunction.java:47–50

方法详情Method Detail

getName

public String getName()

获取名称。

Returns the name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeFunction.java:52–54

setName

public void setName(String name)

设置名称。

Sets the name.

参数Parameters
名称Name类型Type说明Description
nameString名称(类型 `String`)。The name.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeFunction.java:56–58

getArguments

public String getArguments()

获取参数。

Returns the arguments.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeFunction.java:60–62

setArguments

public void setArguments(String arguments)

设置参数。

Sets the arguments.

参数Parameters
名称Name类型Type说明Description
argumentsString参数(类型 `String`)。The arguments.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeFunction.java:64–66

of

public static DashScopeFunction of(String name, String arguments)
static

创建并返回实例。

Creates and returns an instance.

参数Parameters
名称Name类型Type说明Description
nameString名称(类型 `String`)。The name.
argumentsString参数(类型 `String`)。The arguments.
返回Returns DashScopeFunction
返回DashScopeFunction。Returns DashScope function.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeFunction.java:68–70
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.