Qdrant update to 1.1.1 & docs polishing (#2388)

This PR updates Qdrant to 1.1.1 and introduces local mode, so there is
no need to spin up the Qdrant server. By that occasion, the Qdrant
example notebooks also got updated, covering more cases and answering
some commonly asked questions. All the Qdrant's integration tests were
switched to local mode, so no Docker container is required to launch
them.
This commit is contained in:
Kacper Łukawski
2023-04-04 15:48:21 +02:00
committed by GitHub
parent 90973c10b1
commit 585f60a5aa
5 changed files with 1034 additions and 520 deletions

View File

@@ -21,7 +21,7 @@ def test_qdrant(content_payload_key: str, metadata_payload_key: str) -> None:
docsearch = Qdrant.from_texts(
texts,
FakeEmbeddings(),
host="localhost",
location=":memory:",
content_payload_key=content_payload_key,
metadata_payload_key=metadata_payload_key,
)
@@ -48,7 +48,7 @@ def test_qdrant_with_metadatas(
texts,
FakeEmbeddings(),
metadatas=metadatas,
host="localhost",
location=":memory:",
content_payload_key=content_payload_key,
metadata_payload_key=metadata_payload_key,
)
@@ -64,7 +64,7 @@ def test_qdrant_similarity_search_filters() -> None:
texts,
FakeEmbeddings(),
metadatas=metadatas,
host="localhost",
location=":memory:",
)
output = docsearch.similarity_search("foo", k=1, filter={"page": 1})
assert output == [Document(page_content="bar", metadata={"page": 1})]
@@ -89,7 +89,7 @@ def test_qdrant_max_marginal_relevance_search(
texts,
FakeEmbeddings(),
metadatas=metadatas,
host="localhost",
location=":memory:",
content_payload_key=content_payload_key,
metadata_payload_key=metadata_payload_key,
)