VoyageEmbeddings
class uses the Voyage AI REST API to generate embeddings for a given text.
The inputType
parameter allows you to specify the type of input text for better embedding results. You can set it to query
, document
, or leave it undefined (which is equivalent to None
).
query
: Use this for search or retrieval queries. Voyage AI will prepend a prompt to optimize the embeddings for query use cases.document
: Use this for documents or content that you want to be retrievable. Voyage AI will prepend a prompt to optimize the embeddings for document use cases.None
(default): The input text will be directly encoded without any additional prompt."float"
or "int8"
."float"
, "base64"
, or "ubinary"
.