Skip to content

Commit

Permalink
Fix security issue (#673)
Browse files Browse the repository at this point in the history
Signed-off-by: XuhuiRen <[email protected]>
  • Loading branch information
XuhuiRen authored Sep 11, 2024
1 parent cff0a4d commit a672569
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion comps/retrievers/qdrant/haystack/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
docarray[full]
easyocr
fastapi
haystack-ai==2.2.4
haystack-ai==2.3.1
langchain_community
opentelemetry-api
opentelemetry-exporter-otlp
Expand Down
4 changes: 2 additions & 2 deletions comps/retrievers/qdrant/haystack/retriever_qdrant.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import os

from haystack.components.embedders import HuggingFaceTEITextEmbedder, SentenceTransformersTextEmbedder
from haystack.components.embedders import HuggingFaceAPITextEmbedder, SentenceTransformersTextEmbedder
from haystack_integrations.components.retrievers.qdrant import QdrantEmbeddingRetriever
from haystack_integrations.document_stores.qdrant import QdrantDocumentStore
from qdrant_config import EMBED_DIMENSION, EMBED_ENDPOINT, EMBED_MODEL, INDEX_NAME, QDRANT_HOST, QDRANT_PORT
Expand Down Expand Up @@ -46,7 +46,7 @@ def retrieve(input: EmbedDoc) -> SearchedDoc:
if __name__ == "__main__":
if EMBED_ENDPOINT:
# create embeddings using TEI endpoint service
embedder = HuggingFaceTEITextEmbedder(url=EMBED_ENDPOINT)
embedder = HuggingFaceAPITextEmbedder(api_type="text_embeddings_inference", api_params={"url": EMBED_ENDPOINT})
else:
# create embeddings using local embedding model
embedder = SentenceTransformersTextEmbedder(model=EMBED_MODEL)
Expand Down

0 comments on commit a672569

Please sign in to comment.