Skip to main content

Module embeddings

Module embeddings 

Source
Expand description

Explicit embedding split/batch calls over one selected upstream target.

Structs§

EmbeddingBatchError
Failure never presents completed partial vectors as a successful batch. completed_calls counts 2xx calls whose JSON was decoded, including one whose typed data proved invalid. A transport/body failure can have an unknown upstream outcome; this counter is not a retry authorization. completed_items counts only vectors validated before the failed call.
EmbeddingBatchOptions
EmbeddingBatchResult

Enums§

EmbeddingFailure

Functions§

gemini_batch_to_openai
Execute a Gemini embedding batch through the selected OpenAI model. Varying output dimensions are split into separate calls and returned in input order.
gemini_single_to_openai
One Gemini input through OpenAI embeddings. The selected target request carries its explicit model and declared dimensionality.
openai_to_gemini_batch
Convert an OpenAI embedding batch and call Gemini batchEmbedContents in source order. template is the selected target HTTP endpoint, never the original client request; its body is replaced and authentication is host-owned.
openai_to_gemini_single
One OpenAI input through Gemini embedContent, retaining requested encoding and validating the returned dimension and factual usage.