Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
from haystack.utils import Secret | |
from haystack_integrations.document_stores.qdrant import QdrantDocumentStore | |
from src.settings import settings | |
def get_index(index: str = "document") -> QdrantDocumentStore: | |
return QdrantDocumentStore( | |
url=settings.qdrant_database.url, | |
api_key=Secret.from_env_var("QDRANT_DATABASE__API_KEY"), | |
index=index, | |
embedding_dim=settings.qdrant_database.embedding_dim, | |
similarity="cosine", | |
recreate_index=False, | |
wait_result_from_api=True, | |
return_embedding=True, | |
) | |