AgentProperties
@ConfigurationProperties("agentscope.agent") public class AgentProperties
源码Source
io/agentscope/micronaut/properties/AgentProperties.java:34–88智能体属性,承载智能体的部署、调度与服务化运行。位于 io.agentscope.micronaut.properties 包。核心成员包括 isEnabled、setEnabled、getName、setName、getSysPrompt、setSysPrompt。
Configuration properties for the default ReActAgent bean.
Typical application.yml configuration:
`agentscope:
agent:
enabled: true
name: "Assistant"
sys-prompt: "You are a helpful AI assistant."
max-iters: 10
`
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public boolean isEnabled() | 判断是否已启用。 Returns whether the enabled. |
public void setEnabled(boolean enabled) | 设置已启用。 Sets the enabled. |
public String getName() | 获取名称。 Returns the name. |
public void setName(String name) | 设置名称。 Sets the name. |
public String getSysPrompt() | 获取 `getSysPrompt`。 Returns the sys prompt. |
public void setSysPrompt(String sysPrompt) | 设置 `setSysPrompt`。 Sets the sys prompt. |
public int getMaxIters() | 获取最大迭代次数。 Returns the max iters. |
public void setMaxIters(int maxIters) | 设置最大迭代次数。 Sets the max iters. |
方法详情Method Detail
isEnabled
public boolean isEnabled()
判断是否已启用。
Returns whether the enabled.
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/micronaut/properties/AgentProperties.java:57–59setEnabled
public void setEnabled(boolean enabled)
设置已启用。
Sets the enabled.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
enabled | boolean | 已启用(类型 `boolean`)。The enabled. |
源码Source
io/agentscope/micronaut/properties/AgentProperties.java:61–63getName
public String getName()
获取名称。
Returns the name.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/micronaut/properties/AgentProperties.java:65–67setName
public void setName(String name)
设置名称。
Sets the name.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 名称(类型 `String`)。The name. |
源码Source
io/agentscope/micronaut/properties/AgentProperties.java:69–71getSysPrompt
public String getSysPrompt()
获取 getSysPrompt。
Returns the sys prompt.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/micronaut/properties/AgentProperties.java:73–75setSysPrompt
public void setSysPrompt(String sysPrompt)
设置 setSysPrompt。
Sets the sys prompt.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sysPrompt | String | sys 提示词(类型 `String`)。The sys prompt. |
源码Source
io/agentscope/micronaut/properties/AgentProperties.java:77–79getMaxIters
public int getMaxIters()
获取最大迭代次数。
Returns the max iters.
int返回数值结果。Returns a numeric result.
源码Source
io/agentscope/micronaut/properties/AgentProperties.java:81–83setMaxIters
public void setMaxIters(int maxIters)
设置最大迭代次数。
Sets the max iters.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
maxIters | int | 最大迭代次数(类型 `int`)。The max iters. |
源码Source
io/agentscope/micronaut/properties/AgentProperties.java:85–87