OllamaProperties
@ConfigurationProperties(prefix = "agentscope.ollama") public class OllamaProperties
源码Source
io/agentscope/spring/boot/ollama/OllamaProperties.java:35–76Ollama 属性,承载智能体的部署、调度与服务化运行。位于 io.agentscope.spring.boot.ollama 包。核心成员包括 isEnabled、setEnabled、getModelName、setModelName、getBaseUrl、setBaseUrl。
Ollama provider specific settings.
Example configuration:
`agentscope:
model:
provider: ollama
ollama:
enabled: true
model-name: llama3
# base-url: http://localhost:11434 # optional
`
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public boolean isEnabled() | 判断是否已启用。 Returns whether the enabled. |
public void setEnabled(boolean enabled) | 设置已启用。 Sets the enabled. |
public String getModelName() | 获取模型名称。 Returns the model name. |
public void setModelName(String modelName) | 设置模型名称。 Sets the model name. |
public String getBaseUrl() | 获取基类 URL。 Returns the base url. |
public void setBaseUrl(String baseUrl) | 设置基类 URL。 Sets the base url. |
方法详情Method Detail
isEnabled
public boolean isEnabled()
判断是否已启用。
Returns whether the enabled.
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/spring/boot/ollama/OllamaProperties.java:53–55setEnabled
public void setEnabled(boolean enabled)
设置已启用。
Sets the enabled.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
enabled | boolean | 已启用(类型 `boolean`)。The enabled. |
源码Source
io/agentscope/spring/boot/ollama/OllamaProperties.java:57–59getModelName
public String getModelName()
获取模型名称。
Returns the model name.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/spring/boot/ollama/OllamaProperties.java:61–63setModelName
public void setModelName(String modelName)
设置模型名称。
Sets the model name.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
modelName | String | 模型名称(类型 `String`)。The model name. |
源码Source
io/agentscope/spring/boot/ollama/OllamaProperties.java:65–67getBaseUrl
public String getBaseUrl()
获取基类 URL。
Returns the base url.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/spring/boot/ollama/OllamaProperties.java:69–71setBaseUrl
public void setBaseUrl(String baseUrl)
设置基类 URL。
Sets the base url.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
baseUrl | String | 基类 URL(类型 `String`)。The base url. |
源码Source
io/agentscope/spring/boot/ollama/OllamaProperties.java:73–75