DashScopeToolFunction
@JsonInclude(JsonInclude.Include.NON_NULL) public class DashScopeToolFunction
io/agentscope/extensions/model/dashscope/dto/DashScopeToolFunction.java:45–120DashScope 工具函数,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.extensions.model.dashscope.dto 包。核心成员包括 getName、setName、getDescription、setDescription、getParameters、setParameters。
DashScope tool function definition DTO.
This class represents the function schema for a tool.
Example:
`{
"name": "get_weather",
"description": "Get the current weather in a location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city name"
}
},
"required": ["location"]
}
}
`
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Builder | 类class | 构建器,用于构建并配置目标实例。 A class in io.agentscope.extensions.model.dashscope.dto that talks to model services and returns generated or embedded output. |
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public DashScopeToolFunction() | 初始化 `DashScopeToolFunction` 实例。 Creates a new instance. |
public DashScopeToolFunction(String name, String description, Map<String, Object> parameters) | 初始化 `DashScopeToolFunction` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getName() | 获取名称。 Returns the name. |
public void setName(String name) | 设置名称。 Sets the name. |
public String getDescription() | 获取 `getDescription`。 Returns the description. |
public void setDescription(String description) | 设置 `setDescription`。 Sets the description. |
public Map<String, Object> getParameters() | 获取参数。 Returns the parameters. |
public void setParameters(Map<String, Object> parameters) | 设置参数。 Sets the parameters. |
public static Builder builder()static | 返回构建器实例。 Returns the builder. |
构造器详情Constructor Detail
DashScopeToolFunction
public DashScopeToolFunction()
初始化 DashScopeToolFunction 实例。
Creates a new instance.
io/agentscope/extensions/model/dashscope/dto/DashScopeToolFunction.java:60DashScopeToolFunction
public DashScopeToolFunction(String name, String description, Map<String, Object> parameters)
初始化 DashScopeToolFunction 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 名称(类型 `String`)。The name. |
description | String | 描述(类型 `String`)。The description. |
parameters | Map<String, Object> | 参数(类型 `Map`)。The parameters. |
io/agentscope/extensions/model/dashscope/dto/DashScopeToolFunction.java:62–66方法详情Method Detail
getName
public String getName()
获取名称。
Returns the name.
Stringio/agentscope/extensions/model/dashscope/dto/DashScopeToolFunction.java:68–70setName
public void setName(String name)
设置名称。
Sets the name.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 名称(类型 `String`)。The name. |
io/agentscope/extensions/model/dashscope/dto/DashScopeToolFunction.java:72–74getDescription
public String getDescription()
获取 getDescription。
Returns the description.
Stringio/agentscope/extensions/model/dashscope/dto/DashScopeToolFunction.java:76–78setDescription
public void setDescription(String description)
设置 setDescription。
Sets the description.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
description | String | 描述(类型 `String`)。The description. |
io/agentscope/extensions/model/dashscope/dto/DashScopeToolFunction.java:80–82getParameters
public Map<String, Object> getParameters()
获取参数。
Returns the parameters.
Map<String, Object>io/agentscope/extensions/model/dashscope/dto/DashScopeToolFunction.java:84–86setParameters
public void setParameters(Map<String, Object> parameters)
设置参数。
Sets the parameters.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
parameters | Map<String, Object> | 参数(类型 `Map`)。The parameters. |
io/agentscope/extensions/model/dashscope/dto/DashScopeToolFunction.java:88–90builder
public static Builder builder()
返回构建器实例。
Returns the builder.
Builderio/agentscope/extensions/model/dashscope/dto/DashScopeToolFunction.java:92–94嵌套类详情Nested Class Detail
Builder
public static class Builder构建器,用于构建并配置目标实例。位于 io.agentscope.extensions.model.dashscope.dto 包。核心成员包括 name、description、parameters、build。
A class in io.agentscope.extensions.model.dashscope.dto that talks to model services and returns generated or embedded output. Declared in io.agentscope.extensions.model.dashscope.dto.