OllamaEmbeddingResponse
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class OllamaEmbeddingResponse
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:27–87Ollama 向量化响应,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.extensions.model.ollama.dto 包。核心成员包括 getModel、setModel、getEmbeddings、setEmbeddings、getTotalDuration、setTotalDuration。
Ollama embedding response DTO. Represents the response from the Ollama embedding API.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public OllamaEmbeddingResponse() | 初始化 `OllamaEmbeddingResponse` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getModel() | 获取模型。 Returns the model. |
public void setModel(String model) | 设置模型。 Sets the model. |
public List<float[]> getEmbeddings() | 获取向量。 Returns the embeddings. |
public void setEmbeddings(List<float[]> embeddings) | 设置向量。 Sets the embeddings. |
public Long getTotalDuration() | 获取总数时长。 Returns the total duration. |
public void setTotalDuration(Long totalDuration) | 设置总数时长。 Sets the total duration. |
public Long getLoadDuration() | 获取加载时长。 Returns the load duration. |
public void setLoadDuration(Long loadDuration) | 设置加载时长。 Sets the load duration. |
public Integer getPromptEvalCount() | 获取提示词评估数量。 Returns the prompt eval count. |
public void setPromptEvalCount(Integer promptEvalCount) | 设置提示词评估数量。 Sets the prompt eval count. |
构造器详情Constructor Detail
OllamaEmbeddingResponse
public OllamaEmbeddingResponse()
初始化 OllamaEmbeddingResponse 实例。
Creates a new instance.
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:46方法详情Method Detail
getModel
public String getModel()
获取模型。
Returns the model.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:48–50setModel
public void setModel(String model)
设置模型。
Sets the model.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
model | String | 模型实例(类型 `String`)。The model. |
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:52–54getEmbeddings
public List<float[]> getEmbeddings()
获取向量。
Returns the embeddings.
List<float[]>返回列出。Returns list.
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:56–58setEmbeddings
public void setEmbeddings(List<float[]> embeddings)
设置向量。
Sets the embeddings.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
embeddings | List<float[]> | 向量(类型 `List`)。The embeddings. |
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:60–62getTotalDuration
public Long getTotalDuration()
获取总数时长。
Returns the total duration.
Long返回数值结果。Returns a numeric result.
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:64–66setTotalDuration
public void setTotalDuration(Long totalDuration)
设置总数时长。
Sets the total duration.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
totalDuration | Long | 总数时长(类型 `Long`)。The total duration. |
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:68–70getLoadDuration
public Long getLoadDuration()
获取加载时长。
Returns the load duration.
Long返回数值结果。Returns a numeric result.
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:72–74setLoadDuration
public void setLoadDuration(Long loadDuration)
设置加载时长。
Sets the load duration.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
loadDuration | Long | 加载时长(类型 `Long`)。The load duration. |
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:76–78getPromptEvalCount
public Integer getPromptEvalCount()
获取提示词评估数量。
Returns the prompt eval count.
Integer返回数值结果。Returns a numeric result.
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:80–82setPromptEvalCount
public void setPromptEvalCount(Integer promptEvalCount)
设置提示词评估数量。
Sets the prompt eval count.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
promptEvalCount | Integer | 提示词评估数量(类型 `Integer`)。The prompt eval count. |
源码Source
io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:84–86