Geminix.V1beta.GenerateContentBatchOutput (geminix v0.2.0)

The output of a batch request. This is returned in the BatchGenerateContentResponse or the GenerateContentBatch.output field.

Fields:

  • :inlined_responses (Geminix.V1beta.InlinedResponses.t/0) - Output only. The responses to the requests in the batch. Returned when the batch was built using inlined requests. The responses will be in the same order as the input requests.
  • :responses_file (binary/0) - Output only. The file ID of the file containing the responses. The file will be a JSONL file with a single response per line. The responses will be GenerateContentResponse messages formatted as JSON. The responses will be written in the same order as the input requests.

Summary

Types

t()

@type t() :: %Geminix.V1beta.GenerateContentBatchOutput{
  __meta__: term(),
  inlined_responses: Geminix.V1beta.InlinedResponses.t(),
  responses_file: binary()
}

Functions

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

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

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