Skip to content

Commit

Permalink
Introducing new VoyageAI models (#16150)
Browse files Browse the repository at this point in the history
  • Loading branch information
fzowl authored Sep 22, 2024
1 parent 01da176 commit 6a8a441
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/docs/examples/embeddings/voyageai.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"source": [
"# get API key and create embeddings\n",
"\n",
"model_name = \"voyage-law-2\" # Please check https://docs.voyageai.com/docs/embeddings for the available models\n",
"model_name = \"voyage-3\" # Please check https://docs.voyageai.com/docs/embeddings for the available models\n",
"voyage_api_key = os.environ.get(\"VOYAGE_API_KEY\", \"your-api-key\")\n",
"\n",
"embed_model = VoyageEmbedding(\n",
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/examples/node_postprocessor/VoyageAIRerank.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"\n",
"api_key = os.environ[\"VOYAGE_API_KEY\"]\n",
"voyageai_embeddings = VoyageEmbedding(\n",
" voyage_api_key=api_key, model_name=\"voyage-large-2\"\n",
" voyage_api_key=api_key, model_name=\"voyage-3\"\n",
")\n",
"\n",
"# load documents\n",
Expand Down Expand Up @@ -130,7 +130,7 @@
"from llama_index.postprocessor.voyageai_rerank import VoyageAIRerank\n",
"\n",
"voyageai_rerank = VoyageAIRerank(\n",
" api_key=api_key, top_k=2, model=\"rerank-lite-1\", truncation=True\n",
" api_key=api_key, top_k=2, model=\"rerank-2\", truncation=True\n",
")"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,16 @@ def __init__(
callback_manager: Optional[CallbackManager] = None,
**kwargs: Any,
):
if model_name == "voyage-01":
if model_name in [
"voyage-01",
"voyage-lite-01",
"voyage-lite-01-instruct",
"voyage-02",
"voyage-2",
"voyage-lite-02-instruct",
]:
logger.warning(
"voyage-01 is not the latest model by Voyage AI. Please note that `model_name` "
f"{model_name} is not the latest model by Voyage AI. Please note that `model_name` "
"will be a required argument in the future. We recommend setting it explicitly. Please see "
"https://docs.voyageai.com/docs/embeddings for the latest models offered by Voyage AI."
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ exclude = ["**/BUILD"]
license = "MIT"
name = "llama-index-embeddings-voyageai"
readme = "README.md"
version = "0.2.1"
version = "0.2.2"

[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
Expand Down

0 comments on commit 6a8a441

Please sign in to comment.