chore(memory): add debug logs for memory search results
Some checks failed
Build and Push Docker / build-and-push (push) Has been cancelled

This commit is contained in:
gameloader
2025-10-12 17:45:54 +08:00
parent 78cb5cd21d
commit 3ef3b9449a

View File

@ -38,12 +38,15 @@ In your response, consider the memories above to provide a personalized answer."
) )
# Debug: Print the actual format of results # Debug: Print the actual format of results
print(f"[DEBUG] Search results type: {type(results)}") print(f"[DEBUG] Search results type: {type(results)}")
print(f"[DEBUG] Search results content: {results}")
if isinstance(results, dict): if isinstance(results, dict):
# Handle dictionary response format (based on official docs) # Handle dictionary response format (based on official docs)
memories = results.get("memories", []) memories = results.get("memories", [])
if memories: if memories:
print(f"[DEBUG] First memory type: {type(memories[0])}") print(f"[DEBUG] First memory type: {type(memories[0])}")
print(f"[DEBUG] First memory: {memories[0]}") print(f"[DEBUG] First memory: {memories[0]}")
else:
print(f"[DEBUG] No memories found in search results")
return memories return memories
elif isinstance(results, list): elif isinstance(results, list):
# Handle list response format # Handle list response format