Gemini.Types.Response.EmbedContentBatchOutput (GeminiEx v0.8.4)

View Source

Output of an async batch embedding job.

This is a union type - exactly ONE of the fields will be set.

Union Type - ONE will be set:

  • responses_file: File ID containing JSONL responses (for file-based output)
  • inlined_responses: Direct inline responses (for inline output)

Fields

  • responses_file: GCS file containing batch results
  • inlined_responses: Container with inline response data

Examples

# File-based output
%EmbedContentBatchOutput{
  responses_file: "gs://bucket/outputs/batch-001-results.jsonl",
  inlined_responses: nil
}

# Inline output
%EmbedContentBatchOutput{
  responses_file: nil,
  inlined_responses: %InlinedEmbedContentResponses{...}
}

Summary

Functions

Creates batch output from API response data.

Checks if the output is file-based.

Checks if the output is inline.

Types

t()

@type t() :: %Gemini.Types.Response.EmbedContentBatchOutput{
  inlined_responses:
    Gemini.Types.Response.InlinedEmbedContentResponses.t() | nil,
  responses_file: String.t() | nil
}

Functions

from_api_response(data)

@spec from_api_response(map()) :: t()

Creates batch output from API response data.

Parameters

  • data: Map containing the API response

Examples

EmbedContentBatchOutput.from_api_response(%{
  "responsesFile" => "gs://bucket/results.jsonl"
})

is_file_based?(arg1)

@spec is_file_based?(t()) :: boolean()

Checks if the output is file-based.

Examples

EmbedContentBatchOutput.is_file_based?(output)
# => true

is_inline?(arg1)

@spec is_inline?(t()) :: boolean()

Checks if the output is inline.

Examples

EmbedContentBatchOutput.is_inline?(output)
# => false