Gemini.Types.Live.SessionResumptionUpdate (GeminiEx v0.11.0)

Copy Markdown View Source

Session resumption state update from the server.

Only sent if session_resumption was set in the connection config. Contains information about whether the session can be resumed and the handle to use for resumption.

Fields

  • new_handle - New handle representing a state that can be resumed. Empty if not resumable.
  • resumable - True if the session can be resumed at this point.
  • last_consumed_client_message_index - Index of last message processed (only with transparent mode).

Example

%SessionResumptionUpdate{
  new_handle: "session_handle_123",
  resumable: true,
  last_consumed_client_message_index: 42
}

Summary

Functions

Parses from API response.

Creates a new SessionResumptionUpdate.

Converts to API format (camelCase).

Types

t()

@type t() :: %Gemini.Types.Live.SessionResumptionUpdate{
  last_consumed_client_message_index: integer() | nil,
  new_handle: String.t() | nil,
  resumable: boolean() | nil
}

Functions

from_api(data)

@spec from_api(map() | nil) :: t() | nil

Parses from API response.

new(opts \\ [])

@spec new(keyword()) :: t()

Creates a new SessionResumptionUpdate.

to_api(value)

@spec to_api(t() | nil) :: map() | nil

Converts to API format (camelCase).