Make qdrant the default vector db (#1285)

* Make qdrant the default vector db

---------

Co-authored-by: Pablo Orgaz <pabloogc@gmail.com>
Co-authored-by: lopagela <lpglm@orange.fr>
This commit is contained in:
Iván Martínez 2023-11-20 16:19:22 +01:00 committed by GitHub
parent f1cbff0fb7
commit 510caa576b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 122 additions and 91 deletions

18
tests/fixtures/auto_close_qdrant.py vendored Normal file
View file

@ -0,0 +1,18 @@
import pytest
from private_gpt.components.vector_store.vector_store_component import (
VectorStoreComponent,
)
from tests.fixtures.mock_injector import MockInjector
@pytest.fixture(autouse=True)
def _auto_close_vector_store_client(injector: MockInjector) -> None:
"""Auto close VectorStore client after each test.
VectorStore client (qdrant/chromadb) opens a connection the
Database that causes issues when running tests too fast,
so close explicitly after each test.
"""
yield
injector.get(VectorStoreComponent).close()