类class
agentscope.app.storageAgentData
class AgentData(BaseModel)
源码Source
agentscope/app/storage/_model/_agent.py:94–182智能体数据模型。位于 agentscope.app.storage 包。核心成员包括 context_config、react_config、invite_config。
The agent data model. Declared in agentscope.app.storage.
属性摘要Property Summary
| 属性Property | 说明Description |
|---|---|
context_config | 获取上下文配置。 Return the deprecated flat context configuration. |
react_config | 获取ReAct 配置。 Return the deprecated flat ReAct configuration. |
invite_config | 获取邀请配置。 Return the deprecated flat invite configuration. |
属性摘要Attribute Summary
| 属性Attribute | 类型Type | 说明Description | 值Value |
|---|---|---|---|
id | SkipJsonSchema[str] | 标识字段。 | Field(description='Unique agent id', default_factory=_generate_id) |
name | str | 智能体的名称。 | Field(description='The name of the agent.', title='Name') |
system_prompt | str | 系统提示词用于智能体。 | Field(default="You're a helpful assistant.", description='The system prompt for the agent.', title='System Prompt', json_schema_extra={'format': 'textarea'}) |
chat_config | AgentChatConfig | 设置用于智能体's 文本会话。 | Field(default_factory=AgentChatConfig, description="The settings for the agent's text conversations.", title='Chat Config') |
属性详情Attribute Detail
id
SkipJsonSchema[str] = Field(description='Unique agent id', default_factory=_generate_id)标识字段。声明为 SkipJsonSchema[str]。
Unique agent id
源码Source
agentscope/app/storage/_model/_agent.py:97name
str = Field(description='The name of the agent.', title='Name')智能体的名称。
The name of the agent.
源码Source
agentscope/app/storage/_model/_agent.py:110system_prompt
str = Field(default="You're a helpful assistant.", description='The system prompt for the agent.', title='System Prompt', json_schema_extra={'format': 'textarea'})系统提示词用于智能体。
The system prompt for the agent.
源码Source
agentscope/app/storage/_model/_agent.py:115chat_config
AgentChatConfig = Field(default_factory=AgentChatConfig, description="The settings for the agent's text conversations.", title='Chat Config')设置用于智能体's 文本会话。
The settings for the agent's text conversations.
源码Source
agentscope/app/storage/_model/_agent.py:124属性详情Property Detail
context_config
def context_config() -> ContextConfig
获取上下文配置。
Return the deprecated flat context configuration.
ContextConfig
返回ContextConfig。Returns context config.
源码Source
agentscope/app/storage/_model/_agent.py:131–139react_config
def react_config() -> ReActConfig
获取ReAct 配置。
Return the deprecated flat ReAct configuration.
ReActConfig
返回ReActConfig。Returns ReAct config.
源码Source
agentscope/app/storage/_model/_agent.py:142–150invite_config
def invite_config() -> InviteConfig
获取邀请配置。
Return the deprecated flat invite configuration.
InviteConfig
返回InviteConfig。Returns invite config.
源码Source
agentscope/app/storage/_model/_agent.py:153–161