Geminix.V1beta.SafetyFeedback (geminix v0.2.0)

Safety feedback for an entire request. This field is populated if content in the input and/or response is blocked due to safety settings. SafetyFeedback may not exist for every HarmCategory. Each SafetyFeedback will return the safety settings used by the request as well as the lowest HarmProbability that should be allowed in order to return a result.

Fields:

Summary

Types

t()

@type t() :: %Geminix.V1beta.SafetyFeedback{
  __meta__: term(),
  rating: Geminix.V1beta.SafetyRating.t(),
  setting: Geminix.V1beta.SafetySetting.t()
}

Functions

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

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

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