OllamaEmbeddingRequest
@JsonInclude(JsonInclude.Include.NON_NULL) public class OllamaEmbeddingRequest
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:27–91Ollama 向量化请求,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.extensions.model.ollama.dto 包。核心成员包括 getModel、setModel、getInput、setInput、getKeepAlive、setKeepAlive。
Ollama embedding request DTO. Represents the payload sent to the Ollama embedding API.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public OllamaEmbeddingRequest() | 初始化 `OllamaEmbeddingRequest` 实例。 Creates a new instance. |
public OllamaEmbeddingRequest(String model, List<String> input) | 初始化 `OllamaEmbeddingRequest` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getModel() | 获取模型。 Returns the model. |
public void setModel(String model) | 设置模型。 Sets the model. |
public List<String> getInput() | 获取输入。 Returns the input. |
public void setInput(List<String> input) | 设置输入。 Sets the input. |
public String getKeepAlive() | 获取 `getKeepAlive`。 Returns the keep alive. |
public void setKeepAlive(String keepAlive) | 设置 `setKeepAlive`。 Sets the keep alive. |
public Boolean getTruncate() | 获取 `getTruncate`。 Returns the truncate. |
public void setTruncate(Boolean truncate) | 设置 `setTruncate`。 Sets the truncate. |
public Map<String, Object> getOptions() | 获取选项。 Returns the options. |
public void setOptions(Map<String, Object> options) | 设置选项。 Sets the options. |
构造器详情Constructor Detail
OllamaEmbeddingRequest
public OllamaEmbeddingRequest()
初始化 OllamaEmbeddingRequest 实例。
Creates a new instance.
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:45OllamaEmbeddingRequest
public OllamaEmbeddingRequest(String model, List<String> input)
初始化 OllamaEmbeddingRequest 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
model | String | 模型实例(类型 `String`)。The model. |
input | List<String> | 输入消息(类型 `List`)。The input. |
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:47–50方法详情Method Detail
getModel
public String getModel()
获取模型。
Returns the model.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:52–54setModel
public void setModel(String model)
设置模型。
Sets the model.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
model | String | 模型实例(类型 `String`)。The model. |
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:56–58getInput
public List<String> getInput()
获取输入。
Returns the input.
List<String>返回列出。Returns list.
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:60–62setInput
public void setInput(List<String> input)
设置输入。
Sets the input.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
input | List<String> | 输入消息(类型 `List`)。The input. |
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:64–66getKeepAlive
public String getKeepAlive()
获取 getKeepAlive。
Returns the keep alive.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:68–70setKeepAlive
public void setKeepAlive(String keepAlive)
设置 setKeepAlive。
Sets the keep alive.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
keepAlive | String | keep Alive(类型 `String`)。The keep alive. |
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:72–74getTruncate
public Boolean getTruncate()
获取 getTruncate。
Returns the truncate.
Boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:76–78setTruncate
public void setTruncate(Boolean truncate)
设置 setTruncate。
Sets the truncate.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
truncate | Boolean | truncate(类型 `Boolean`)。The truncate. |
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:80–82getOptions
public Map<String, Object> getOptions()
获取选项。
Returns the options.
Map<String, Object>返回映射。Returns map.
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:84–86setOptions
public void setOptions(Map<String, Object> options)
设置选项。
Sets the options.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
options | Map<String, Object> | 选项(类型 `Map`)。The options. |
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:88–90