Load a conversation from storage. Args: conversation_id: Unique identifier for the conversation Returns: Conversation dict or None if not found
(conversation_id: str)
| 46 | |
| 47 | |
| 48 | def get_conversation(conversation_id: str) -> Optional[Dict[str, Any]]: |
| 49 | """ |
| 50 | Load a conversation from storage. |
| 51 | |
| 52 | Args: |
| 53 | conversation_id: Unique identifier for the conversation |
| 54 | |
| 55 | Returns: |
| 56 | Conversation dict or None if not found |
| 57 | """ |
| 58 | path = get_conversation_path(conversation_id) |
| 59 | |
| 60 | if not os.path.exists(path): |
| 61 | return None |
| 62 | |
| 63 | with open(path, 'r') as f: |
| 64 | return json.load(f) |
| 65 | |
| 66 | |
| 67 | def save_conversation(conversation: Dict[str, Any]): |
no test coverage detected