Class LiveConnectConfig.Builder
-
- All Implemented Interfaces:
public abstract class LiveConnectConfig.BuilderBuilder for LiveConnectConfig.
-
-
Constructor Summary
Constructors Constructor Description LiveConnectConfig.Builder()
-
Method Summary
Modifier and Type Method Description abstract LiveConnectConfig.BuilderhttpOptions(HttpOptions httpOptions)Setter for httpOptions. LiveConnectConfig.BuilderhttpOptions(HttpOptions.Builder httpOptionsBuilder)Setter for httpOptions builder. LiveConnectConfig.BuilderclearHttpOptions()Clears the value of httpOptions field. abstract LiveConnectConfig.BuilderresponseModalities(List<Modality> responseModalities)Setter for responseModalities. LiveConnectConfig.BuilderresponseModalities(Array<Modality> responseModalities)Setter for responseModalities. LiveConnectConfig.BuilderclearResponseModalities()Clears the value of responseModalities field. LiveConnectConfig.BuilderresponseModalities(Array<String> responseModalities)Setter for responseModalities given a varargs of strings. LiveConnectConfig.BuilderresponseModalities(Array<Modality.Known> knownTypes)Setter for responseModalities given a varargs of known enums. LiveConnectConfig.BuilderresponseModalitiesFromKnown(List<Modality.Known> knownTypes)Setter for responseModalities given a list of known enums. LiveConnectConfig.BuilderresponseModalitiesFromString(List<String> responseModalities)Setter for responseModalities given a list of strings. abstract LiveConnectConfig.Buildertemperature(Float temperature)Setter for temperature. LiveConnectConfig.BuilderclearTemperature()Clears the value of temperature field. abstract LiveConnectConfig.BuildertopP(Float topP)Setter for topP. LiveConnectConfig.BuilderclearTopP()Clears the value of topP field. abstract LiveConnectConfig.BuildertopK(Float topK)Setter for topK. LiveConnectConfig.BuilderclearTopK()Clears the value of topK field. abstract LiveConnectConfig.BuildermaxOutputTokens(Integer maxOutputTokens)Setter for maxOutputTokens. LiveConnectConfig.BuilderclearMaxOutputTokens()Clears the value of maxOutputTokens field. abstract LiveConnectConfig.BuildermediaResolution(MediaResolution mediaResolution)Setter for mediaResolution. LiveConnectConfig.BuilderclearMediaResolution()Clears the value of mediaResolution field. LiveConnectConfig.BuildermediaResolution(MediaResolution.Known knownType)Setter for mediaResolution given a known enum. LiveConnectConfig.BuildermediaResolution(String mediaResolution)Setter for mediaResolution given a string. abstract LiveConnectConfig.Builderseed(Integer seed)Setter for seed. LiveConnectConfig.BuilderclearSeed()Clears the value of seed field. abstract LiveConnectConfig.BuilderspeechConfig(SpeechConfig speechConfig)Setter for speechConfig. LiveConnectConfig.BuilderspeechConfig(SpeechConfig.Builder speechConfigBuilder)Setter for speechConfig builder. LiveConnectConfig.BuilderclearSpeechConfig()Clears the value of speechConfig field. abstract LiveConnectConfig.BuilderthinkingConfig(ThinkingConfig thinkingConfig)Setter for thinkingConfig. LiveConnectConfig.BuilderthinkingConfig(ThinkingConfig.Builder thinkingConfigBuilder)Setter for thinkingConfig builder. LiveConnectConfig.BuilderclearThinkingConfig()Clears the value of thinkingConfig field. abstract LiveConnectConfig.BuilderenableAffectiveDialog(boolean enableAffectiveDialog)Setter for enableAffectiveDialog. LiveConnectConfig.BuilderclearEnableAffectiveDialog()Clears the value of enableAffectiveDialog field. abstract LiveConnectConfig.BuildersystemInstruction(Content systemInstruction)Setter for systemInstruction. LiveConnectConfig.BuildersystemInstruction(Content.Builder systemInstructionBuilder)Setter for systemInstruction builder. LiveConnectConfig.BuilderclearSystemInstruction()Clears the value of systemInstruction field. abstract LiveConnectConfig.Buildertools(List<Tool> tools)Setter for tools. LiveConnectConfig.Buildertools(Array<Tool> tools)Setter for tools. LiveConnectConfig.Buildertools(Array<Tool.Builder> toolsBuilders)Setter for tools builder. LiveConnectConfig.BuilderclearTools()Clears the value of tools field. abstract LiveConnectConfig.BuildersessionResumption(SessionResumptionConfig sessionResumption)Setter for sessionResumption. LiveConnectConfig.BuildersessionResumption(SessionResumptionConfig.Builder sessionResumptionBuilder)Setter for sessionResumption builder. LiveConnectConfig.BuilderclearSessionResumption()Clears the value of sessionResumption field. abstract LiveConnectConfig.BuilderinputAudioTranscription(AudioTranscriptionConfig inputAudioTranscription)Setter for inputAudioTranscription. LiveConnectConfig.BuilderinputAudioTranscription(AudioTranscriptionConfig.Builder inputAudioTranscriptionBuilder)Setter for inputAudioTranscription builder. LiveConnectConfig.BuilderclearInputAudioTranscription()Clears the value of inputAudioTranscription field. abstract LiveConnectConfig.BuilderoutputAudioTranscription(AudioTranscriptionConfig outputAudioTranscription)Setter for outputAudioTranscription. LiveConnectConfig.BuilderoutputAudioTranscription(AudioTranscriptionConfig.Builder outputAudioTranscriptionBuilder)Setter for outputAudioTranscription builder. LiveConnectConfig.BuilderclearOutputAudioTranscription()Clears the value of outputAudioTranscription field. abstract LiveConnectConfig.BuilderrealtimeInputConfig(RealtimeInputConfig realtimeInputConfig)Setter for realtimeInputConfig. LiveConnectConfig.BuilderrealtimeInputConfig(RealtimeInputConfig.Builder realtimeInputConfigBuilder)Setter for realtimeInputConfig builder. LiveConnectConfig.BuilderclearRealtimeInputConfig()Clears the value of realtimeInputConfig field. abstract LiveConnectConfig.BuildercontextWindowCompression(ContextWindowCompressionConfig contextWindowCompression)Setter for contextWindowCompression. LiveConnectConfig.BuildercontextWindowCompression(ContextWindowCompressionConfig.Builder contextWindowCompressionBuilder)Setter for contextWindowCompression builder. LiveConnectConfig.BuilderclearContextWindowCompression()Clears the value of contextWindowCompression field. abstract LiveConnectConfig.Builderproactivity(ProactivityConfig proactivity)Setter for proactivity. LiveConnectConfig.Builderproactivity(ProactivityConfig.Builder proactivityBuilder)Setter for proactivity builder. LiveConnectConfig.BuilderclearProactivity()Clears the value of proactivity field. abstract LiveConnectConfig.BuilderexplicitVadSignal(boolean explicitVadSignal)Setter for explicitVadSignal. LiveConnectConfig.BuilderclearExplicitVadSignal()Clears the value of explicitVadSignal field. abstract LiveConnectConfig.BuilderavatarConfig(AvatarConfig avatarConfig)Setter for avatarConfig. LiveConnectConfig.BuilderavatarConfig(AvatarConfig.Builder avatarConfigBuilder)Setter for avatarConfig builder. LiveConnectConfig.BuilderclearAvatarConfig()Clears the value of avatarConfig field. abstract LiveConnectConfig.BuildersafetySettings(List<SafetySetting> safetySettings)Setter for safetySettings. LiveConnectConfig.BuildersafetySettings(Array<SafetySetting> safetySettings)Setter for safetySettings. LiveConnectConfig.BuildersafetySettings(Array<SafetySetting.Builder> safetySettingsBuilders)Setter for safetySettings builder. LiveConnectConfig.BuilderclearSafetySettings()Clears the value of safetySettings field. abstract LiveConnectConfigbuild()-
-
Method Detail
-
httpOptions
abstract LiveConnectConfig.Builder httpOptions(HttpOptions httpOptions)
Setter for httpOptions.
httpOptions: Used to override HTTP request options.
-
httpOptions
@CanIgnoreReturnValue() LiveConnectConfig.Builder httpOptions(HttpOptions.Builder httpOptionsBuilder)
Setter for httpOptions builder.
httpOptions: Used to override HTTP request options.
-
clearHttpOptions
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearHttpOptions()
Clears the value of httpOptions field.
-
responseModalities
abstract LiveConnectConfig.Builder responseModalities(List<Modality> responseModalities)
Setter for responseModalities.
responseModalities: The requested modalities of the response. Represents the set of modalities that the model can return. Defaults to AUDIO if not specified.
-
responseModalities
@CanIgnoreReturnValue() LiveConnectConfig.Builder responseModalities(Array<Modality> responseModalities)
Setter for responseModalities.
responseModalities: The requested modalities of the response. Represents the set of modalities that the model can return. Defaults to AUDIO if not specified.
-
clearResponseModalities
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearResponseModalities()
Clears the value of responseModalities field.
-
responseModalities
@CanIgnoreReturnValue() LiveConnectConfig.Builder responseModalities(Array<String> responseModalities)
Setter for responseModalities given a varargs of strings.
responseModalities: The requested modalities of the response. Represents the set of modalities that the model can return. Defaults to AUDIO if not specified.
-
responseModalities
@CanIgnoreReturnValue() LiveConnectConfig.Builder responseModalities(Array<Modality.Known> knownTypes)
Setter for responseModalities given a varargs of known enums.
responseModalities: The requested modalities of the response. Represents the set of modalities that the model can return. Defaults to AUDIO if not specified.
-
responseModalitiesFromKnown
@CanIgnoreReturnValue() LiveConnectConfig.Builder responseModalitiesFromKnown(List<Modality.Known> knownTypes)
Setter for responseModalities given a list of known enums.
responseModalities: The requested modalities of the response. Represents the set of modalities that the model can return. Defaults to AUDIO if not specified.
-
responseModalitiesFromString
@CanIgnoreReturnValue() LiveConnectConfig.Builder responseModalitiesFromString(List<String> responseModalities)
Setter for responseModalities given a list of strings.
responseModalities: The requested modalities of the response. Represents the set of modalities that the model can return. Defaults to AUDIO if not specified.
-
temperature
abstract LiveConnectConfig.Builder temperature(Float temperature)
Setter for temperature.
temperature: Value that controls the degree of randomness in token selection. Lower temperatures are good for prompts that require a less open-ended or creative response, while higher temperatures can lead to more diverse or creative results.
-
clearTemperature
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearTemperature()
Clears the value of temperature field.
-
topP
abstract LiveConnectConfig.Builder topP(Float topP)
Setter for topP.
topP: Tokens are selected from the most to least probable until the sum of their probabilities equals this value. Use a lower value for less random responses and a higher value for more random responses.
-
clearTopP
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearTopP()
Clears the value of topP field.
-
topK
abstract LiveConnectConfig.Builder topK(Float topK)
Setter for topK.
topK: For each token selection step, the ``top_k`` tokens with the highest probabilities are sampled. Then tokens are further filtered based on ``top_p`` with the final token selected using temperature sampling. Use a lower number for less random responses and a higher number for more random responses.
-
clearTopK
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearTopK()
Clears the value of topK field.
-
maxOutputTokens
abstract LiveConnectConfig.Builder maxOutputTokens(Integer maxOutputTokens)
Setter for maxOutputTokens.
maxOutputTokens: Maximum number of tokens that can be generated in the response.
-
clearMaxOutputTokens
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearMaxOutputTokens()
Clears the value of maxOutputTokens field.
-
mediaResolution
abstract LiveConnectConfig.Builder mediaResolution(MediaResolution mediaResolution)
Setter for mediaResolution.
mediaResolution: If specified, the media resolution specified will be used.
-
clearMediaResolution
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearMediaResolution()
Clears the value of mediaResolution field.
-
mediaResolution
@CanIgnoreReturnValue() LiveConnectConfig.Builder mediaResolution(MediaResolution.Known knownType)
Setter for mediaResolution given a known enum.
mediaResolution: If specified, the media resolution specified will be used.
-
mediaResolution
@CanIgnoreReturnValue() LiveConnectConfig.Builder mediaResolution(String mediaResolution)
Setter for mediaResolution given a string.
mediaResolution: If specified, the media resolution specified will be used.
-
seed
abstract LiveConnectConfig.Builder seed(Integer seed)
Setter for seed.
seed: When ``seed`` is fixed to a specific number, the model makes a best effort to provide the same response for repeated requests. By default, a random number is used.
-
clearSeed
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearSeed()
Clears the value of seed field.
-
speechConfig
abstract LiveConnectConfig.Builder speechConfig(SpeechConfig speechConfig)
Setter for speechConfig.
speechConfig: The speech generation configuration.
-
speechConfig
@CanIgnoreReturnValue() LiveConnectConfig.Builder speechConfig(SpeechConfig.Builder speechConfigBuilder)
Setter for speechConfig builder.
speechConfig: The speech generation configuration.
-
clearSpeechConfig
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearSpeechConfig()
Clears the value of speechConfig field.
-
thinkingConfig
abstract LiveConnectConfig.Builder thinkingConfig(ThinkingConfig thinkingConfig)
Setter for thinkingConfig.
thinkingConfig: Config for thinking features. An error will be returned if this field is set for models that don't support thinking.
-
thinkingConfig
@CanIgnoreReturnValue() LiveConnectConfig.Builder thinkingConfig(ThinkingConfig.Builder thinkingConfigBuilder)
Setter for thinkingConfig builder.
thinkingConfig: Config for thinking features. An error will be returned if this field is set for models that don't support thinking.
-
clearThinkingConfig
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearThinkingConfig()
Clears the value of thinkingConfig field.
-
enableAffectiveDialog
abstract LiveConnectConfig.Builder enableAffectiveDialog(boolean enableAffectiveDialog)
Setter for enableAffectiveDialog.
enableAffectiveDialog: If enabled, the model will detect emotions and adapt its responses accordingly.
-
clearEnableAffectiveDialog
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearEnableAffectiveDialog()
Clears the value of enableAffectiveDialog field.
-
systemInstruction
abstract LiveConnectConfig.Builder systemInstruction(Content systemInstruction)
Setter for systemInstruction.
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.
-
systemInstruction
@CanIgnoreReturnValue() LiveConnectConfig.Builder systemInstruction(Content.Builder systemInstructionBuilder)
Setter for systemInstruction builder.
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.
-
clearSystemInstruction
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearSystemInstruction()
Clears the value of systemInstruction field.
-
tools
abstract LiveConnectConfig.Builder tools(List<Tool> tools)
Setter for tools.
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.
-
tools
@CanIgnoreReturnValue() LiveConnectConfig.Builder tools(Array<Tool> tools)
Setter for tools.
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.
-
tools
@CanIgnoreReturnValue() LiveConnectConfig.Builder tools(Array<Tool.Builder> toolsBuilders)
Setter for tools builder.
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.
-
clearTools
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearTools()
Clears the value of tools field.
-
sessionResumption
abstract LiveConnectConfig.Builder sessionResumption(SessionResumptionConfig sessionResumption)
Setter for sessionResumption.
sessionResumption: Configures session resumption mechanism.
If included the server will send SessionResumptionUpdate messages.
-
sessionResumption
@CanIgnoreReturnValue() LiveConnectConfig.Builder sessionResumption(SessionResumptionConfig.Builder sessionResumptionBuilder)
Setter for sessionResumption builder.
sessionResumption: Configures session resumption mechanism.
If included the server will send SessionResumptionUpdate messages.
-
clearSessionResumption
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearSessionResumption()
Clears the value of sessionResumption field.
-
inputAudioTranscription
abstract LiveConnectConfig.Builder inputAudioTranscription(AudioTranscriptionConfig inputAudioTranscription)
Setter for inputAudioTranscription.
inputAudioTranscription: The transcription of the input aligns with the input audio language.
-
inputAudioTranscription
@CanIgnoreReturnValue() LiveConnectConfig.Builder inputAudioTranscription(AudioTranscriptionConfig.Builder inputAudioTranscriptionBuilder)
Setter for inputAudioTranscription builder.
inputAudioTranscription: The transcription of the input aligns with the input audio language.
-
clearInputAudioTranscription
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearInputAudioTranscription()
Clears the value of inputAudioTranscription field.
-
outputAudioTranscription
abstract LiveConnectConfig.Builder outputAudioTranscription(AudioTranscriptionConfig outputAudioTranscription)
Setter for outputAudioTranscription.
outputAudioTranscription: The transcription of the output aligns with the language code specified for the output audio.
-
outputAudioTranscription
@CanIgnoreReturnValue() LiveConnectConfig.Builder outputAudioTranscription(AudioTranscriptionConfig.Builder outputAudioTranscriptionBuilder)
Setter for outputAudioTranscription builder.
outputAudioTranscription: The transcription of the output aligns with the language code specified for the output audio.
-
clearOutputAudioTranscription
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearOutputAudioTranscription()
Clears the value of outputAudioTranscription field.
-
realtimeInputConfig
abstract LiveConnectConfig.Builder realtimeInputConfig(RealtimeInputConfig realtimeInputConfig)
Setter for realtimeInputConfig.
realtimeInputConfig: Configures the realtime input behavior in BidiGenerateContent.
-
realtimeInputConfig
@CanIgnoreReturnValue() LiveConnectConfig.Builder realtimeInputConfig(RealtimeInputConfig.Builder realtimeInputConfigBuilder)
Setter for realtimeInputConfig builder.
realtimeInputConfig: Configures the realtime input behavior in BidiGenerateContent.
-
clearRealtimeInputConfig
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearRealtimeInputConfig()
Clears the value of realtimeInputConfig field.
-
contextWindowCompression
abstract LiveConnectConfig.Builder contextWindowCompression(ContextWindowCompressionConfig contextWindowCompression)
Setter for contextWindowCompression.
contextWindowCompression: Configures context window compression mechanism.
If included, server will compress context window to fit into given length.
-
contextWindowCompression
@CanIgnoreReturnValue() LiveConnectConfig.Builder contextWindowCompression(ContextWindowCompressionConfig.Builder contextWindowCompressionBuilder)
Setter for contextWindowCompression builder.
contextWindowCompression: Configures context window compression mechanism.
If included, server will compress context window to fit into given length.
-
clearContextWindowCompression
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearContextWindowCompression()
Clears the value of contextWindowCompression field.
-
proactivity
abstract LiveConnectConfig.Builder proactivity(ProactivityConfig proactivity)
Setter for proactivity.
proactivity: Configures the proactivity of the model. This allows the model to respond proactively to the input and to ignore irrelevant input.
-
proactivity
@CanIgnoreReturnValue() LiveConnectConfig.Builder proactivity(ProactivityConfig.Builder proactivityBuilder)
Setter for proactivity builder.
proactivity: Configures the proactivity of the model. This allows the model to respond proactively to the input and to ignore irrelevant input.
-
clearProactivity
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearProactivity()
Clears the value of proactivity field.
-
explicitVadSignal
abstract LiveConnectConfig.Builder explicitVadSignal(boolean explicitVadSignal)
Setter for explicitVadSignal.
explicitVadSignal: Configures the explicit VAD signal. If enabled, the client will send vad_signal to indicate the start and end of speech. This allows the server to process the audio more efficiently.
-
clearExplicitVadSignal
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearExplicitVadSignal()
Clears the value of explicitVadSignal field.
-
avatarConfig
abstract LiveConnectConfig.Builder avatarConfig(AvatarConfig avatarConfig)
Setter for avatarConfig.
avatarConfig: Configures the avatar model behavior.
-
avatarConfig
@CanIgnoreReturnValue() LiveConnectConfig.Builder avatarConfig(AvatarConfig.Builder avatarConfigBuilder)
Setter for avatarConfig builder.
avatarConfig: Configures the avatar model behavior.
-
clearAvatarConfig
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearAvatarConfig()
Clears the value of avatarConfig field.
-
safetySettings
abstract LiveConnectConfig.Builder safetySettings(List<SafetySetting> safetySettings)
Setter for safetySettings.
safetySettings: Safety settings in the request to block unsafe content in the response.
-
safetySettings
@CanIgnoreReturnValue() LiveConnectConfig.Builder safetySettings(Array<SafetySetting> safetySettings)
Setter for safetySettings.
safetySettings: Safety settings in the request to block unsafe content in the response.
-
safetySettings
@CanIgnoreReturnValue() LiveConnectConfig.Builder safetySettings(Array<SafetySetting.Builder> safetySettingsBuilders)
Setter for safetySettings builder.
safetySettings: Safety settings in the request to block unsafe content in the response.
-
clearSafetySettings
@CanIgnoreReturnValue() LiveConnectConfig.Builder clearSafetySettings()
Clears the value of safetySettings field.
-
build
abstract LiveConnectConfig build()
-
-
-
-