OllamaToolFunction
@JsonInclude(JsonInclude.Include.NON_NULL) public class OllamaToolFunction
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaToolFunction.java:27–73Ollama 工具函数,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.extensions.model.ollama.dto 包。核心成员包括 getName、setName、getDescription、setDescription、getParameters、setParameters。
Ollama tool function definition DTO. Represents the definition of a function that can be called by the model.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public OllamaToolFunction() | 初始化 `OllamaToolFunction` 实例。 Creates a new instance. |
public OllamaToolFunction(String name, String description, Map<String, Object> parameters) | 初始化 `OllamaToolFunction` 实例。 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. |
构造器详情Constructor Detail
OllamaToolFunction
public OllamaToolFunction()
初始化 OllamaToolFunction 实例。
Creates a new instance.
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaToolFunction.java:42OllamaToolFunction
public OllamaToolFunction(String name, String description, Map<String, Object> parameters)
初始化 OllamaToolFunction 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 名称(类型 `String`)。The name. |
description | String | 描述(类型 `String`)。The description. |
parameters | Map<String, Object> | 参数(类型 `Map`)。The parameters. |
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaToolFunction.java:44–48方法详情Method Detail
getName
public String getName()
获取名称。
Returns the name.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaToolFunction.java:50–52setName
public void setName(String name)
设置名称。
Sets the name.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 名称(类型 `String`)。The name. |
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaToolFunction.java:54–56getDescription
public String getDescription()
获取 getDescription。
Returns the description.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaToolFunction.java:58–60setDescription
public void setDescription(String description)
设置 setDescription。
Sets the description.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
description | String | 描述(类型 `String`)。The description. |
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaToolFunction.java:62–64getParameters
public Map<String, Object> getParameters()
获取参数。
Returns the parameters.
Map<String, Object>返回映射。Returns map.
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaToolFunction.java:66–68setParameters
public void setParameters(Map<String, Object> parameters)
设置参数。
Sets the parameters.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
parameters | Map<String, Object> | 参数(类型 `Map`)。The parameters. |
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaToolFunction.java:70–72