AS AgentScopeAPI 手册 / API Reference

OllamaEmbeddingRequest

@JsonInclude(JsonInclude.Include.NON_NULL) public class OllamaEmbeddingRequest
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:27–91

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

OllamaEmbeddingRequest

public OllamaEmbeddingRequest(String model, List<String> input)

初始化 OllamaEmbeddingRequest 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
modelString模型实例(类型 `String`)。The model.
inputList<String>输入消息(类型 `List`)。The input.
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:47–50

方法详情Method Detail

getModel

public String getModel()

获取模型。

Returns the model.

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

setModel

public void setModel(String model)

设置模型。

Sets the model.

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

getInput

public List<String> getInput()

获取输入。

Returns the input.

返回Returns List<String>
返回列出。Returns list.
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:60–62

setInput

public void setInput(List<String> input)

设置输入。

Sets the input.

参数Parameters
名称Name类型Type说明Description
inputList<String>输入消息(类型 `List`)。The input.
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:64–66

getKeepAlive

public String getKeepAlive()

获取 getKeepAlive。

Returns the keep alive.

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

setKeepAlive

public void setKeepAlive(String keepAlive)

设置 setKeepAlive。

Sets the keep alive.

参数Parameters
名称Name类型Type说明Description
keepAliveStringkeep Alive(类型 `String`)。The keep alive.
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:72–74

getTruncate

public Boolean getTruncate()

获取 getTruncate。

Returns the truncate.

返回Returns Boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:76–78

setTruncate

public void setTruncate(Boolean truncate)

设置 setTruncate。

Sets the truncate.

参数Parameters
名称Name类型Type说明Description
truncateBooleantruncate(类型 `Boolean`)。The truncate.
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:80–82

getOptions

public Map<String, Object> getOptions()

获取选项。

Returns the options.

返回Returns Map<String, Object>
返回映射。Returns map.
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:84–86

setOptions

public void setOptions(Map<String, Object> options)

设置选项。

Sets the options.

参数Parameters
名称Name类型Type说明Description
optionsMap<String, Object>选项(类型 `Map`)。The options.
源码Source io/agentscope/extensions/model/ollama/dto/OllamaEmbeddingRequest.java:88–90
基于官方固定版本源码静态生成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.