Search with user id is not woking? #1997
Unanswered
arunvenkat1911
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Search method is not giving me the saved data when re run the code. But the data is there on db file.
related_memories = m.search(query="where is Alice located?", user_id="alice")
Please assist.
But this search with memory id is working.
history = m.history(memory_id="61affbb1-13a2-40d5-ae39-2d2e2da7d1d5")
Below is the full code:
**from dotenv import load_dotenv
import os
import sqlite3
load_dotenv()
from mem0 import Memory
history_db_path = "history.db" # Ensure the path is correct
Configuration
config = {
"llm": {
"provider": "openai",
"config": {
"model": "gpt-4o-mini",
"temperature": 0.2,
"max_tokens": 1500,
}
},
"history_db_path": history_db_path
}
m = Memory.from_config(config)
Search memory
related_memories = m.search(query="where is Alice located?", user_id="alice")**
Arun.
Beta Was this translation helpful? Give feedback.
All reactions