mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
26 lines
693 B
Python
26 lines
693 B
Python
CONVERSATION_BASE_DIR = 'sessions'
|
|
|
|
|
|
def get_conversation_dir(sid: str) -> str:
|
|
return f'{CONVERSATION_BASE_DIR}/{sid}/'
|
|
|
|
|
|
def get_conversation_events_dir(sid: str) -> str:
|
|
return f'{get_conversation_dir(sid)}events/'
|
|
|
|
|
|
def get_conversation_event_filename(sid: str, id: int) -> str:
|
|
return f'{get_conversation_events_dir(sid)}{id}.json'
|
|
|
|
|
|
def get_conversation_metadata_filename(sid: str) -> str:
|
|
return f'{get_conversation_dir(sid)}metadata.json'
|
|
|
|
|
|
def get_conversation_init_data_filename(sid: str) -> str:
|
|
return f'{get_conversation_dir(sid)}init.json'
|
|
|
|
|
|
def get_conversation_agent_state_filename(sid: str) -> str:
|
|
return f'{get_conversation_dir(sid)}agent_state.pkl'
|