docs: fix search method return value handling in integration and example docs (#3208)

This commit is contained in:
cnScarb
2025-08-11 12:16:01 -05:00
committed by GitHub
parent 2307dc8613
commit c2792c6558
15 changed files with 25 additions and 25 deletions
+1 -1
View File
@@ -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.