Gemini.Types.Live.SessionResumptionConfig (GeminiEx v0.9.0)

Copy Markdown View Source

Session resumption configuration for Live API sessions.

This message is included in the session configuration to enable session resumption. If configured, the server will send SessionResumptionUpdate messages that can be used to restore the session later.

Fields

  • handle - Handle of a previous session to resume. If not present, a new session is created.
  • transparent - If set, server sends last_consumed_client_message_index for transparent reconnections.

Example

# Start new session with resumption enabled
%SessionResumptionConfig{}

# Resume previous session
%SessionResumptionConfig{handle: "previous_session_handle"}

Summary

Functions

Parses from API response.

Creates a new SessionResumptionConfig.

Converts to API format (camelCase).

Types

t()

@type t() :: %Gemini.Types.Live.SessionResumptionConfig{
  handle: String.t() | nil,
  transparent: 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 SessionResumptionConfig.

to_api(value)

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

Converts to API format (camelCase).