Module types

Module types 

Source
Expand description

Core types that map one-to-one to the Gemini Multimodal Live API wire format.

Structs§

AudioTranscriptionConfig
Audio transcription settings, for the user’s audio (inputAudioTranscription) or the model’s (outputAudioTranscription).
AutomaticActivityDetection
Automatic activity detection (VAD) settings.
AvatarConfig
Live Avatar video output (Gemini 3.8 Live): a prebuilt avatar by name, or a custom one generated from a reference image.
Blob
A blob of inline data (audio, image, etc.) sent to or received from Gemini.
CitationMetadata
Citation metadata for a response.
CitationSource
A single citation source.
CodeExecutionResult
Result of code execution.
Content
A content message containing a role and a sequence of parts.
ContextWindowCompressionConfig
Context window compression configuration for long sessions.
CustomizedAvatar
The reference image of a custom avatar.
ExecutableCode
Executable code returned by the model.
FileData
Reference to an uploaded file.
FunctionCall
A function call request from the model.
FunctionCallingConfig
Configuration for function calling behavior.
FunctionDeclaration
Schema for a single function that the model can call.
FunctionResponse
A function call response sent back to the model.
GenerationConfig
Generation config sent in the setup message.
GoogleSearch
Google Search tool configuration (empty — presence enables the feature).
GoogleSearchRetrieval
Google Search retrieval tool configuration.
GroundingMetadata
Grounding metadata for server content with search results.
HistoryConfig
How conversation history seeded with clientContent is treated.
LiveModelProfile
What a Live model accepts in its setup message, as far as this crate knows.
ModalityTokenCount
Token count breakdown by modality (text, audio, image, video).
ModelId
A Gemini model identifier, exactly as the API accepts it.
PrebuiltVoiceConfig
Prebuilt voice selection.
ProactivityConfig
Proactivity configuration — controls whether the model can initiate responses.
RealtimeInputConfig
Server-side VAD configuration for the setup message.
ReplicatedVoiceConfig
A voice the model replicates from a recorded sample, configured per session. Nothing is uploaded or trained in advance.
SafetyRating
Per-category safety assessment of generated content.
SafetySetting
Per-category safety configuration for content generation.
SessionConfig
Complete session configuration — the builder entrypoint.
SessionResumptionConfig
Session resumption configuration.
SlidingWindow
Sliding window configuration for context compression.
SpeechConfig
Speech configuration for audio output.
ThinkingConfig
Configuration for model thinking/reasoning (Gemini 2.5+).
Tool
A tool declaration sent in the setup message. Each Tool object can contain one of: function declarations, urlContext, googleSearch, codeExecution, or googleSearchRetrieval.
ToolCodeExecution
Code execution tool configuration (empty — presence enables the feature).
ToolConfig
Controls how and when the model uses tools.
UrlContext
URL context tool configuration (empty — presence enables the feature).
UrlContextMetadata
URL context metadata for content sourced from URLs.
UsageMetadata
Usage metadata returned by the server on messages.
VertexConfig
Configuration for connecting through Vertex AI.
VoiceConfig
Voice configuration within speech config: a prebuilt voice, or a voice replicated from a sample.

Enums§

AccessToken
An OAuth2 access token source.
ActivityHandling
Controls how incoming audio interacts with model output.
ApiEndpoint
API endpoint selector — Google AI (direct), Google AI with OAuth token, or Vertex AI.
AudioFormat
Audio encoding formats supported by the Gemini Live API.
EndpointEnvError
Error resolving an ApiEndpoint from the environment.
FinishReason
Why the model stopped generating.
FunctionCallingBehavior
Whether tool calls block model output or run concurrently.
FunctionCallingMode
How the model should decide when to execute tool calls.
FunctionResponseScheduling
Scheduling mode for non-blocking function responses.
HarmBlockThreshold
Blocking threshold for safety settings.
HarmCategory
Categories of potential harm in model output.
HarmProbability
Probability that content is harmful.
MediaResolution
Media resolution for image/video inputs: the per-frame token budget.
Modality
Output modalities the model can produce.
Part
A single part of a Content message. Parts are polymorphic — discriminated by field presence, not a type tag.
Role
Role in a conversation.
Sensitivity
Voice activity detection sensitivity level.
ThinkingLevel
How much a model thinks before answering, for models that take a level rather than a token budget.
TurnCoverage
Controls which input counts toward a user’s conversation turn.
Voice
Available voice presets for Gemini Live audio output.

Constants§

LIVE_INPUT_SAMPLE_RATE
The sample rate the Live API takes on the way in.

Traits§

ToolProvider
Declares tools for a Gemini session setup message. Implement this trait to provide tools from any source (runtime ToolDispatcher, etc.).

Type Aliases§

InputAudioTranscription
Input audio transcription configuration.
OutputAudioTranscription
Output audio transcription configuration.