AS AgentScopeAPI 手册 / API Reference

OllamaEmbeddingResponse

@JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class OllamaEmbeddingResponse
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:27–87

Ollama 向量化响应,与模型服务通信并返回生成或向量化结果。位于 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.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:48–50

setModel

public void setModel(String model)

设置模型。

Sets the model.

参数Parameters
名称Name类型Type说明Description
modelString模型实例(类型 `String`)。The model.
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:52–54

getEmbeddings

public List<float[]> getEmbeddings()

获取向量。

Returns the embeddings.

返回Returns List<float[]>
返回列出。Returns list.
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:56–58

setEmbeddings

public void setEmbeddings(List<float[]> embeddings)

设置向量。

Sets the embeddings.

参数Parameters
名称Name类型Type说明Description
embeddingsList<float[]>向量(类型 `List`)。The embeddings.
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:60–62

getTotalDuration

public Long getTotalDuration()

获取总数时长。

Returns the total duration.

返回Returns Long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:64–66

setTotalDuration

public void setTotalDuration(Long totalDuration)

设置总数时长。

Sets the total duration.

参数Parameters
名称Name类型Type说明Description
totalDurationLong总数时长(类型 `Long`)。The total duration.
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:68–70

getLoadDuration

public Long getLoadDuration()

获取加载时长。

Returns the load duration.

返回Returns Long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:72–74

setLoadDuration

public void setLoadDuration(Long loadDuration)

设置加载时长。

Sets the load duration.

参数Parameters
名称Name类型Type说明Description
loadDurationLong加载时长(类型 `Long`)。The load duration.
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:76–78

getPromptEvalCount

public Integer getPromptEvalCount()

获取提示词评估数量。

Returns the prompt eval count.

返回Returns Integer
返回数值结果。Returns a numeric result.
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:80–82

setPromptEvalCount

public void setPromptEvalCount(Integer promptEvalCount)

设置提示词评估数量。

Sets the prompt eval count.

参数Parameters
名称Name类型Type说明Description
promptEvalCountInteger提示词评估数量(类型 `Integer`)。The prompt eval count.
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingResponse.java:84–86
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.