diff --git a/llama-index-integrations/vector_stores/llama-index-vector-stores-weaviate/llama_index/vector_stores/weaviate/base.py b/llama-index-integrations/vector_stores/llama-index-vector-stores-weaviate/llama_index/vector_stores/weaviate/base.py index 18ae4bc7d9a8f563f1405818f242920a116ca8dd..50c017efcf055b06227ae59fac38ce190a39f2ce 100644 --- a/llama-index-integrations/vector_stores/llama-index-vector-stores-weaviate/llama_index/vector_stores/weaviate/base.py +++ b/llama-index-integrations/vector_stores/llama-index-vector-stores-weaviate/llama_index/vector_stores/weaviate/base.py @@ -354,6 +354,7 @@ class WeaviateVectorStore(BasePydanticVectorStore): return_metadata=return_metatada, return_properties=all_properties, include_vector=True, + **kwargs, ) except weaviate.exceptions.WeaviateQueryError as e: raise ValueError(f"Invalid query, got errors: {e.message}") diff --git a/llama-index-integrations/vector_stores/llama-index-vector-stores-weaviate/pyproject.toml b/llama-index-integrations/vector_stores/llama-index-vector-stores-weaviate/pyproject.toml index 5f8434d92cce6102e83e3f836638edb3829630ed..7a8d9561f23dd3021535d9ab10e19d64933e1f0d 100644 --- a/llama-index-integrations/vector_stores/llama-index-vector-stores-weaviate/pyproject.toml +++ b/llama-index-integrations/vector_stores/llama-index-vector-stores-weaviate/pyproject.toml @@ -27,7 +27,7 @@ exclude = ["**/BUILD"] license = "MIT" name = "llama-index-vector-stores-weaviate" readme = "README.md" -version = "1.1.3" +version = "1.1.4" [tool.poetry.dependencies] python = ">=3.8.1,<4.0" diff --git a/llama-index-integrations/vector_stores/llama-index-vector-stores-weaviate/tests/test_vector_stores_weaviate.py b/llama-index-integrations/vector_stores/llama-index-vector-stores-weaviate/tests/test_vector_stores_weaviate.py index 335a6e5a1da9b383ddc1264308dbc9d7eec064c5..6cbbeef89ca9b4ffb9537c06f13cab38a9327b42 100644 --- a/llama-index-integrations/vector_stores/llama-index-vector-stores-weaviate/tests/test_vector_stores_weaviate.py +++ b/llama-index-integrations/vector_stores/llama-index-vector-stores-weaviate/tests/test_vector_stores_weaviate.py @@ -61,3 +61,18 @@ def test_hybrid_search(vector_store): assert results.nodes[1].text == "This is a test." assert results.similarities[0] > results.similarities[1] + + +def test_query_kwargs(vector_store): + query = VectorStoreQuery( + query_embedding=[0.0, 0.3, 0.0], + similarity_top_k=2, + query_str="world", + mode=VectorStoreQueryMode.HYBRID, + ) + + results = vector_store.query( + query, + max_vector_distance=0.0, + ) + assert len(results.nodes) == 0