AS AgentScopeAPI 手册 / API Reference

AgentProperties

public class AgentProperties
源码Source io/agentscope/spring/boot/properties/AgentProperties.java:32–85

智能体属性,承载智能体的部署、调度与服务化运行。位于 io.agentscope.spring.boot.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.

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

setEnabled

public void setEnabled(boolean enabled)

设置已启用。

Sets the enabled.

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

getName

public String getName()

获取名称。

Returns the name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/spring/boot/properties/AgentProperties.java:62–64

setName

public void setName(String name)

设置名称。

Sets the name.

参数Parameters
名称Name类型Type说明Description
nameString名称(类型 `String`)。The name.
源码Source io/agentscope/spring/boot/properties/AgentProperties.java:66–68

getSysPrompt

public String getSysPrompt()

获取 getSysPrompt。

Returns the sys prompt.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/spring/boot/properties/AgentProperties.java:70–72

setSysPrompt

public void setSysPrompt(String sysPrompt)

设置 setSysPrompt。

Sets the sys prompt.

参数Parameters
名称Name类型Type说明Description
sysPromptStringsys 提示词(类型 `String`)。The sys prompt.
源码Source io/agentscope/spring/boot/properties/AgentProperties.java:74–76

getMaxIters

public int getMaxIters()

获取最大迭代次数。

Returns the max iters.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/spring/boot/properties/AgentProperties.java:78–80

setMaxIters

public void setMaxIters(int maxIters)

设置最大迭代次数。

Sets the max iters.

参数Parameters
名称Name类型Type说明Description
maxItersint最大迭代次数(类型 `int`)。The max iters.
源码Source io/agentscope/spring/boot/properties/AgentProperties.java:82–84
基于官方固定版本源码静态生成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.