agentscope.session¶
agentscope 中的会话模块。
- class SessionBase[source]¶
基础:
objectagentscope中会话的基础类。
- session_id: str¶
会话 ID
- abstract async save_session_state(**state_modules_mapping)[source]¶
保存会话状态
- Parameters:
state_modules_mapping (StateModule)
- Return type:
无
- class JSONSession[source]¶
基类:
SessionBaseJSON 会话类。
- __init__(session_id, save_dir)[source]¶
初始化JSON会话类。
- Parameters:
session_id (str) – 会话标识符。
save_dir (str) – 用于保存会话状态的目录。
- Return type:
无
- property save_path: str¶
保存会话状态的路径。