Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix security problem #673

Merged
merged 5 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading