Class LiveServerMessage

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.LiveServerMessage

public abstract class LiveServerMessage extends JsonSerializable
Response message for API call.
  • Constructor Details

    • LiveServerMessage

      public LiveServerMessage()
  • Method Details

    • setupComplete

      public abstract Optional<LiveServerSetupComplete> setupComplete()
      Sent in response to a `LiveClientSetup` message from the client.
    • serverContent

      public abstract Optional<LiveServerContent> serverContent()
      Content generated by the model in response to client messages.
    • toolCall

      public abstract Optional<LiveServerToolCall> toolCall()
      Request for the client to execute the `function_calls` and return the responses with the matching `id`s.
    • toolCallCancellation

      public abstract Optional<LiveServerToolCallCancellation> toolCallCancellation()
      Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled.
    • usageMetadata

      public abstract Optional<UsageMetadata> usageMetadata()
      Usage metadata about model response(s).
    • goAway

      public abstract Optional<LiveServerGoAway> goAway()
      Server will disconnect soon.
    • sessionResumptionUpdate

      public abstract Optional<LiveServerSessionResumptionUpdate> sessionResumptionUpdate()
      Update of the session resumption state.
    • builder

      public static LiveServerMessage.Builder builder()
      Instantiates a builder for LiveServerMessage.
    • toBuilder

      public abstract LiveServerMessage.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static LiveServerMessage fromJson(String jsonString)
      Deserializes a JSON string to a LiveServerMessage object.