Class LiveServerMessage
Response message for API call.
public record LiveServerMessage : IEquatable<LiveServerMessage>
- Inheritance
-
LiveServerMessage
- Implements
- Inherited Members
Properties
GoAway
Server will disconnect soon.
[JsonPropertyName("goAway")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public LiveServerGoAway? GoAway { get; set; }
Property Value
ServerContent
Content generated by the model in response to client messages.
[JsonPropertyName("serverContent")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public LiveServerContent? ServerContent { get; set; }
Property Value
SessionResumptionUpdate
Update of the session resumption state.
[JsonPropertyName("sessionResumptionUpdate")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public LiveServerSessionResumptionUpdate? SessionResumptionUpdate { get; set; }
Property Value
SetupComplete
Sent in response to a LiveClientSetup message from the client.
[JsonPropertyName("setupComplete")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public LiveServerSetupComplete? SetupComplete { get; set; }
Property Value
ToolCall
Request for the client to execute the function_calls and return the responses with the
matching ids.
[JsonPropertyName("toolCall")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public LiveServerToolCall? ToolCall { get; set; }
Property Value
ToolCallCancellation
Notification for the client that a previously issued ToolCallMessage with the specified
ids should have been not executed and should be cancelled.
[JsonPropertyName("toolCallCancellation")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public LiveServerToolCallCancellation? ToolCallCancellation { get; set; }
Property Value
UsageMetadata
Usage metadata about model response(s).
[JsonPropertyName("usageMetadata")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public UsageMetadata? UsageMetadata { get; set; }
Property Value
VoiceActivity
Voice activity signal.
[JsonPropertyName("voiceActivity")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public VoiceActivity? VoiceActivity { get; set; }
Property Value
VoiceActivityDetectionSignal
Voice activity detection signal. Allowlisted only.
[JsonPropertyName("voiceActivityDetectionSignal")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public VoiceActivityDetectionSignal? VoiceActivityDetectionSignal { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a LiveServerMessage object.
public static LiveServerMessage? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- LiveServerMessage
The deserialized LiveServerMessage object, or null if deserialization fails.