references updated for qdrant

This commit is contained in:
Pratik Narola 2025-09-09 13:05:16 +05:30
parent f625f8f556
commit 971548321f
3 changed files with 20 additions and 23 deletions

View file

@ -5,11 +5,9 @@ OPENAI_BASE_URL=https://your-openai-compatible-endpoint.com/v1
EMBEDDER_API_KEY=AIzaSy-your-google-gemini-api-key-here EMBEDDER_API_KEY=AIzaSy-your-google-gemini-api-key-here
# Database Configuration # Database Configuration
POSTGRES_DB=mem0_db QDRANT_HOST=qdrant
POSTGRES_USER=mem0_user QDRANT_PORT=6333
POSTGRES_PASSWORD=mem0_password QDRANT_COLLECTION_NAME=mem0
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
# Neo4j Configuration # Neo4j Configuration
NEO4J_AUTH=neo4j/mem0_neo4j_password NEO4J_AUTH=neo4j/mem0_neo4j_password
@ -36,4 +34,5 @@ EXPERT_MODEL=o3 # Expert-level comprehensive analysis
# - Ensure all models are available on your OpenAI-compatible endpoint # - Ensure all models are available on your OpenAI-compatible endpoint
# - Verify model availability: curl -H "Authorization: Bearer $API_KEY" $BASE_URL/v1/models # - Verify model availability: curl -H "Authorization: Bearer $API_KEY" $BASE_URL/v1/models
# - Neo4j must be version 5.18+ for vector.similarity.cosine() function # - Neo4j must be version 5.18+ for vector.similarity.cosine() function
# - Qdrant vector database for embeddings storage (replaces PostgreSQL+pgvector)
# - Ollama must be running locally with nomic-embed-text:latest model # - Ollama must be running locally with nomic-embed-text:latest model

View file

@ -1,12 +1,12 @@
# Mem0 Interface - Production Ready # Mem0 Interface - Production Ready
A fully operational Mem0 interface with PostgreSQL and Neo4j integration, featuring intelligent model routing, comprehensive memory management, and production-grade monitoring. A fully operational Mem0 interface with Qdrant and Neo4j integration, featuring intelligent model routing, comprehensive memory management, and production-grade monitoring.
## Features ## Features
### Core Memory System ### Core Memory System
- ✅ **Mem0 OSS Integration**: Complete hybrid datastore (Vector + Graph + KV storage) - ✅ **Mem0 OSS Integration**: Complete hybrid datastore (Vector + Graph + KV storage)
- ✅ **PostgreSQL + pgvector**: High-performance vector embeddings storage - ✅ **Qdrant**: Purpose-built vector database for high-performance embeddings storage
- ✅ **Neo4j 5.18**: Graph relationships with native vector similarity functions - ✅ **Neo4j 5.18**: Graph relationships with native vector similarity functions
- ✅ **Google Gemini Embeddings**: Enterprise-grade embedding generation - ✅ **Google Gemini Embeddings**: Enterprise-grade embedding generation
- ✅ **Memory Operations**: Store, search, update, delete memories with semantic search - ✅ **Memory Operations**: Store, search, update, delete memories with semantic search
@ -62,7 +62,7 @@ curl http://localhost:8000/health
### Core Components ### Core Components
- **FastAPI Backend**: Production-ready API with comprehensive monitoring - **FastAPI Backend**: Production-ready API with comprehensive monitoring
- **Mem0 OSS**: Hybrid memory management (vector + graph + key-value) - **Mem0 OSS**: Hybrid memory management (vector + graph + key-value)
- **PostgreSQL + pgvector**: Vector embeddings storage and similarity search - **Qdrant**: Purpose-built vector database for embeddings storage and similarity search
- **Neo4j 5.18**: Graph relationships with native vector functions - **Neo4j 5.18**: Graph relationships with native vector functions
- **Google Gemini**: Enterprise-grade embedding generation - **Google Gemini**: Enterprise-grade embedding generation
@ -203,13 +203,13 @@ curl http://localhost:8000/graph/relationships/alice
### Service Dependencies ### Service Dependencies
- **Neo4j**: Must start before backend for vector functions - **Neo4j**: Must start before backend for vector functions
- **PostgreSQL**: Required for vector storage initialization - **Qdrant**: Required for vector storage initialization
- **Ollama**: Must be running locally on port 11434 - **Ollama**: Must be running locally on port 11434
- **API Endpoint**: Must have valid models available - **API Endpoint**: Must have valid models available
## Production Notes ## Production Notes
- **Memory Usage**: Neo4j and PostgreSQL require adequate RAM for vector operations - **Memory Usage**: Neo4j and Qdrant require adequate RAM for vector operations
- **API Rate Limits**: Monitor usage on custom endpoint - **API Rate Limits**: Monitor usage on custom endpoint
- **Data Persistence**: All data stored in Docker volumes - **Data Persistence**: All data stored in Docker volumes
- **Scaling**: Individual services can be scaled independently - **Scaling**: Individual services can be scaled independently

View file

@ -9,7 +9,7 @@ A production-ready FastAPI backend that provides intelligent memory integration
1. **Mem0Manager** (`mem0_manager.py`) 1. **Mem0Manager** (`mem0_manager.py`)
- Central orchestration of memory operations - Central orchestration of memory operations
- Integration with custom OpenAI-compatible endpoint - Integration with custom OpenAI-compatible endpoint
- Memory persistence across PostgreSQL and Neo4j - Memory persistence across Qdrant and Neo4j
- Performance timing and operation tracking - Performance timing and operation tracking
2. **Configuration System** (`config.py`) 2. **Configuration System** (`config.py`)
@ -39,8 +39,8 @@ A production-ready FastAPI backend that provides intelligent memory integration
``` ```
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
PostgreSQL │ │ Neo4j │ │ Custom LLM │ Qdrant │ │ Neo4j │ │ Custom LLM │
(pgvector) │ │ (APOC) │ │ Endpoint │ (Vector DB) │ │ (APOC) │ │ Endpoint │
├─────────────────┤ ├─────────────────┤ ├─────────────────┤ ├─────────────────┤ ├─────────────────┤ ├─────────────────┤
│ • Vector Store │ │ • Graph Store │ │ • claude-sonnet-4│ │ • Vector Store │ │ • Graph Store │ │ • claude-sonnet-4│
│ • Embeddings │ │ • Relationships │ │ • Gemini Embed │ │ • Embeddings │ │ • Relationships │ │ • Gemini Embed │
@ -134,11 +134,9 @@ backend/
| `OPENAI_COMPAT_API_KEY` | Your custom endpoint API key | - | ✅ | | `OPENAI_COMPAT_API_KEY` | Your custom endpoint API key | - | ✅ |
| `OPENAI_BASE_URL` | Custom endpoint URL | - | ✅ | | `OPENAI_BASE_URL` | Custom endpoint URL | - | ✅ |
| `EMBEDDER_API_KEY` | Google Gemini API key for embeddings | - | ✅ | | `EMBEDDER_API_KEY` | Google Gemini API key for embeddings | - | ✅ |
| `POSTGRES_HOST` | PostgreSQL host | postgres | ✅ | | `QDRANT_HOST` | Qdrant vector database host | qdrant | ✅ |
| `POSTGRES_PORT` | PostgreSQL port | 5432 | ✅ | | `QDRANT_PORT` | Qdrant vector database port | 6333 | ✅ |
| `POSTGRES_DB` | Database name | mem0_db | ✅ | | `QDRANT_COLLECTION_NAME` | Qdrant collection name | mem0 | ✅ |
| `POSTGRES_USER` | Database user | mem0_user | ✅ |
| `POSTGRES_PASSWORD` | Database password | - | ✅ |
| `NEO4J_URI` | Neo4j connection URI | bolt://neo4j:7687 | ✅ | | `NEO4J_URI` | Neo4j connection URI | bolt://neo4j:7687 | ✅ |
| `NEO4J_USERNAME` | Neo4j username | neo4j | ✅ | | `NEO4J_USERNAME` | Neo4j username | neo4j | ✅ |
| `NEO4J_PASSWORD` | Neo4j password | - | ✅ | | `NEO4J_PASSWORD` | Neo4j password | - | ✅ |
@ -283,7 +281,7 @@ docker exec mem0-neo4j cypher-shell -u neo4j -p mem0_neo4j_password \
### Key Integration Points Verified ### Key Integration Points Verified
- ✅ **Ollama Embeddings**: nomic-embed-text:latest working for vector generation - ✅ **Ollama Embeddings**: nomic-embed-text:latest working for vector generation
- ✅ **PostgreSQL + pgvector**: Vector storage and similarity search operational - ✅ **Qdrant**: Vector storage and similarity search operational
- ✅ **Neo4j 5.18**: Graph relationships and native vector functions working - ✅ **Neo4j 5.18**: Graph relationships and native vector functions working
- ✅ **Custom LLM Endpoint**: All 4 models accessible and routing correctly - ✅ **Custom LLM Endpoint**: All 4 models accessible and routing correctly
- ✅ **Memory Persistence**: Data survives container restarts via Docker volumes - ✅ **Memory Persistence**: Data survives container restarts via Docker volumes
@ -390,7 +388,7 @@ backend:
#### Dependency Requirements #### Dependency Requirements
- Neo4j 5.18+ (for vector.similarity.cosine function) - Neo4j 5.18+ (for vector.similarity.cosine function)
- Ollama running locally with nomic-embed-text:latest - Ollama running locally with nomic-embed-text:latest
- PostgreSQL with pgvector extension - Qdrant vector database
- Valid API keys for custom LLM endpoint - Valid API keys for custom LLM endpoint
### Debugging Commands ### Debugging Commands