diff --git a/Dockerfile.qdrant b/Dockerfile.qdrant new file mode 100644 index 00000000..9e3b3934 --- /dev/null +++ b/Dockerfile.qdrant @@ -0,0 +1,3 @@ +FROM qdrant/qdrant:latest + +RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* \ No newline at end of file diff --git a/apps/docs/docs/using_rag.md b/apps/docs/docs/using_rag.md index cf0a2e97..a6094652 100644 --- a/apps/docs/docs/using_rag.md +++ b/apps/docs/docs/using_rag.md @@ -80,6 +80,18 @@ By default, Rowboat uses OpenAI's `text-embedding-3-small` model for generating ```bash # Override the default embedding model export EMBEDDING_MODEL=your-preferred-model +export EMBEDDING_VECTOR_SIZE=1536 +``` + +**Important NOTE** + +The default size for the vectors index is 1536. If you change this value, then you must delete the index and set it up again: +```bash +docker-compose --profile delete_qdrant --profile qdrant up --build delete_qdrant qdrant +``` +followed by: +```bash +./start # this will recreate the index ``` You can also change the model provider like so: diff --git a/docker-compose.yml b/docker-compose.yml index 41a7acee..66d53cbe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -113,6 +113,9 @@ services: dockerfile: scripts.Dockerfile command: ["sh", "-c", "npm run setupQdrant"] profiles: [ "setup_qdrant" ] + depends_on: + qdrant: + condition: service_healthy environment: - QDRANT_URL=http://qdrant:6333 - QDRANT_API_KEY=${QDRANT_API_KEY} @@ -125,6 +128,9 @@ services: dockerfile: scripts.Dockerfile command: ["sh", "-c", "npm run deleteQdrant"] profiles: [ "delete_qdrant" ] + depends_on: + qdrant: + condition: service_healthy environment: - QDRANT_URL=http://qdrant:6333 - QDRANT_API_KEY=${QDRANT_API_KEY} @@ -240,7 +246,9 @@ services: # restart: unless-stopped qdrant: - image: qdrant/qdrant + build: + context: . + dockerfile: Dockerfile.qdrant ports: - "6333:6333" environment: @@ -249,3 +257,8 @@ services: profiles: [ "qdrant" ] volumes: - ./data/qdrant:/data/qdrant + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:6333/healthz"] + interval: 5s + timeout: 10s + retries: 3