feat(memory): increase memory search limit for response generation
Some checks failed
Build and Push Docker / build-and-push (push) Failing after 14m50s

This commit is contained in:
gameloader
2025-10-26 17:10:10 +08:00
parent 2297ba097b
commit b88a897151

View File

@ -258,7 +258,7 @@ class Mem0Integration:
def generate_response_with_memory(self, user_input: str, user_id: str) -> Dict[str, Any]:
"""Generate a response using memories and store the interaction."""
# Step 1: Search for relevant memories
memories = self.search_memories(user_input, user_id, limit=2)
memories = self.search_memories(user_input, user_id, limit=5)
# Step 2: Prepare system prompt with memory injection
memory_block = self.format_memories_for_prompt(memories)