Sycophant.EmbeddingRequest
(sycophant v0.4.2)
Copy Markdown
Input struct for embedding requests.
Each element in inputs produces one embedding vector. Elements can be
plain text strings, image content parts, or mixed lists.
Examples
# Text embeddings
%Sycophant.EmbeddingRequest{
inputs: ["Hello world", "Goodbye world"],
model: "amazon_bedrock:cohere.embed-english-v3"
}
# With parameters
%Sycophant.EmbeddingRequest{
inputs: ["Hello world"],
model: "amazon_bedrock:cohere.embed-english-v3",
params: %Sycophant.EmbeddingParams{dimensions: 256, embedding_types: [:float, :int8]}
}
Summary
Functions
Reconstructs an EmbeddingRequest struct from a serialized map.
Types
@type input() :: String.t() | Sycophant.Message.Content.Image.t() | [String.t() | Sycophant.Message.Content.Image.t()]
@type t() :: %Sycophant.EmbeddingRequest{ inputs: [input()], model: String.t(), params: Sycophant.EmbeddingParams.t() | nil, provider_params: map() }