AgentScopeNacosPromptProperties
@ConfigurationProperties(prefix = NacosConstants.NACOS_PROMPT_PREFIX) public class AgentScopeNacosPromptProperties extends BaseNacosProperties
io/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:53–122AgentScope Nacos 提示词属性,承载智能体的部署、调度与服务化运行。位于 io.agentscope.spring.boot.nacos.properties 包,继承自 BaseNacosProperties。核心成员包括 isEnabled、setEnabled、getSysPromptKey、setSysPromptKey、getVersion、setVersion。
Configuration properties for AgentScope Nacos Prompt integration.
This configuration allows users to drive the Agent's system prompt from Nacos. The
Nacos-stored prompt will take precedence over the YAML-defined agentscope.agent.sys-prompt,
while the YAML value can still be used as a default fallback.
Example configuration:
`agentscope:
agent:
enabled: true
name: "Assistant"
sys-prompt: "You are a helpful AI assistant."
nacos:
server-addr: 127.0.0.1:8848
namespace: public
prompt:
enabled: true
sys-prompt-key: agent-main
version: "1.0.0"
label: "prod"
variables:
env: prod
app: order-service
`
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public boolean isEnabled() | 判断是否已启用。 Returns whether the enabled. |
public void setEnabled(boolean enabled) | 设置已启用。 Sets the enabled. |
public String getSysPromptKey() | 获取 `getSysPromptKey`。 Returns the sys prompt key. |
public void setSysPromptKey(String sysPromptKey) | 设置 `setSysPromptKey`。 Sets the sys prompt key. |
public String getVersion() | 获取版本。 Returns the version. |
public void setVersion(String version) | 设置版本。 Sets the version. |
public String getLabel() | 获取标签。 Returns the label. |
public void setLabel(String label) | 设置标签。 Sets the label. |
public Map<String, String> getVariables() | 获取 `getVariables`。 Returns the variables. |
public void setVariables(Map<String, String> variables) | 设置 `setVariables`。 Sets the variables. |
方法详情Method Detail
isEnabled
public boolean isEnabled()
判断是否已启用。
Returns whether the enabled.
booleanio/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:83–85setEnabled
public void setEnabled(boolean enabled)
设置已启用。
Sets the enabled.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
enabled | boolean | 已启用(类型 `boolean`)。The enabled. |
io/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:87–89getSysPromptKey
public String getSysPromptKey()
获取 getSysPromptKey。
Returns the sys prompt key.
Stringio/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:91–93setSysPromptKey
public void setSysPromptKey(String sysPromptKey)
设置 setSysPromptKey。
Sets the sys prompt key.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sysPromptKey | String | sys 提示词键(类型 `String`)。The sys prompt key. |
io/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:95–97getVersion
public String getVersion()
获取版本。
Returns the version.
Stringio/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:99–101setVersion
public void setVersion(String version)
设置版本。
Sets the version.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
version | String | 版本(类型 `String`)。The version. |
io/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:103–105getLabel
public String getLabel()
获取标签。
Returns the label.
Stringio/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:107–109setLabel
public void setLabel(String label)
设置标签。
Sets the label.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
label | String | 标签(类型 `String`)。The label. |
io/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:111–113getVariables
public Map<String, String> getVariables()
获取 getVariables。
Returns the variables.
Map<String, String>io/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:115–117setVariables
public void setVariables(Map<String, String> variables)
设置 setVariables。
Sets the variables.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
variables | Map<String, String> | variables(类型 `Map`)。The variables. |
io/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:119–121