OllamaFunction
@JsonInclude(JsonInclude.Include.NON_NULL) public class OllamaFunction
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaFunction.java:27–60Ollama 函数,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.extensions.model.ollama.dto 包。核心成员包括 getName、setName、getArguments、setArguments、OllamaFunction。
Ollama function execution DTO. Represents the function details in a tool call from the model.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public OllamaFunction() | 初始化 `OllamaFunction` 实例。 Creates a new instance. |
public OllamaFunction(String name, Map<String, Object> arguments) | 初始化 `OllamaFunction` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getName() | 获取名称。 Returns the name. |
public void setName(String name) | 设置名称。 Sets the name. |
public Map<String, Object> getArguments() | 获取参数。 Returns the arguments. |
public void setArguments(Map<String, Object> arguments) | 设置参数。 Sets the arguments. |
构造器详情Constructor Detail
OllamaFunction
public OllamaFunction()
初始化 OllamaFunction 实例。
Creates a new instance.
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaFunction.java:38OllamaFunction
public OllamaFunction(String name, Map<String, Object> arguments)
初始化 OllamaFunction 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 名称(类型 `String`)。The name. |
arguments | Map<String, Object> | 参数(类型 `Map`)。The arguments. |
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaFunction.java:40–43方法详情Method Detail
getName
public String getName()
获取名称。
Returns the name.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaFunction.java:45–47setName
public void setName(String name)
设置名称。
Sets the name.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 名称(类型 `String`)。The name. |
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaFunction.java:49–51getArguments
public Map<String, Object> getArguments()
获取参数。
Returns the arguments.
Map<String, Object>返回映射。Returns map.
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaFunction.java:53–55setArguments
public void setArguments(Map<String, Object> arguments)
设置参数。
Sets the arguments.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
arguments | Map<String, Object> | 参数(类型 `Map`)。The arguments. |
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaFunction.java:57–59