-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I get the answer without adding memory again? #1976
Comments
Hi @water-in-stone , It looks like you are not persisting your vector store. It means that the vector store configuration that you are using currently:
will create a temporary collection in
and then use these configurations:
|
Good answer! I will use configurations you provided. |
@spike-spiegel-21 Due to some complex reasons, I cannot use Docker. How can I use a local Qdrant database without Docker? |
Hey there! I've got a solid solution to help you persist your Qdrant vector store memories locally without Docker. 🚀 Based on the issue search and documentation, here's a robust approach to local storage:
import os
# Create a persistent storage directory
QDRANT_STORAGE_PATH = os.path.join(os.path.dirname(__file__), 'qdrant_storage')
os.makedirs(QDRANT_STORAGE_PATH, exist_ok=True)
config = {
"llm": {...}, # Your existing LLM configuration
"embedder": {...}, # Your existing embedder configuration
"vector_store": {
"provider": "qdrant",
"config": {
"collection_name": "test",
"embedding_model_dims": 3072,
"path": QDRANT_STORAGE_PATH, # Persistent local storage
"host": "localhost", # Optional: explicitly set host
"port": 6333, # Optional: standard Qdrant port
},
},
"version": "v1.1",
}
import requests
# Create a snapshot (you might want to add this as a method in your class)
def create_qdrant_snapshot(host='localhost', port=6333):
response = requests.post(f'http://{host}:{port}/snapshots')
if response.status_code == 200:
print("Snapshot created successfully!")
else:
print("Snapshot creation failed.")
🌟 Pro Tip: Regularly backup your Let me know if this works for you or if you need any further customization! Happy coding! 👨💻 |
Thanks a lot! |
🐛 Describe the bug
My source code is shown above and stored in a file named 'agent.py'. I can input a question and get the correct answer after I execute python agent.py. However, I cannot get the correct answer when I execute agent.py again with the same question. Is Mem0 only able to store data in memory and not on the hard disk?
The text was updated successfully, but these errors were encountered: