Skip to content

Commit

Permalink
Update deployment guide to work locally
Browse files Browse the repository at this point in the history
  • Loading branch information
bukosabino committed Mar 22, 2024
1 parent 7fa9729 commit b04b144
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
3 changes: 3 additions & 0 deletions config/qdrant_local.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
service:
api_key: 823e071f67c198cc05c73f8bd4580865e6a8819a1f3fe57d2cd49b5c892a5233
read_only_api_key: d1aab4f05ae4fd7f4e4b8d9e5924469494ebb7897aed46cf2b0df0915410e0b0
8 changes: 3 additions & 5 deletions doc/deployment_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ docker pull qdrant/qdrant
### Run the service:

```
docker run -p 6333:6333 -p 6334:6334 \
-v $(pwd)/qdrant_storage:/qdrant/storage:z \
qdrant/qdrant
docker run -p 6333:6333 -p 6334:6334 -v $(pwd)/justicio/config/qdrant_local.yaml:/qdrant/config/production.yaml -v $(pwd)/qdrant_storage:/qdrant/storage:z qdrant/qdrant
```

* REST API: localhost:6333
Expand Down Expand Up @@ -50,8 +48,8 @@ export SENDGRID_API_KEY=<your_sendgrid_api_key>
export OPENAI_API_KEY=<your_open_api_key>
export TOKENIZERS_PARALLELISM=false
export TAVILY_API_KEY=""
export QDRANT_API_KEY=""
export QDRANT_API_URL="http://0.0.0.0:6333"
export QDRANT_API_KEY="823e071f67c198cc05c73f8bd4580865e6a8819a1f3fe57d2cd49b5c892a5233"
export QDRANT_API_URL="http://localhost:6333"
```

### Add some vector to the vector database
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ schedule==1.2.1
langchain==0.0.305
# langchainplus-sdk==0.0.20
langsmith==0.0.41
qdrant-client==1.5.4
qdrant-client==1.8.0
supabase==1.0.2
pinecone-client==2.2.2
sentence_transformers==2.2.2
Expand Down
4 changes: 2 additions & 2 deletions src/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ def _init_openai_client():
return client


def _exists_collection(client, collection_name):
def _exists_collection(qdrant_client, collection_name):
logger = lg.getLogger(_exists_collection.__name__)
try:
client.get_collection(collection_name=collection_name)
qdrant_client.get_collection(collection_name=collection_name)
return True
except:
logger.warn("Collection [%s] doesn't exist", collection_name)
Expand Down

0 comments on commit b04b144

Please sign in to comment.