Geminix.V1beta.FunctionResponseBlob (geminix v0.2.0)

Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field.

Fields:

  • :data (binary/0) - Raw bytes for media formats.
  • :mime_type (binary/0) - The IANA standard MIME type of the source data. Examples: - image/png - image/jpeg If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see Supported file formats.

Summary

Types

t()

@type t() :: %Geminix.V1beta.FunctionResponseBlob{
  __meta__: term(),
  data: binary(),
  mime_type: binary()
}

Functions

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

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

Create a Geminix.V1beta.FunctionResponseBlob.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.