Gemini.Types.Response.BatchEmbedContentsResponse (GeminiEx v0.3.0)
View SourceResponse structure for batch embedding requests.
Contains embeddings for multiple content items in the same order as the input requests.
Fields
embeddings
: List of content embeddings
Examples
%BatchEmbedContentsResponse{
embeddings: [
%ContentEmbedding{values: [0.1, 0.2, ...]},
%ContentEmbedding{values: [0.3, 0.4, ...]},
%ContentEmbedding{values: [0.5, 0.6, ...]}
]
}
Summary
Functions
Creates a new batch embedding response from API response data.
Gets all embedding values as a list of lists.
Types
@type t() :: %Gemini.Types.Response.BatchEmbedContentsResponse{ embeddings: [Gemini.Types.Response.ContentEmbedding.t()] }
Functions
Creates a new batch embedding response from API response data.
Parameters
data
: Map containing the API response
Examples
BatchEmbedContentsResponse.from_api_response(%{
"embeddings" => [
%{"values" => [0.1, 0.2]},
%{"values" => [0.3, 0.4]}
]
})
Gets all embedding values as a list of lists.
Examples
response = %BatchEmbedContentsResponse{...}
all_values = BatchEmbedContentsResponse.get_all_values(response)
# => [[0.1, 0.2, ...], [0.3, 0.4, ...], ...]