Class Interaction.Builder
java.lang.Object
com.google.genai.gaos.models.interactions.Interaction.Builder
- Enclosing class:
- Interaction
-
Method Summary
Modifier and TypeMethodDescriptionagent(AgentOption agent) The agent to interact with.agentConfig(InteractionAgentConfig agentConfig) Configuration parameters for the agent interaction.build()Output only.environment(InteractionEnvironment environment) The environment configuration for the interaction.environmentId(String environmentId) Output only.Output only.generationConfig(GenerationConfig generationConfig) Configuration parameters for model interactions.Required.input(InteractionsInput input) The input for the interaction.The labels with user-defined metadata for the request.The model that will complete your prompt.\n\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details.outputAudio(AudioContent outputAudio) An audio content block.outputImage(ImageContent outputImage) An image content block.outputText(String outputText) Concatenated text from the last model output in response to the current request.outputVideo(VideoContent outputVideo) A video content block.previousInteractionId(String previousInteractionId) The ID of the previous interaction, if any.responseFormat(InteractionResponseFormat responseFormat) Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.responseMimeType(String responseMimeType) Deprecated.field: This will be removed in a future release, please migrate away from it as soon as possible.responseModalities(List<ResponseModality> responseModalities) Deprecated.field: This will be removed in a future release, please migrate away from it as soon as possible.safetySettings(List<SafetySetting> safetySettings) Safety settings for the interaction.serviceTier(ServiceTier serviceTier) status(InteractionStatus status) Required.Output only.systemInstruction(String systemInstruction) System instruction for the interaction.A list of tool declarations the model may call during interaction.Output only.Statistics on the interaction request's token usage.webhookConfig(WebhookConfig webhookConfig) Message for configuring webhook events for a request.
-
Method Details
-
agent
The agent to interact with. -
agentConfig
Configuration parameters for the agent interaction. -
created
Output only. The time at which the response was created in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). -
environment
The environment configuration for the interaction. Can be an object specifying remote environment sources or a string referencing an existing environment ID. -
environmentId
Output only. The environment ID for the interaction. Only populated if environment config is set in the request. -
errors
Output only. Diagnostic faults / platform errors recorded on the interaction. -
generationConfig
Configuration parameters for model interactions. -
id
Required. Output only. A unique identifier for the interaction completion. -
input
The input for the interaction. -
labels
The labels with user-defined metadata for the request. -
model
The model that will complete your prompt.\n\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details. -
outputAudio
An audio content block. -
outputImage
An image content block. -
outputText
Concatenated text from the last model output in response to the current request.Note: this is added by the SDK.
-
outputVideo
A video content block. -
previousInteractionId
The ID of the previous interaction, if any. -
responseFormat
Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field. -
responseMimeType
Deprecated.field: This will be removed in a future release, please migrate away from it as soon as possible.The mime type of the response. This is required if response_format is set. -
responseModalities
@Deprecated public Interaction.Builder responseModalities(@Nullable List<ResponseModality> responseModalities) Deprecated.field: This will be removed in a future release, please migrate away from it as soon as possible.The requested modalities of the response (TEXT, IMAGE, AUDIO). -
safetySettings
Safety settings for the interaction. -
serviceTier
-
status
Required. Output only. The status of the interaction. -
steps
Output only. The steps that make up the interaction, when included in the response. -
systemInstruction
System instruction for the interaction. -
tools
A list of tool declarations the model may call during interaction. -
updated
Output only. The time at which the response was last updated in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). -
usage
Statistics on the interaction request's token usage. -
webhookConfig
Message for configuring webhook events for a request. -
build
-