Class LiveClientSetup

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

public abstract class LiveClientSetup extends JsonSerializable
Message contains configuration that will apply for the duration of the streaming session.
  • Constructor Details

    • LiveClientSetup

      public LiveClientSetup()
  • Method Details

    • model

      public abstract Optional<String> model()
      The fully qualified name of the publisher model or tuned model endpoint to use.
    • generationConfig

      public abstract Optional<GenerationConfig> generationConfig()
      The generation configuration for the session. Note: only a subset of fields are supported.
    • systemInstruction

      public abstract Optional<Content> systemInstruction()
      The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph.
    • tools

      public abstract Optional<List<Tool>> tools()
      A list of `Tools` the model may use to generate the next response.

      A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.

    • realtimeInputConfig

      public abstract Optional<RealtimeInputConfig> realtimeInputConfig()
      Configures the realtime input behavior in BidiGenerateContent.
    • sessionResumption

      public abstract Optional<SessionResumptionConfig> sessionResumption()
      Configures session resumption mechanism.

      If included server will send SessionResumptionUpdate messages.

    • contextWindowCompression

      public abstract Optional<ContextWindowCompressionConfig> contextWindowCompression()
      Configures context window compression mechanism.

      If included, server will compress context window to fit into given length.

    • inputAudioTranscription

      public abstract Optional<AudioTranscriptionConfig> inputAudioTranscription()
      The transcription of the input aligns with the input audio language.
    • outputAudioTranscription

      public abstract Optional<AudioTranscriptionConfig> outputAudioTranscription()
      The transcription of the output aligns with the language code specified for the output audio.
    • proactivity

      public abstract Optional<ProactivityConfig> proactivity()
      Configures the proactivity of the model. This allows the model to respond proactively to the input and to ignore irrelevant input.
    • builder

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

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

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