Builder
public static class Builder
源码Source
io/agentscope/extensions/model/ollama/OllamaHttpClient.java:262–282OllamaHttpClient的构建器。位于 io.agentscope.extensions.model.ollama 包。核心成员包括 transport、baseUrl、build。
Builder for OllamaHttpClient.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder transport(HttpTransport transport) | 设置传输层。 Performs the transport operation. |
public Builder baseUrl(String baseUrl) | 设置基类 URL。 Performs the base url operation. |
public OllamaHttpClient build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
transport
public Builder transport(HttpTransport transport)
设置传输层。
Performs the transport operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
transport | HttpTransport | 传输层(类型 `HttpTransport`)。The transport. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/ollama/OllamaHttpClient.java:266–269baseUrl
public Builder baseUrl(String baseUrl)
设置基类 URL。
Performs the base url operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
baseUrl | String | 基类 URL(类型 `String`)。The base url. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/model/ollama/OllamaHttpClient.java:271–274build
public OllamaHttpClient build()
构建并返回最终实例。
Creates and returns an instance.
OllamaHttpClient返回OllamaHttpClient。Returns Ollama http client.
源码Source
io/agentscope/extensions/model/ollama/OllamaHttpClient.java:276–281