OllamaResponse
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class OllamaResponse
io/agentscope/extensions/model/ollama/dto/OllamaResponse.java:27–188Ollama 响应,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.extensions.model.ollama.dto 包。核心成员包括 getError、setError、getModel、setModel、getCreatedAt、setCreatedAt。
Ollama chat response DTO. Represents the response from the Ollama chat API.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public OllamaResponse() | 初始化 `OllamaResponse` 实例。 Creates a new instance. |
方法摘要Method Summary
构造器详情Constructor Detail
OllamaResponse
public OllamaResponse()
初始化 OllamaResponse 实例。
Creates a new instance.
io/agentscope/extensions/model/ollama/dto/OllamaResponse.java:83方法详情Method Detail
getError
public String getError()
获取错误。
Returns the error.
Stringio/agentscope/extensions/model/ollama/dto/OllamaResponse.java:85–87setError
public void setError(String error)
设置错误。
Sets the error.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
error | String | 错误(类型 `String`)。The error. |
io/agentscope/extensions/model/ollama/dto/OllamaResponse.java:89–91getModel
public String getModel()
获取模型。
Returns the model.
Stringio/agentscope/extensions/model/ollama/dto/OllamaResponse.java:93–95setModel
public void setModel(String model)
设置模型。
Sets the model.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
model | String | 模型实例(类型 `String`)。The model. |
io/agentscope/extensions/model/ollama/dto/OllamaResponse.java:97–99getCreatedAt
public String getCreatedAt()
获取已创建 At。
Returns the created at.
Stringio/agentscope/extensions/model/ollama/dto/OllamaResponse.java:101–103setCreatedAt
public void setCreatedAt(String createdAt)
设置已创建 At。
Sets the created at.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
createdAt | String | 已创建 At(类型 `String`)。The created at. |
io/agentscope/extensions/model/ollama/dto/OllamaResponse.java:105–107getMessage
public OllamaMessage getMessage()
获取消息。
Returns the message.
OllamaMessageio/agentscope/extensions/model/ollama/dto/OllamaResponse.java:109–111setMessage
public void setMessage(OllamaMessage message)
设置消息。
Sets the message.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
message | OllamaMessage | 消息(类型 `OllamaMessage`)。The message. |
io/agentscope/extensions/model/ollama/dto/OllamaResponse.java:113–115getDone
public Boolean getDone()
获取 getDone。
Returns the done.
Booleanio/agentscope/extensions/model/ollama/dto/OllamaResponse.java:117–119setDone
public void setDone(Boolean done)
设置 setDone。
Sets the done.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
done | Boolean | done(类型 `Boolean`)。The done. |
io/agentscope/extensions/model/ollama/dto/OllamaResponse.java:121–123getTotalDuration
public Long getTotalDuration()
获取总数时长。
Returns the total duration.
Longio/agentscope/extensions/model/ollama/dto/OllamaResponse.java:125–127setTotalDuration
public void setTotalDuration(Long totalDuration)
设置总数时长。
Sets the total duration.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
totalDuration | Long | 总数时长(类型 `Long`)。The total duration. |
io/agentscope/extensions/model/ollama/dto/OllamaResponse.java:129–131getLoadDuration
public Long getLoadDuration()
获取加载时长。
Returns the load duration.
Longio/agentscope/extensions/model/ollama/dto/OllamaResponse.java:133–135setLoadDuration
public void setLoadDuration(Long loadDuration)
设置加载时长。
Sets the load duration.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
loadDuration | Long | 加载时长(类型 `Long`)。The load duration. |
io/agentscope/extensions/model/ollama/dto/OllamaResponse.java:137–139getPromptEvalCount
public Integer getPromptEvalCount()
获取提示词评估数量。
Returns the prompt eval count.
Integerio/agentscope/extensions/model/ollama/dto/OllamaResponse.java:141–143getPromptEvalCachedCount
public Integer getPromptEvalCachedCount()
获取提示词评估已缓存数量。
Returns the prompt eval cached count.
Integerio/agentscope/extensions/model/ollama/dto/OllamaResponse.java:145–147setPromptEvalCachedCount
public void setPromptEvalCachedCount(Integer promptEvalCachedCount)
设置提示词评估已缓存数量。
Sets the prompt eval cached count.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
promptEvalCachedCount | Integer | 提示词评估已缓存数量(类型 `Integer`)。The prompt eval cached count. |
io/agentscope/extensions/model/ollama/dto/OllamaResponse.java:149–151setPromptEvalCount
public void setPromptEvalCount(Integer promptEvalCount)
设置提示词评估数量。
Sets the prompt eval count.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
promptEvalCount | Integer | 提示词评估数量(类型 `Integer`)。The prompt eval count. |
io/agentscope/extensions/model/ollama/dto/OllamaResponse.java:153–155getPromptEvalDuration
public Long getPromptEvalDuration()
获取提示词评估时长。
Returns the prompt eval duration.
Longio/agentscope/extensions/model/ollama/dto/OllamaResponse.java:157–159setPromptEvalDuration
public void setPromptEvalDuration(Long promptEvalDuration)
设置提示词评估时长。
Sets the prompt eval duration.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
promptEvalDuration | Long | 提示词评估时长(类型 `Long`)。The prompt eval duration. |
io/agentscope/extensions/model/ollama/dto/OllamaResponse.java:161–163getEvalCount
public Integer getEvalCount()
获取评估数量。
Returns the eval count.
Integerio/agentscope/extensions/model/ollama/dto/OllamaResponse.java:165–167setEvalCount
public void setEvalCount(Integer evalCount)
设置评估数量。
Sets the eval count.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
evalCount | Integer | 评估数量(类型 `Integer`)。The eval count. |
io/agentscope/extensions/model/ollama/dto/OllamaResponse.java:169–171getEvalDuration
public Long getEvalDuration()
获取评估时长。
Returns the eval duration.
Longio/agentscope/extensions/model/ollama/dto/OllamaResponse.java:173–175setEvalDuration
public void setEvalDuration(Long evalDuration)
设置评估时长。
Sets the eval duration.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
evalDuration | Long | 评估时长(类型 `Long`)。The eval duration. |
io/agentscope/extensions/model/ollama/dto/OllamaResponse.java:177–179getDoneReason
public String getDoneReason()
获取 getDoneReason。
Returns the done reason.
Stringio/agentscope/extensions/model/ollama/dto/OllamaResponse.java:181–183setDoneReason
public void setDoneReason(String doneReason)
设置 setDoneReason。
Sets the done reason.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
doneReason | String | done 推理(类型 `String`)。The done reason. |
io/agentscope/extensions/model/ollama/dto/OllamaResponse.java:185–187