类class
agentscope.app.storageSessionConfig
class SessionConfig(BaseModel)
源码Source
agentscope/app/storage/_model/_session.py:248–316会话配置,保存相关配置项。位于 agentscope.app.storage 包。
Session configuration — set at creation, updatable via PATCH. Declared in agentscope.app.storage.
属性摘要Attribute Summary
| 属性Attribute | 类型Type | 说明Description | 值Value |
|---|---|---|---|
workspace_id | str | 工作区标识字段。 | — |
name | str | 用于会话的展示名称。 | Field(default_factory=lambda: datetime.now().strftime('%Y-%m-%d %H:%M:%S'), description='Display name for the session.') |
naming | SessionNaming | 命名字段。 | Field(default_factory=SessionNaming) |
cwd | str | None | `cwd` 字段。 | Field(default=None, description='Directory the session is focused on — absolute, or relative to the workspace root. ``None`` means the root.') |
chat_model_config | ChatModelConfig | None | 聊天模型配置字段。 | None |
fallback_chat_model_config | ChatModelConfig | None | 回退聊天模型配置字段。 | None |
tts_model_config | TTSModelConfig | None | TTS 模型配置字段。 | None |
realtime_model_config | RealtimeModelConfig | None | 实时模型配置字段。 | None |
knowledge_config | SessionKnowledgeConfig | None | 知识库配置字段。 | None |
属性详情Attribute Detail
workspace_id
str工作区标识字段。声明为 str。
The workspace id field.
源码Source
agentscope/app/storage/_model/_session.py:251name
str = Field(default_factory=lambda: datetime.now().strftime('%Y-%m-%d %H:%M:%S'), description='Display name for the session.')用于会话的展示名称。
Display name for the session.
源码Source
agentscope/app/storage/_model/_session.py:262naming
SessionNaming = Field(default_factory=SessionNaming)命名字段。声明为 SessionNaming。
The naming field.
源码Source
agentscope/app/storage/_model/_session.py:268cwd
str | None = Field(default=None, description='Directory the session is focused on — absolute, or relative to the workspace root. ``None`` means the root.')cwd 字段。声明为 str | None。
Directory the session is focused on — absolute, or relative to the workspace root.
源码Source
agentscope/app/storage/_model/_session.py:271chat_model_config
ChatModelConfig | None = None聊天模型配置字段。声明为 ChatModelConfig | None。
The chat model config field.
源码Source
agentscope/app/storage/_model/_session.py:300fallback_chat_model_config
ChatModelConfig | None = None回退聊天模型配置字段。声明为 ChatModelConfig | None。
The fallback chat model config field.
源码Source
agentscope/app/storage/_model/_session.py:303tts_model_config
TTSModelConfig | None = NoneTTS 模型配置字段。声明为 TTSModelConfig | None。
The tts model config field.
源码Source
agentscope/app/storage/_model/_session.py:307realtime_model_config
RealtimeModelConfig | None = None实时模型配置字段。声明为 RealtimeModelConfig | None。
The realtime model config field.
源码Source
agentscope/app/storage/_model/_session.py:310knowledge_config
SessionKnowledgeConfig | None = None知识库配置字段。声明为 SessionKnowledgeConfig | None。
The knowledge config field.
源码Source
agentscope/app/storage/_model/_session.py:313