MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / parse_messages

Function parse_messages

methods/mem0/memory/utils.py:10–19  ·  view source on GitHub ↗
(messages)

Source from the content-addressed store, hash-verified

8
9
10def parse_messages(messages):
11 response = ""
12 for msg in messages:
13 if msg["role"] == "system":
14 response += f"system: {msg['content']}\n"
15 if msg["role"] == "user":
16 response += f"user: {msg['content']}\n"
17 if msg["role"] == "assistant":
18 response += f"assistant: {msg['content']}\n"
19 return response
20
21
22def format_entities(entities):

Callers 1

_add_to_vector_storeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected