Skip to main content

Module embeddings

Module embeddings 

Source
Expand description

Typed OpenAI/Gemini embedding conversions.

Base64 vectors use the OpenAI embedding wire convention: consecutive IEEE-754 binary32 values encoded in little-endian byte order. JSON base64 strings are never treated as vector text.

Structs§

EmbeddingResponseContext
Request-derived facts kept outside the vendor wire. Response model defaults to the actual selected upstream; an alias policy belongs to the host.
OpenAiResponseSupplement
OpenAiUsageFacts
PreparedEmbedding
A converted Gemini request and the OpenAI response facts captured before consuming its source request. Keep response until the upstream completes; this preserves the requested encoding, model identities and expected shape.

Functions§

gemini_batch_response_to_openai
gemini_batch_to_openai
gemini_single_response_to_openai
gemini_single_to_openai
openai_batch_response_to_gemini
openai_single_response_to_gemini
openai_to_gemini_batch
openai_to_gemini_single