Sibling protocol to llm.sdk.transport/Transport, scoped to embedding endpoints. The first non-chat modality.
We keep this protocol narrow on purpose. Embeddings don't stream, don't take tool calls, and don't carry reasoning — bolting them onto the chat Transport protocol would dilute both. New modalities (image, audio) get their own narrow protocols too.
Sibling protocol to llm.sdk.transport/Transport, scoped to embedding endpoints. The first non-chat modality. We keep this protocol narrow on purpose. Embeddings don't stream, don't take tool calls, and don't carry reasoning — bolting them onto the chat Transport protocol would dilute both. New modalities (image, audio) get their own narrow protocols too.
(decode-float32-base64 encoded)Decode a Base64-encoded little-endian IEEE 754 float32 vector.
Throws ExceptionInfo when encoded is not valid Base64 or the decoded
byte count is not a whole number of float32 values.
Decode a Base64-encoded little-endian IEEE 754 float32 vector. Throws ExceptionInfo when `encoded` is not valid Base64 or the decoded byte count is not a whole number of float32 values.
Provider-specific embedding format conversion.
Provider-specific embedding format conversion.
(build-embed-request this profile request)Given a provider profile and canonical EmbedRequest, return the native HTTP request map (:method :url :headers :body).
Given a provider profile and canonical EmbedRequest, return the native HTTP request map (:method :url :headers :body).
(normalize-embed-usage this profile raw-usage)Given the embedding-response usage block, return the canonical Usage shape (no completion / reasoning tokens).
Given the embedding-response usage block, return the canonical Usage shape (no completion / reasoning tokens).
(parse-embed-error this profile status body)Given a non-2xx HTTP status and body, return a classified error map (same shape as the chat-side classifier).
Given a non-2xx HTTP status and body, return a classified error map (same shape as the chat-side classifier).
(parse-embed-response this profile raw-body)Given a provider profile and the parsed JSON body of an embedding response, return a canonical EmbedResponse.
Given a provider profile and the parsed JSON body of an embedding response, return a canonical EmbedResponse.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |