Class LiveServerContent.Builder
- Enclosing class:
- LiveServerContent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract LiveServerContent
build()
abstract LiveServerContent.Builder
generationComplete
(boolean generationComplete) Setter for generationComplete.abstract LiveServerContent.Builder
groundingMetadata
(GroundingMetadata groundingMetadata) Setter for groundingMetadata.groundingMetadata
(GroundingMetadata.Builder groundingMetadataBuilder) Setter for groundingMetadata builder.abstract LiveServerContent.Builder
inputTranscription
(Transcription inputTranscription) Setter for inputTranscription.inputTranscription
(Transcription.Builder inputTranscriptionBuilder) Setter for inputTranscription builder.abstract LiveServerContent.Builder
interrupted
(boolean interrupted) Setter for interrupted.abstract LiveServerContent.Builder
Setter for modelTurn.modelTurn
(Content.Builder modelTurnBuilder) Setter for modelTurn builder.abstract LiveServerContent.Builder
outputTranscription
(Transcription outputTranscription) Setter for outputTranscription.outputTranscription
(Transcription.Builder outputTranscriptionBuilder) Setter for outputTranscription builder.abstract LiveServerContent.Builder
turnComplete
(boolean turnComplete) Setter for turnComplete.abstract LiveServerContent.Builder
turnCompleteReason
(TurnCompleteReason turnCompleteReason) Setter for turnCompleteReason.turnCompleteReason
(TurnCompleteReason.Known knownType) Setter for turnCompleteReason given a known enum.turnCompleteReason
(String turnCompleteReason) Setter for turnCompleteReason given a string.abstract LiveServerContent.Builder
urlContextMetadata
(UrlContextMetadata urlContextMetadata) Setter for urlContextMetadata.urlContextMetadata
(UrlContextMetadata.Builder urlContextMetadataBuilder) Setter for urlContextMetadata builder.abstract LiveServerContent.Builder
waitingForInput
(boolean waitingForInput) Setter for waitingForInput.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
modelTurn
Setter for modelTurn.modelTurn: The content that the model has generated as part of the current conversation with the user.
-
modelTurn
Setter for modelTurn builder.modelTurn: The content that the model has generated as part of the current conversation with the user.
-
turnComplete
Setter for turnComplete.turnComplete: If true, indicates that the model is done generating. Generation will only start in response to additional client messages. Can be set alongside `content`, indicating that the `content` is the last in the turn.
-
interrupted
Setter for interrupted.interrupted: If true, indicates that a client message has interrupted current model generation. If the client is playing out the content in realtime, this is a good signal to stop and empty the current queue.
-
groundingMetadata
Setter for groundingMetadata.groundingMetadata: Metadata returned to client when grounding is enabled.
-
groundingMetadata
public LiveServerContent.Builder groundingMetadata(GroundingMetadata.Builder groundingMetadataBuilder) Setter for groundingMetadata builder.groundingMetadata: Metadata returned to client when grounding is enabled.
-
generationComplete
Setter for generationComplete.generationComplete: If true, indicates that the model is done generating. When model is interrupted while generating there will be no generation_complete message in interrupted turn, it will go through interrupted > turn_complete. When model assumes realtime playback there will be delay between generation_complete and turn_complete that is caused by model waiting for playback to finish. If true, indicates that the model has finished generating all content. This is a signal to the client that it can stop sending messages.
-
inputTranscription
Setter for inputTranscription.inputTranscription: Input transcription. The transcription is independent to the model turn which means it doesn’t imply any ordering between transcription and model turn.
-
inputTranscription
public LiveServerContent.Builder inputTranscription(Transcription.Builder inputTranscriptionBuilder) Setter for inputTranscription builder.inputTranscription: Input transcription. The transcription is independent to the model turn which means it doesn’t imply any ordering between transcription and model turn.
-
outputTranscription
Setter for outputTranscription.outputTranscription: Output transcription. The transcription is independent to the model turn which means it doesn’t imply any ordering between transcription and model turn.
-
outputTranscription
public LiveServerContent.Builder outputTranscription(Transcription.Builder outputTranscriptionBuilder) Setter for outputTranscription builder.outputTranscription: Output transcription. The transcription is independent to the model turn which means it doesn’t imply any ordering between transcription and model turn.
-
urlContextMetadata
Setter for urlContextMetadata.urlContextMetadata: Metadata related to url context retrieval tool.
-
urlContextMetadata
public LiveServerContent.Builder urlContextMetadata(UrlContextMetadata.Builder urlContextMetadataBuilder) Setter for urlContextMetadata builder.urlContextMetadata: Metadata related to url context retrieval tool.
-
turnCompleteReason
Setter for turnCompleteReason.turnCompleteReason: Reason for the turn is complete.
-
turnCompleteReason
@CanIgnoreReturnValue public LiveServerContent.Builder turnCompleteReason(TurnCompleteReason.Known knownType) Setter for turnCompleteReason given a known enum.turnCompleteReason: Reason for the turn is complete.
-
turnCompleteReason
@CanIgnoreReturnValue public LiveServerContent.Builder turnCompleteReason(String turnCompleteReason) Setter for turnCompleteReason given a string.turnCompleteReason: Reason for the turn is complete.
-
waitingForInput
Setter for waitingForInput.waitingForInput: If true, indicates that the model is not generating content because it is waiting for more input from the user, e.g. because it expects the user to continue talking.
-
build
-