LiveServerMessage class

A top-level server message received over the Live API socket.

Annotations
  • @JsonSerializable.new(includeIfNull: false, createToJson: false)

Constructors

LiveServerMessage({LiveServerSetupComplete? setupComplete, LiveServerContent? serverContent, UsageMetadata? usageMetadata, LiveServerToolCall? toolCall, LiveServerToolCallCancellation? toolCallCancellation, LiveServerGoAway? goAway, LiveServerSessionResumptionUpdate? sessionResumptionUpdate, VoiceActivityDetectionSignal? voiceActivityDetectionSignal, VoiceActivity? voiceActivity, LiveServerError? error})
LiveServerMessage.fromJson(Map<String, dynamic> json)
factory

Properties

audio → Uint8List?
Decoded raw PCM audio bytes emitted in the current server turn, if any.
no setter
data → String?
The concatenated inline binary payload emitted in the current server turn.
no setter
error → LiveServerError?
final
goAway → LiveServerGoAway?
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serverContent → LiveServerContent?
final
sessionResumptionUpdate → LiveServerSessionResumptionUpdate?
final
setupComplete → LiveServerSetupComplete?
final
text → String?
The concatenated non-thought text emitted in the current server turn, or the output audio transcription text if no text parts are present.
no setter
toolCall → LiveServerToolCall?
final
toolCallCancellation → LiveServerToolCallCancellation?
final
usageMetadata → UsageMetadata?
final
voiceActivity → VoiceActivity?
final
voiceActivityDetectionSignal → VoiceActivityDetectionSignal?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited