langchain/libs/partners/voyageai
Omri Eliyahu Levy f8883a1321
partners/voyageai: enable setting output dimension (#28740)
Voyage has introduced voyage-3-large and voyage-code-3, which feature
different output dimensions by leveraging a technique called "Matryoshka
Embeddings" (see blog -
https://blog.voyageai.com/2024/12/04/voyage-code-3/).
These two models are available in various sizes: [256, 512, 1024, 2048]
(https://docs.voyageai.com/docs/embeddings#model-choices).

This PR adds the option to set the required output dimension.
2024-12-17 10:02:00 -05:00
..
langchain_voyageai partners/voyageai: enable setting output dimension (#28740) 2024-12-17 10:02:00 -05:00
scripts multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
tests partners/voyageai: enable setting output dimension (#28740) 2024-12-17 10:02:00 -05:00
.gitignore voyageai[patch]: init package (#19098) 2024-03-15 00:56:10 +00:00
LICENSE voyageai[patch]: init package (#19098) 2024-03-15 00:56:10 +00:00
Makefile standard-tests[patch]: add Ser/Des test 2024-09-04 10:24:06 -07:00
poetry.lock partners/voyageai: enable setting output dimension (#28740) 2024-12-17 10:02:00 -05:00
pyproject.toml partners/voyageai: enable setting output dimension (#28740) 2024-12-17 10:02:00 -05:00
README.md voyageai[patch]: init package (#19098) 2024-03-15 00:56:10 +00:00

langchain-voyageai

This package contains the LangChain integrations for VoyageAI through their voyageai client package.

Installation and Setup

  • Install the LangChain partner package
pip install langchain-voyageai
  • Get an VoyageAI api key and set it as an environment variable (VOYAGE_API_KEY) or use the API key as a parameter in the Client.

Text Embedding Model

See a usage example

from langchain_voyageai import VoyageAIEmbeddings