Class LiveConnectConfig.Builder
- Enclosing class:
- LiveConnectConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract LiveConnectConfigbuild()abstract LiveConnectConfig.BuildercontextWindowCompression(ContextWindowCompressionConfig contextWindowCompression) Setter for contextWindowCompression.contextWindowCompression(ContextWindowCompressionConfig.Builder contextWindowCompressionBuilder) Setter for contextWindowCompression builder.abstract LiveConnectConfig.BuilderenableAffectiveDialog(boolean enableAffectiveDialog) Setter for enableAffectiveDialog.abstract LiveConnectConfig.BuilderhttpOptions(HttpOptions httpOptions) Setter for httpOptions.httpOptions(HttpOptions.Builder httpOptionsBuilder) Setter for httpOptions builder.abstract LiveConnectConfig.BuilderinputAudioTranscription(AudioTranscriptionConfig inputAudioTranscription) Setter for inputAudioTranscription.inputAudioTranscription(AudioTranscriptionConfig.Builder inputAudioTranscriptionBuilder) Setter for inputAudioTranscription builder.abstract LiveConnectConfig.BuildermaxOutputTokens(Integer maxOutputTokens) Setter for maxOutputTokens.abstract LiveConnectConfig.BuildermediaResolution(MediaResolution mediaResolution) Setter for mediaResolution.mediaResolution(MediaResolution.Known knownType) Setter for mediaResolution given a known enum.mediaResolution(String mediaResolution) Setter for mediaResolution given a string.abstract LiveConnectConfig.BuilderoutputAudioTranscription(AudioTranscriptionConfig outputAudioTranscription) Setter for outputAudioTranscription.outputAudioTranscription(AudioTranscriptionConfig.Builder outputAudioTranscriptionBuilder) Setter for outputAudioTranscription builder.abstract LiveConnectConfig.Builderproactivity(ProactivityConfig proactivity) Setter for proactivity.proactivity(ProactivityConfig.Builder proactivityBuilder) Setter for proactivity builder.abstract LiveConnectConfig.BuilderrealtimeInputConfig(RealtimeInputConfig realtimeInputConfig) Setter for realtimeInputConfig.realtimeInputConfig(RealtimeInputConfig.Builder realtimeInputConfigBuilder) Setter for realtimeInputConfig builder.responseModalities(Modality... responseModalities) Setter for responseModalities.responseModalities(Modality.Known... knownTypes) Setter for responseModalities given a varargs of known enums.responseModalities(String... responseModalities) Setter for responseModalities given a varargs of strings.abstract LiveConnectConfig.BuilderresponseModalities(List<Modality> responseModalities) Setter for responseModalities.responseModalitiesFromKnown(List<Modality.Known> knownTypes) Setter for responseModalities given a list of known enums.responseModalitiesFromString(List<String> responseModalities) Setter for responseModalities given a list of strings.abstract LiveConnectConfig.BuilderSetter for seed.abstract LiveConnectConfig.BuildersessionResumption(SessionResumptionConfig sessionResumption) Setter for sessionResumption.sessionResumption(SessionResumptionConfig.Builder sessionResumptionBuilder) Setter for sessionResumption builder.abstract LiveConnectConfig.BuilderspeechConfig(SpeechConfig speechConfig) Setter for speechConfig.speechConfig(SpeechConfig.Builder speechConfigBuilder) Setter for speechConfig builder.abstract LiveConnectConfig.BuildersystemInstruction(Content systemInstruction) Setter for systemInstruction.systemInstruction(Content.Builder systemInstructionBuilder) Setter for systemInstruction builder.abstract LiveConnectConfig.Buildertemperature(Float temperature) Setter for temperature.abstract LiveConnectConfig.BuilderthinkingConfig(ThinkingConfig thinkingConfig) Setter for thinkingConfig.thinkingConfig(ThinkingConfig.Builder thinkingConfigBuilder) Setter for thinkingConfig builder.Setter for tools.tools(Tool.Builder... toolsBuilders) Setter for tools builder.abstract LiveConnectConfig.BuilderSetter for tools.abstract LiveConnectConfig.BuilderSetter for topK.abstract LiveConnectConfig.BuilderSetter for topP.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
httpOptions
Setter for httpOptions.httpOptions: Used to override HTTP request options.
-
httpOptions
Setter for httpOptions builder.httpOptions: Used to override HTTP request options.
-
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
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 public LiveConnectConfig.Builder responseModalities(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 public LiveConnectConfig.Builder responseModalities(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 public 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 public 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
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.
-
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.
-
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.
-
maxOutputTokens
Setter for maxOutputTokens.maxOutputTokens: Maximum number of tokens that can be generated in the response.
-
mediaResolution
Setter for mediaResolution.mediaResolution: If specified, the media resolution specified will be used.
-
mediaResolution
@CanIgnoreReturnValue public LiveConnectConfig.Builder mediaResolution(MediaResolution.Known knownType) Setter for mediaResolution given a known enum.mediaResolution: If specified, the media resolution specified will be used.
-
mediaResolution
Setter for mediaResolution given a string.mediaResolution: If specified, the media resolution specified will be used.
-
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.
-
speechConfig
Setter for speechConfig.speechConfig: The speech generation configuration.
-
speechConfig
Setter for speechConfig builder.speechConfig: The speech generation configuration.
-
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
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.
-
enableAffectiveDialog
Setter for enableAffectiveDialog.enableAffectiveDialog: If enabled, the model will detect emotions and adapt its responses accordingly.
-
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
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.
-
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
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
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.
-
sessionResumption
public abstract LiveConnectConfig.Builder sessionResumption(SessionResumptionConfig sessionResumption) Setter for sessionResumption.sessionResumption: Configures session resumption mechanism.
If included the server will send SessionResumptionUpdate messages.
-
sessionResumption
public LiveConnectConfig.Builder sessionResumption(SessionResumptionConfig.Builder sessionResumptionBuilder) Setter for sessionResumption builder.sessionResumption: Configures session resumption mechanism.
If included the server will send SessionResumptionUpdate messages.
-
inputAudioTranscription
public abstract LiveConnectConfig.Builder inputAudioTranscription(AudioTranscriptionConfig inputAudioTranscription) Setter for inputAudioTranscription.inputAudioTranscription: The transcription of the input aligns with the input audio language.
-
inputAudioTranscription
public LiveConnectConfig.Builder inputAudioTranscription(AudioTranscriptionConfig.Builder inputAudioTranscriptionBuilder) Setter for inputAudioTranscription builder.inputAudioTranscription: The transcription of the input aligns with the input audio language.
-
outputAudioTranscription
public 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
public 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.
-
realtimeInputConfig
public abstract LiveConnectConfig.Builder realtimeInputConfig(RealtimeInputConfig realtimeInputConfig) Setter for realtimeInputConfig.realtimeInputConfig: Configures the realtime input behavior in BidiGenerateContent.
-
realtimeInputConfig
public LiveConnectConfig.Builder realtimeInputConfig(RealtimeInputConfig.Builder realtimeInputConfigBuilder) Setter for realtimeInputConfig builder.realtimeInputConfig: Configures the realtime input behavior in BidiGenerateContent.
-
contextWindowCompression
public 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
public 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.
-
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
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.
-
build
-