AS AgentScopeAPI 手册 / API Reference

AgentScopeNacosPromptProperties

@ConfigurationProperties(prefix = NacosConstants.NACOS_PROMPT_PREFIX) public class AgentScopeNacosPromptProperties extends BaseNacosProperties
源码Source io/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:53–122

AgentScope 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.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:83–85

setEnabled

public void setEnabled(boolean enabled)

设置已启用。

Sets the enabled.

参数Parameters
名称Name类型Type说明Description
enabledboolean已启用(类型 `boolean`)。The enabled.
源码Source io/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:87–89

getSysPromptKey

public String getSysPromptKey()

获取 getSysPromptKey。

Returns the sys prompt key.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:91–93

setSysPromptKey

public void setSysPromptKey(String sysPromptKey)

设置 setSysPromptKey。

Sets the sys prompt key.

参数Parameters
名称Name类型Type说明Description
sysPromptKeyStringsys 提示词键(类型 `String`)。The sys prompt key.
源码Source io/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:95–97

getVersion

public String getVersion()

获取版本。

Returns the version.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:99–101

setVersion

public void setVersion(String version)

设置版本。

Sets the version.

参数Parameters
名称Name类型Type说明Description
versionString版本(类型 `String`)。The version.
源码Source io/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:103–105

getLabel

public String getLabel()

获取标签。

Returns the label.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:107–109

setLabel

public void setLabel(String label)

设置标签。

Sets the label.

参数Parameters
名称Name类型Type说明Description
labelString标签(类型 `String`)。The label.
源码Source io/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:111–113

getVariables

public Map<String, String> getVariables()

获取 getVariables。

Returns the variables.

返回Returns Map<String, String>
返回映射。Returns map.
源码Source io/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:115–117

setVariables

public void setVariables(Map<String, String> variables)

设置 setVariables。

Sets the variables.

参数Parameters
名称Name类型Type说明Description
variablesMap<String, String>variables(类型 `Map`)。The variables.
源码Source io/agentscope/spring/boot/nacos/properties/AgentScopeNacosPromptProperties.java:119–121

继承成员Inherited Members

基于官方固定版本源码静态生成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.