ractogateway.rag.embedders.voyage_embedder
Voyage AI embedding provider (Anthropic-aligned, best for Claude RAG).
Install with: pip install ractogateway[rag-voyage]
- class ractogateway.rag.embedders.voyage_embedder.VoyageEmbedder(model='voyage-3', *, api_key=None, input_type='document', batch_size=128)[source]
Bases:
BaseEmbedderEmbed texts using the Voyage AI API.
Voyage AI embeddings are optimised for Anthropic Claude RAG pipelines and are the recommended choice when using Claude as the generation LLM.
- Parameters:
model (
str) – Voyage model name (default"voyage-3").api_key (
str|None) – Voyage API key. Falls back toVOYAGE_API_KEYenv var.input_type (
str|None) –"query"for queries,"document"for documents to index. Using the correct type improves retrieval quality.batch_size (
int) – Maximum texts per API call.
- property dimension: int
Dimensionality of the embedding vectors.
Returns
-1if not known until after the first call.
- embed(texts)[source]
Embed texts synchronously.