MCPcopy
hub / github.com/karpathy/llm-council / get_conversation

Function get_conversation

backend/storage.py:48–64  ·  view source on GitHub ↗

Load a conversation from storage. Args: conversation_id: Unique identifier for the conversation Returns: Conversation dict or None if not found

(conversation_id: str)

Source from the content-addressed store, hash-verified

46
47
48def 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
67def save_conversation(conversation: Dict[str, Any]):

Callers 3

add_user_messageFunction · 0.70
add_assistant_messageFunction · 0.70

Calls 1

get_conversation_pathFunction · 0.85

Tested by

no test coverage detected