Gemini.Types.Response.EmbedContentResponse (GeminiEx v0.3.0)
View SourceResponse structure for embedding content requests.
Contains the generated embedding vector from the input content.
Fields
embedding
: The content embedding containing the numerical vector
Examples
%EmbedContentResponse{
embedding: %ContentEmbedding{
values: [0.123, -0.456, 0.789, ...]
}
}
Summary
Functions
Creates a new embedding response from API response data.
Extracts the embedding values as a list of floats.
Types
@type t() :: %Gemini.Types.Response.EmbedContentResponse{ embedding: Gemini.Types.Response.ContentEmbedding.t() }
Functions
Creates a new embedding response from API response data.
Parameters
data
: Map containing the API response
Examples
EmbedContentResponse.from_api_response(%{
"embedding" => %{"values" => [0.1, 0.2, 0.3]}
})
Extracts the embedding values as a list of floats.
Examples
response = %EmbedContentResponse{...}
values = EmbedContentResponse.get_values(response)
# => [0.123, -0.456, 0.789, ...]