OllamaRequest
@JsonInclude(JsonInclude.Include.NON_NULL) public class OllamaRequest
io/agentscope/extensions/model/ollama/dto/OllamaRequest.java:28–203Ollama 请求,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.extensions.model.ollama.dto 包。核心成员包括 getModel、setModel、getMessages、setMessages、getStream、setStream。
Ollama chat request DTO. Represents the payload sent to the Ollama chat API.
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Builder | 类class | 构建器,用于构建并配置目标实例。 A class in io.agentscope.extensions.model.ollama.dto that talks to model services and returns generated or embedded output. |
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public OllamaRequest() | 初始化 `OllamaRequest` 实例。 Creates a new instance. |
方法摘要Method Summary
构造器详情Constructor Detail
OllamaRequest
public OllamaRequest()
初始化 OllamaRequest 实例。
Creates a new instance.
io/agentscope/extensions/model/ollama/dto/OllamaRequest.java:73方法详情Method Detail
getModel
public String getModel()
获取模型。
Returns the model.
Stringio/agentscope/extensions/model/ollama/dto/OllamaRequest.java:75–77setModel
public void setModel(String model)
设置模型。
Sets the model.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
model | String | 模型实例(类型 `String`)。The model. |
io/agentscope/extensions/model/ollama/dto/OllamaRequest.java:79–81getMessages
public List<OllamaMessage> getMessages()
获取消息。
Returns the messages.
List<OllamaMessage>io/agentscope/extensions/model/ollama/dto/OllamaRequest.java:83–85setMessages
public void setMessages(List<OllamaMessage> messages)
设置消息。
Sets the messages.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
messages | List<OllamaMessage> | 消息列表(类型 `List`)。The messages. |
io/agentscope/extensions/model/ollama/dto/OllamaRequest.java:87–89getStream
public Boolean getStream()
获取流。
Returns the stream.
Booleanio/agentscope/extensions/model/ollama/dto/OllamaRequest.java:91–93setStream
public void setStream(Boolean stream)
设置流。
Sets the stream.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
stream | Boolean | 流(类型 `Boolean`)。The stream. |
io/agentscope/extensions/model/ollama/dto/OllamaRequest.java:95–97getFormat
public Object getFormat()
获取格式。
Returns the format.
Objectio/agentscope/extensions/model/ollama/dto/OllamaRequest.java:99–101setFormat
public void setFormat(Object format)
设置格式。
Sets the format.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
format | Object | 格式(类型 `Object`)。The format. |
io/agentscope/extensions/model/ollama/dto/OllamaRequest.java:103–105getKeepAlive
public String getKeepAlive()
获取 getKeepAlive。
Returns the keep alive.
Stringio/agentscope/extensions/model/ollama/dto/OllamaRequest.java:107–109setKeepAlive
public void setKeepAlive(String keepAlive)
设置 setKeepAlive。
Sets the keep alive.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
keepAlive | String | keep Alive(类型 `String`)。The keep alive. |
io/agentscope/extensions/model/ollama/dto/OllamaRequest.java:111–113getTools
public List<OllamaTool> getTools()
获取工具。
Returns the tools.
List<OllamaTool>io/agentscope/extensions/model/ollama/dto/OllamaRequest.java:115–117setTools
public void setTools(List<OllamaTool> tools)
设置工具。
Sets the tools.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
tools | List<OllamaTool> | 工具列表(类型 `List`)。The tools. |
io/agentscope/extensions/model/ollama/dto/OllamaRequest.java:119–121getToolChoice
public Object getToolChoice()
获取工具选项。
Returns the tool choice.
Objectio/agentscope/extensions/model/ollama/dto/OllamaRequest.java:123–125setToolChoice
public void setToolChoice(Object toolChoice)
设置工具选项。
Sets the tool choice.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
toolChoice | Object | 工具选项(类型 `Object`)。The tool choice. |
io/agentscope/extensions/model/ollama/dto/OllamaRequest.java:127–129getThink
public Object getThink()
获取 getThink。
Returns the think.
Objectio/agentscope/extensions/model/ollama/dto/OllamaRequest.java:131–133setThink
public void setThink(Object think)
设置 setThink。
Sets the think.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
think | Object | think(类型 `Object`)。The think. |
io/agentscope/extensions/model/ollama/dto/OllamaRequest.java:135–137getOptions
public Map<String, Object> getOptions()
获取选项。
Returns the options.
Map<String, Object>io/agentscope/extensions/model/ollama/dto/OllamaRequest.java:139–141setOptions
public void setOptions(Map<String, Object> options)
设置选项。
Sets the options.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
options | Map<String, Object> | 选项(类型 `Map`)。The options. |
io/agentscope/extensions/model/ollama/dto/OllamaRequest.java:143–145builder
public static Builder builder()
返回构建器实例。
Returns the builder.
Builderio/agentscope/extensions/model/ollama/dto/OllamaRequest.java:147–149嵌套类详情Nested Class Detail
Builder
public static class Builder构建器,用于构建并配置目标实例。位于 io.agentscope.extensions.model.ollama.dto 包。核心成员包括 model、messages、stream、format、keepAlive、tools。
A class in io.agentscope.extensions.model.ollama.dto that talks to model services and returns generated or embedded output. Declared in io.agentscope.extensions.model.ollama.dto.