# All comments are in English. import uuid class ChatStore: """Simple in-memory chat store with multiple conversations.""" def __init__(self): self.conversations = {} def new_conversation(self): cid = str(uuid.uuid4()) self.conversations[cid] = [] return cid def add_message(self, cid, role, content): self.conversations[cid].append({"role": role, "content": content}) def get_messages(self, cid): return self.conversations.get(cid, [])