agentscope.session¶
The session module in agentscope.
- class SessionBase[源代码]¶
基类:
object
The base class for session in agentscope.
- session_id: str¶
The session id
- abstract async save_session_state(**state_modules_mapping)[源代码]¶
Save the session state
- 参数:
state_modules_mapping (StateModule)
- 返回类型:
None
- class JSONSession[源代码]¶
基类:
SessionBase
The JSON session class.
- __init__(session_id, save_dir)[源代码]¶
Initialize the JSON session class.
- 参数:
session_id (str) -- The session id.
save_dir (str) -- The directory to save the session state.
- 返回类型:
None
- property save_path: str¶
The path to save the session state.