Add README.md with documentation
This commit is contained in:
@@ -0,0 +1,76 @@
|
|||||||
|
# Mem0 Docker with Qdrant
|
||||||
|
|
||||||
|
Dockerized memory service using mem0 with Qdrant vector database for semantic memory storage.
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
1. Copy the example environment file:
|
||||||
|
```bash
|
||||||
|
cp example.env .env
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Edit `.env` with your configuration:
|
||||||
|
- `MEM0_PORT`: Port for the mem0 API
|
||||||
|
- `QDRANT_HOST`: Qdrant host (default: qdrant)
|
||||||
|
- `QDRANT_PORT`: Qdrant port (default: 6333)
|
||||||
|
- `EMBEDDING_URL`: llama.cpp embedding endpoint URL
|
||||||
|
- `EMBEDDING_DIMS`: Embedding dimension size
|
||||||
|
|
||||||
|
3. Start the services:
|
||||||
|
```bash
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
## API Endpoints
|
||||||
|
|
||||||
|
### Health Check
|
||||||
|
```
|
||||||
|
GET /health
|
||||||
|
```
|
||||||
|
|
||||||
|
### Add Memory
|
||||||
|
```
|
||||||
|
POST /add
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"message": "Memory text to store",
|
||||||
|
"user_id": "default",
|
||||||
|
"metadata": {}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Search Memories
|
||||||
|
```
|
||||||
|
POST /search
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"query": "Search query",
|
||||||
|
"user_id": "default",
|
||||||
|
"limit": 5
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Get All Memories
|
||||||
|
```
|
||||||
|
GET /memories?user_id=default
|
||||||
|
```
|
||||||
|
|
||||||
|
### Delete Memory
|
||||||
|
```
|
||||||
|
DELETE /delete/{memory_id}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Files
|
||||||
|
|
||||||
|
- `docker-compose.yml`: Docker Compose configuration
|
||||||
|
- `Dockerfile`: Container build instructions
|
||||||
|
- `main.py`: FastAPI memory API server
|
||||||
|
- `mem0_server.py`: Alternative HTTP server implementation
|
||||||
|
- `requirements.txt`: Python dependencies
|
||||||
|
- `example.env`: Environment variable template
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
The service requires an external llama.cpp embedding endpoint. Configure the `EMBEDDING_URL` to point to your embedding service.
|
||||||
Reference in New Issue
Block a user