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

Copy Markdown View Source

Client content message for Live API sessions.

Incremental update of the current conversation delivered from the client. All content is unconditionally appended to the conversation history and used as part of the prompt to generate content.

A message here will interrupt any current model generation.

Fields

  • turns - Content appended to the current conversation. For single-turn queries, this is a single instance. For multi-turn queries, this contains conversation history and the latest request.
  • turn_complete - If true, indicates that server content generation should start with the currently accumulated prompt.

Example

%ClientContent{
  turns: [
    %{role: "user", parts: [%{text: "Hello!"}]}
  ],
  turn_complete: true
}

Summary

Functions

Parses from API response.

Creates a new ClientContent.

Converts to API format (camelCase).

Types

t()

@type t() :: %Gemini.Types.Live.ClientContent{
  turn_complete: boolean() | nil,
  turns: [Gemini.Types.Content.t() | map()] | 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 ClientContent.

to_api(value)

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

Converts to API format (camelCase).