Package io.agentscope.spring.boot.nacos
Class AgentscopeNacosPromptAutoConfiguration
java.lang.Object
io.agentscope.spring.boot.nacos.AgentscopeNacosPromptAutoConfiguration
@AutoConfiguration
@AutoConfigureBefore(io.agentscope.spring.boot.AgentscopeAutoConfiguration.class)
@EnableConfigurationProperties({AgentScopeNacosProperties.class,AgentScopeNacosPromptProperties.class,io.agentscope.spring.boot.properties.AgentscopeProperties.class})
@ConditionalOnClass(io.agentscope.core.nacos.prompt.NacosPromptListener.class)
@ConditionalOnProperty(prefix="agentscope.nacos.prompt",
name="enabled",
havingValue="true",
matchIfMissing=false)
public class AgentscopeNacosPromptAutoConfiguration
extends Object
Auto-configuration that builds ReActAgent from prompts stored in Nacos.
When this starter is on the classpath and agentscope.nacos.prompt.enabled=true, the
Agent's system prompt will be loaded from Nacos via NacosPromptListener. The Nacos
prompt takes precedence over agentscope.agent.sys-prompt defined in YAML, with the YAML
value still acting as a default fallback.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.alibaba.nacos.api.ai.AiServiceagentscopePromptAiService(AgentScopeNacosProperties nacosProperties, AgentScopeNacosPromptProperties promptNacosProperties) io.agentscope.core.nacos.prompt.NacosPromptListenernacosPromptListener(com.alibaba.nacos.api.ai.AiService agentscopePromptAiService)
-
Constructor Details
-
AgentscopeNacosPromptAutoConfiguration
public AgentscopeNacosPromptAutoConfiguration()
-
-
Method Details
-
agentscopePromptAiService
@Bean(name="agentscopePromptAiService") @ConditionalOnMissingBean(name="agentscopePromptAiService") public com.alibaba.nacos.api.ai.AiService agentscopePromptAiService(AgentScopeNacosProperties nacosProperties, AgentScopeNacosPromptProperties promptNacosProperties) throws com.alibaba.nacos.api.exception.NacosException - Throws:
com.alibaba.nacos.api.exception.NacosException
-
nacosPromptListener
@Bean @ConditionalOnMissingBean(io.agentscope.core.nacos.prompt.NacosPromptListener.class) public io.agentscope.core.nacos.prompt.NacosPromptListener nacosPromptListener(com.alibaba.nacos.api.ai.AiService agentscopePromptAiService)
-