docs: fix search method return value handling in integration and example docs (#3208)
This commit is contained in:
@@ -68,7 +68,7 @@ def chatbot(state: State):
|
||||
memories = mem0.search(messages[-1].content, user_id=user_id)
|
||||
|
||||
context = "Relevant information from previous conversations:\n"
|
||||
for memory in memories:
|
||||
for memory in memories.get('results', []):
|
||||
context += f"- {memory['memory']}\n"
|
||||
|
||||
system_message = SystemMessage(content=f"""You are a helpful customer support assistant. Use the provided context to personalize your responses and remember user preferences and past interactions.
|
||||
|
||||
Reference in New Issue
Block a user