Geminix.V1beta.Maps (geminix v0.2.0)

A grounding chunk from Google Maps. A Maps chunk corresponds to a single place.

Fields:

  • :place_answer_sources (Geminix.V1beta.PlaceAnswerSources.t/0) - Sources that provide answers about the features of a given place in Google Maps.
  • :place_id (binary/0) - This ID of the place, in places/{place_id} format. A user can use this ID to look up that place.
  • :text (binary/0) - Text description of the place answer.
  • :title (binary/0) - Title of the place.
  • :uri (binary/0) - URI reference of the place.

Summary

Functions

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

Types

t()

@type t() :: %Geminix.V1beta.Maps{
  __meta__: term(),
  place_answer_sources: Geminix.V1beta.PlaceAnswerSources.t(),
  place_id: binary(),
  text: binary(),
  title: binary(),
  uri: binary()
}

Functions

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

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

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