Geminix.V1beta.ContentEmbedding (geminix v0.2.0)

A list of floats representing an embedding.

Fields:

  • :shape (list of integer/0) - This field stores the soft tokens tensor frame shape (e.g. [1, 1, 256, 2048]).
  • :values (list of number/0) - The embedding values. This is for 3P users only and will not be populated for 1P calls.

Summary

Types

t()

@type t() :: %Geminix.V1beta.ContentEmbedding{
  __meta__: term(),
  shape: [integer()],
  values: [number()]
}

Functions

from_map(schema \\ %__MODULE__{}, map)

@spec from_map(t(), map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}

Create a Geminix.V1beta.ContentEmbedding.t/0 from a map returned by the Gemini API.

Sometimes, this function should not be applied to the full response body, but instead it should be applied to the correct part of the map in the response body. This depends on the concrete API call.