Geminix.V1beta.PlaceAnswerSources (geminix v0.2.0)

Collection of sources that provide answers about the features of a given place in Google Maps. Each PlaceAnswerSources message corresponds to a specific place in Google Maps. The Google Maps tool used these sources in order to answer questions about features of the place (e.g: "does Bar Foo have Wifi" or "is Foo Bar wheelchair accessible?"). Currently we only support review snippets as sources.

Fields:

  • :review_snippets (list of Geminix.V1beta.ReviewSnippet.t/0) - Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.

Summary

Types

t()

@type t() :: %Geminix.V1beta.PlaceAnswerSources{
  __meta__: term(),
  review_snippets: [Geminix.V1beta.ReviewSnippet.t()]
}

Functions

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

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

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