AS AgentScopeAPI 手册 / API Reference

OllamaCredential

@JsonIgnoreProperties(ignoreUnknown = true) @JsonPropertyOrder({"id", "type", "host"}) public final class OllamaCredential extends CredentialBase
源码Source io/agentscope/extensions/model/ollama/credential/OllamaCredential.java:32–95

Ollama 凭证,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.extensions.model.ollama.credential 包,继承自 CredentialBase。核心成员包括 getType、getHost、getChatModelClass、toString、builder、TYPE。

Credential for the Ollama local server (connection settings only).

host may be null, in which case the model class falls back to http://localhost:11434.

嵌套类摘要Nested Class Summary

类Class类型Kind说明Description
Builder类class
构建器,用于构建并配置目标实例。
A class in io.agentscope.extensions.model.ollama.credential that talks to model services and returns generated or embedded output.

字段摘要Field Summary

字段Field类型Type说明Description
TYPE
staticfinal
String
类型字段。
The TYPE field.

方法摘要Method Summary

方法Method说明Description
public String getType()
获取类型。
Returns the type.
public String getHost()
获取 `getHost`。
Returns the host.
public Class<? extends ChatModelBase> getChatModelClass()
获取聊天模型类。
Returns the chat model class.
public String toString()
返回 `toString` 结果。
Returns the to string.
public static Builder builder()
static
返回构建器实例。
Returns the builder.

字段详情Field Detail

TYPE

public static final String TYPE
staticfinal

类型字段。声明为 public static final String TYPE。

The TYPE field.

源码Source io/agentscope/extensions/model/ollama/credential/OllamaCredential.java:36

方法详情Method Detail

getType

public String getType()

获取类型。

Returns the type.

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

getHost

public String getHost()

获取 getHost。

Returns the host.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/model/ollama/credential/OllamaCredential.java:56–59

getChatModelClass

public Class<? extends ChatModelBase> getChatModelClass()

获取聊天模型类。

Returns the chat model class.

返回Returns Class<? extends ChatModelBase>
返回类。Returns class.
源码Source io/agentscope/extensions/model/ollama/credential/OllamaCredential.java:61–64

toString

public String toString()

返回 toString 结果。

Returns the to string.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/model/ollama/credential/OllamaCredential.java:66–69

builder

public static Builder builder()
static

返回构建器实例。

Returns the builder.

返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/model/ollama/credential/OllamaCredential.java:71–73

嵌套类详情Nested Class Detail

Builder

public static final class Builder

构建器,用于构建并配置目标实例。位于 io.agentscope.extensions.model.ollama.credential 包。核心成员包括 id、host、build。

A class in io.agentscope.extensions.model.ollama.credential that talks to model services and returns generated or embedded output. Declared in io.agentscope.extensions.model.ollama.credential.

继承成员Inherited Members

继承自Methods inherited from CredentialBase
基于官方固定版本源码静态生成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.