Skip to content

Commit

Permalink
Add qdrant API key
Browse files Browse the repository at this point in the history
  • Loading branch information
jamakase committed Sep 12, 2024
1 parent 2abb4fd commit 0e5d396
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions infra/production/files/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ services:
container_name: ml
image: cr.yandex/crpc50gkvq2bp251sfgb/ml
environment:
FAISS_INDEX_PATH: /data/faiss_index
USE_OPENROUTER: false
LLM_SOURCE: openai
QDRANT_HOST: http://qdrant:6333
OPENAI_API_KEY: ${OPENAI_API_KEY}
volumes:
- /home/yc-user/model_cache:/app/model_cache
- /home/yc-user/index_faiss:/data/faiss_index
Expand Down
1 change: 1 addition & 0 deletions services/ml/app/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Config:
PORT: int = int(os.environ.get("PORT", 8000))
QDRANT_HOST: str = os.environ.get("QDRANT_HOST", "http://localhost:6333")
QDRANT_COLLECTION_NAME: str = os.environ.get("QDRANT_COLLECTION_NAME", "test")
QDRANT_API_KEY: str = os.environ.get("QDRANT_API_KEY")
LLM_SOURCE: str = os.environ.get("LLM_SOURCE", "openai")

def __init__(self):
Expand Down
2 changes: 1 addition & 1 deletion services/ml/app/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .config import config

llm_instance = LLMInstance(config)
retriever_instance = Retriever(llm_instance.get_embeddings(), host=config.QDRANT_HOST, collection_name=config.QDRANT_COLLECTION_NAME)
retriever_instance = Retriever(llm_instance.get_embeddings(), host=config.QDRANT_HOST, collection_name=config.QDRANT_COLLECTION_NAME, api_key=config.QDRANT_API_KEY)


class InputChat(BaseModel):
Expand Down

0 comments on commit 0e5d396

Please sign in to comment.