diff --git a/llama-index-integrations/indices/llama-index-indices-managed-llama-cloud/llama_index/indices/managed/llama_cloud/retriever.py b/llama-index-integrations/indices/llama-index-indices-managed-llama-cloud/llama_index/indices/managed/llama_cloud/retriever.py index a8af0f6858ba6384a591d32801d58e006b95be6a..7567cdc8a0a81635dfcf39b366ebee828f690547 100644 --- a/llama-index-integrations/indices/llama-index-indices-managed-llama-cloud/llama_index/indices/managed/llama_cloud/retriever.py +++ b/llama-index-integrations/indices/llama-index-indices-managed-llama-cloud/llama_index/indices/managed/llama_cloud/retriever.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Optional +from typing import Any, List, Optional from llama_index_client import TextNodeWithScore from llama_index_client.resources.pipeline.client import OMIT, PipelineType @@ -7,6 +7,7 @@ from llama_index.core.base.base_retriever import BaseRetriever from llama_index.core.constants import DEFAULT_PROJECT_NAME from llama_index.core.ingestion.api_utils import get_aclient, get_client from llama_index.core.schema import NodeWithScore, QueryBundle, TextNode +from llama_index.core.vector_stores.types import MetadataFilters class LlamaCloudRetriever(BaseRetriever): @@ -19,7 +20,7 @@ class LlamaCloudRetriever(BaseRetriever): enable_reranking: Optional[bool] = None, rerank_top_n: Optional[int] = None, alpha: Optional[float] = None, - search_filters: Optional[Dict[str, List[Any]]] = None, + filters: Optional[MetadataFilters] = None, api_key: Optional[str] = None, base_url: Optional[str] = None, app_url: Optional[str] = None, @@ -41,7 +42,7 @@ class LlamaCloudRetriever(BaseRetriever): self._enable_reranking = enable_reranking or OMIT self._rerank_top_n = rerank_top_n or OMIT self._alpha = alpha or OMIT - self._search_filters = search_filters or OMIT + self._filters = filters or OMIT super().__init__( callback_manager=kwargs.get("callback_manager", None), @@ -89,7 +90,7 @@ class LlamaCloudRetriever(BaseRetriever): enable_reranking=self._enable_reranking, rerank_top_n=self._rerank_top_n, alpha=self._alpha, - search_filters=self._search_filters, + search_filters=self._filters, ) result_nodes = results.retrieval_nodes @@ -127,7 +128,7 @@ class LlamaCloudRetriever(BaseRetriever): enable_reranking=self._enable_reranking, rerank_top_n=self._rerank_top_n, alpha=self._alpha, - search_filters=self._search_filters, + search_filters=self._filters, ) result_nodes = results.retrieval_nodes diff --git a/llama-index-integrations/indices/llama-index-indices-managed-llama-cloud/pyproject.toml b/llama-index-integrations/indices/llama-index-indices-managed-llama-cloud/pyproject.toml index 02fa362ac8df26aea5399732731c0af117de0d07..7a4cbd3d252c4773c05cfed5badf59976f68f417 100644 --- a/llama-index-integrations/indices/llama-index-indices-managed-llama-cloud/pyproject.toml +++ b/llama-index-integrations/indices/llama-index-indices-managed-llama-cloud/pyproject.toml @@ -30,12 +30,12 @@ exclude = ["**/BUILD"] license = "MIT" name = "llama-index-indices-managed-llama-cloud" readme = "README.md" -version = "0.1.5" +version = "0.1.6" [tool.poetry.dependencies] python = ">=3.8.1,<4.0" llama-index-core = "^0.10.0" -llamaindex-py-client = "^0.1.13" +llamaindex-py-client = "^0.1.19" [tool.poetry.group.dev.dependencies] ipython = "8.10.0"