Gemini.Types.Request.InlinedEmbedContentRequest (GeminiEx v0.8.4)

View Source

A single embedding request within an async batch, with optional metadata.

Used to submit individual embedding requests as part of an async batch operation. Each request can include metadata for tracking purposes.

Fields

  • request: The embedding request (EmbedContentRequest)
  • metadata: Optional metadata (map) to track request identity

Examples

# Simple inlined request
%InlinedEmbedContentRequest{
  request: %EmbedContentRequest{
    model: "models/gemini-embedding-001",
    content: %Content{parts: [%Part{text: "Hello world"}]}
  }
}

# With metadata
%InlinedEmbedContentRequest{
  request: embed_request,
  metadata: %{"document_id" => "doc-123", "category" => "tech"}
}

Summary

Functions

Creates a new inlined embed content request.

Converts the inlined request to API-compatible map format.

Types

t()

@type t() :: %Gemini.Types.Request.InlinedEmbedContentRequest{
  metadata: map() | nil,
  request: Gemini.Types.Request.EmbedContentRequest.t()
}

Functions

new(request, opts \\ [])

Creates a new inlined embed content request.

Parameters

  • request: The EmbedContentRequest to include
  • opts: Optional keyword list
    • :metadata: Metadata map for tracking

Examples

InlinedEmbedContentRequest.new(embed_request)

InlinedEmbedContentRequest.new(embed_request,
  metadata: %{"id" => "123"}
)

to_api_map(inlined_request)

@spec to_api_map(t()) :: map()

Converts the inlined request to API-compatible map format.