Class LiveServerContent.Builder
-
- All Implemented Interfaces:
public abstract class LiveServerContent.BuilderBuilder for LiveServerContent.
-
-
Constructor Summary
Constructors Constructor Description LiveServerContent.Builder()
-
Method Summary
Modifier and Type Method Description abstract LiveServerContent.BuildermodelTurn(Content modelTurn)Setter for modelTurn. LiveServerContent.BuildermodelTurn(Content.Builder modelTurnBuilder)Setter for modelTurn builder. LiveServerContent.BuilderclearModelTurn()Clears the value of modelTurn field. abstract LiveServerContent.BuilderturnComplete(boolean turnComplete)Setter for turnComplete. LiveServerContent.BuilderclearTurnComplete()Clears the value of turnComplete field. abstract LiveServerContent.Builderinterrupted(boolean interrupted)Setter for interrupted. LiveServerContent.BuilderclearInterrupted()Clears the value of interrupted field. abstract LiveServerContent.BuildergroundingMetadata(GroundingMetadata groundingMetadata)Setter for groundingMetadata. LiveServerContent.BuildergroundingMetadata(GroundingMetadata.Builder groundingMetadataBuilder)Setter for groundingMetadata builder. LiveServerContent.BuilderclearGroundingMetadata()Clears the value of groundingMetadata field. abstract LiveServerContent.BuildergenerationComplete(boolean generationComplete)Setter for generationComplete. LiveServerContent.BuilderclearGenerationComplete()Clears the value of generationComplete field. abstract LiveServerContent.BuilderinputTranscription(Transcription inputTranscription)Setter for inputTranscription. LiveServerContent.BuilderinputTranscription(Transcription.Builder inputTranscriptionBuilder)Setter for inputTranscription builder. LiveServerContent.BuilderclearInputTranscription()Clears the value of inputTranscription field. abstract LiveServerContent.BuilderoutputTranscription(Transcription outputTranscription)Setter for outputTranscription. LiveServerContent.BuilderoutputTranscription(Transcription.Builder outputTranscriptionBuilder)Setter for outputTranscription builder. LiveServerContent.BuilderclearOutputTranscription()Clears the value of outputTranscription field. abstract LiveServerContent.BuilderurlContextMetadata(UrlContextMetadata urlContextMetadata)Setter for urlContextMetadata. LiveServerContent.BuilderurlContextMetadata(UrlContextMetadata.Builder urlContextMetadataBuilder)Setter for urlContextMetadata builder. LiveServerContent.BuilderclearUrlContextMetadata()Clears the value of urlContextMetadata field. abstract LiveServerContent.BuilderturnCompleteReason(TurnCompleteReason turnCompleteReason)Setter for turnCompleteReason. LiveServerContent.BuilderclearTurnCompleteReason()Clears the value of turnCompleteReason field. LiveServerContent.BuilderturnCompleteReason(TurnCompleteReason.Known knownType)Setter for turnCompleteReason given a known enum. LiveServerContent.BuilderturnCompleteReason(String turnCompleteReason)Setter for turnCompleteReason given a string. abstract LiveServerContent.BuilderwaitingForInput(boolean waitingForInput)Setter for waitingForInput. LiveServerContent.BuilderclearWaitingForInput()Clears the value of waitingForInput field. abstract LiveServerContentbuild()-
-
Method Detail
-
modelTurn
abstract LiveServerContent.Builder modelTurn(Content modelTurn)
Setter for modelTurn.
modelTurn: The content that the model has generated as part of the current conversation with the user.
-
modelTurn
@CanIgnoreReturnValue() LiveServerContent.Builder modelTurn(Content.Builder modelTurnBuilder)
Setter for modelTurn builder.
modelTurn: The content that the model has generated as part of the current conversation with the user.
-
clearModelTurn
@CanIgnoreReturnValue() LiveServerContent.Builder clearModelTurn()
Clears the value of modelTurn field.
-
turnComplete
abstract LiveServerContent.Builder turnComplete(boolean 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.
-
clearTurnComplete
@CanIgnoreReturnValue() LiveServerContent.Builder clearTurnComplete()
Clears the value of turnComplete field.
-
interrupted
abstract LiveServerContent.Builder interrupted(boolean 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.
-
clearInterrupted
@CanIgnoreReturnValue() LiveServerContent.Builder clearInterrupted()
Clears the value of interrupted field.
-
groundingMetadata
abstract LiveServerContent.Builder groundingMetadata(GroundingMetadata groundingMetadata)
Setter for groundingMetadata.
groundingMetadata: Metadata returned to client when grounding is enabled.
-
groundingMetadata
@CanIgnoreReturnValue() LiveServerContent.Builder groundingMetadata(GroundingMetadata.Builder groundingMetadataBuilder)
Setter for groundingMetadata builder.
groundingMetadata: Metadata returned to client when grounding is enabled.
-
clearGroundingMetadata
@CanIgnoreReturnValue() LiveServerContent.Builder clearGroundingMetadata()
Clears the value of groundingMetadata field.
-
generationComplete
abstract LiveServerContent.Builder generationComplete(boolean 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.
-
clearGenerationComplete
@CanIgnoreReturnValue() LiveServerContent.Builder clearGenerationComplete()
Clears the value of generationComplete field.
-
inputTranscription
abstract LiveServerContent.Builder inputTranscription(Transcription 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
@CanIgnoreReturnValue() 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.
-
clearInputTranscription
@CanIgnoreReturnValue() LiveServerContent.Builder clearInputTranscription()
Clears the value of inputTranscription field.
-
outputTranscription
abstract LiveServerContent.Builder outputTranscription(Transcription 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
@CanIgnoreReturnValue() 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.
-
clearOutputTranscription
@CanIgnoreReturnValue() LiveServerContent.Builder clearOutputTranscription()
Clears the value of outputTranscription field.
-
urlContextMetadata
abstract LiveServerContent.Builder urlContextMetadata(UrlContextMetadata urlContextMetadata)
Setter for urlContextMetadata.
urlContextMetadata: Metadata related to url context retrieval tool.
-
urlContextMetadata
@CanIgnoreReturnValue() LiveServerContent.Builder urlContextMetadata(UrlContextMetadata.Builder urlContextMetadataBuilder)
Setter for urlContextMetadata builder.
urlContextMetadata: Metadata related to url context retrieval tool.
-
clearUrlContextMetadata
@CanIgnoreReturnValue() LiveServerContent.Builder clearUrlContextMetadata()
Clears the value of urlContextMetadata field.
-
turnCompleteReason
abstract LiveServerContent.Builder turnCompleteReason(TurnCompleteReason turnCompleteReason)
Setter for turnCompleteReason.
turnCompleteReason: Reason for the turn is complete.
-
clearTurnCompleteReason
@CanIgnoreReturnValue() LiveServerContent.Builder clearTurnCompleteReason()
Clears the value of turnCompleteReason field.
-
turnCompleteReason
@CanIgnoreReturnValue() LiveServerContent.Builder turnCompleteReason(TurnCompleteReason.Known knownType)
Setter for turnCompleteReason given a known enum.
turnCompleteReason: Reason for the turn is complete.
-
turnCompleteReason
@CanIgnoreReturnValue() LiveServerContent.Builder turnCompleteReason(String turnCompleteReason)
Setter for turnCompleteReason given a string.
turnCompleteReason: Reason for the turn is complete.
-
waitingForInput
abstract LiveServerContent.Builder waitingForInput(boolean 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.
-
clearWaitingForInput
@CanIgnoreReturnValue() LiveServerContent.Builder clearWaitingForInput()
Clears the value of waitingForInput field.
-
build
abstract LiveServerContent build()
-
-
-
-