From 8ecc02a8ad8b7fea7a72fd37bd29f548b01025bf Mon Sep 17 00:00:00 2001 From: Arian Tashakkor Date: Thu, 19 Dec 2024 01:33:37 +0330 Subject: [PATCH] VoyageAI Reranker optional API Key (#17310) --- .../llama_index/postprocessor/voyageai_rerank/base.py | 2 +- .../llama-index-postprocessor-voyageai-rerank/pyproject.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/llama-index-integrations/postprocessor/llama-index-postprocessor-voyageai-rerank/llama_index/postprocessor/voyageai_rerank/base.py b/llama-index-integrations/postprocessor/llama-index-postprocessor-voyageai-rerank/llama_index/postprocessor/voyageai_rerank/base.py index 090a91de9a7b9..7a6cf670b39f0 100644 --- a/llama-index-integrations/postprocessor/llama-index-postprocessor-voyageai-rerank/llama_index/postprocessor/voyageai_rerank/base.py +++ b/llama-index-integrations/postprocessor/llama-index-postprocessor-voyageai-rerank/llama_index/postprocessor/voyageai_rerank/base.py @@ -26,8 +26,8 @@ class VoyageAIRerank(BaseNodePostprocessor): def __init__( self, - api_key: str, model: str, + api_key: Optional[str] = None, top_n: Optional[int] = None, truncation: Optional[bool] = None, # deprecated diff --git a/llama-index-integrations/postprocessor/llama-index-postprocessor-voyageai-rerank/pyproject.toml b/llama-index-integrations/postprocessor/llama-index-postprocessor-voyageai-rerank/pyproject.toml index 7f1d23dbc9af2..d15dd97efe8f9 100644 --- a/llama-index-integrations/postprocessor/llama-index-postprocessor-voyageai-rerank/pyproject.toml +++ b/llama-index-integrations/postprocessor/llama-index-postprocessor-voyageai-rerank/pyproject.toml @@ -30,11 +30,11 @@ license = "MIT" name = "llama-index-postprocessor-voyageai-rerank" packages = [{include = "llama_index/"}] readme = "README.md" -version = "0.3.0" +version = "0.3.1" [tool.poetry.dependencies] python = ">=3.9,<4.0" -voyageai = "^0.2.1" +voyageai = {python = ">=3.9,<3.13", version = ">=0.3.2,<0.4.0"} llama-index-core = "^0.12.0" [tool.poetry.group.dev.dependencies]