Geminix.V1beta.GenerateContentResponse (geminix v0.2.0)
Response from the model supporting multiple candidate responses. Safety ratings and content filtering are reported for both prompt in GenerateContentResponse.prompt_feedback and for each candidate in finish_reason and in safety_ratings. The API: - Returns either all requested candidates or none of them - Returns no candidates at all only if there was something wrong with the prompt (check prompt_feedback) - Reports feedback on each candidate in finish_reason and safety_ratings.
Fields:
:candidates(list ofGeminix.V1beta.Candidate.t/0) - Candidate responses from the model.:model_status(Geminix.V1beta.ModelStatus.t/0) - Output only. The current model status of this model.:model_version(binary/0) - Output only. The model version used to generate the response.:prompt_feedback(Geminix.V1beta.PromptFeedback.t/0) - Returns the prompt's feedback related to the content filters.:response_id(binary/0) - Output only. response_id is used to identify each response.:usage_metadata(Geminix.V1beta.UsageMetadata.t/0) - Output only. Metadata on the generation requests' token usage.
Summary
Functions
Extract the text from a response.
Extract the text from a response.
Create a Geminix.V1beta.GenerateContentResponse.t/0 from a map returned
by the Gemini API.
Types
@type t() :: %Geminix.V1beta.GenerateContentResponse{ __meta__: term(), candidates: [Geminix.V1beta.Candidate.t()], model_status: Geminix.V1beta.ModelStatus.t(), model_version: binary(), prompt_feedback: Geminix.V1beta.PromptFeedback.t(), response_id: binary(), usage_metadata: Geminix.V1beta.UsageMetadata.t() }
Functions
Extract the text from a response.
Extract the text from a response.
@spec from_map(t(), map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}
Create a Geminix.V1beta.GenerateContentResponse.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.