Geminix.V1beta.ImageConfig (geminix v0.2.0)

Config for image generation features.

Fields:

  • :aspect_ratio (binary/0) - Optional. The aspect ratio of the image to generate. Supported aspect ratios: 1:1, 2:3, 3:2, 3:4, 4:3, 9:16, 16:9, 21:9. If not specified, the model will choose a default aspect ratio based on any reference images provided.
  • :image_size (binary/0) - Optional. Specifies the size of generated images. Supported values are 1K, 2K, 4K. If not specified, the model will use default value 1K.

Summary

Functions

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

Types

t()

@type t() :: %Geminix.V1beta.ImageConfig{
  __meta__: term(),
  aspect_ratio: binary(),
  image_size: binary()
}

Functions

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

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

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