Class Interaction
java.lang.Object
com.google.genai.gaos.models.interactions.Interaction
Interaction
The Interaction resource.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionInteraction(AgentOption agent, InteractionAgentConfig agentConfig, String created, InteractionEnvironment environment, String environmentId, List<Error> errors, GenerationConfig generationConfig, String id, InteractionsInput input, Map<String, String> labels, Model model, AudioContent outputAudio, ImageContent outputImage, String outputText, VideoContent outputVideo, String previousInteractionId, InteractionResponseFormat responseFormat, String responseMimeType, List<ResponseModality> responseModalities, List<SafetySetting> safetySettings, ServiceTier serviceTier, InteractionStatus status, List<Step> steps, String systemInstruction, List<Tool> tools, String updated, Usage usage, WebhookConfig webhookConfig) Interaction(InteractionStatus status) -
Method Summary
Modifier and TypeMethodDescriptionagent()The agent to interact with.Configuration parameters for the agent interaction.static Interaction.Builderbuilder()created()Output only.The environment configuration for the interaction.Output only.booleanerrors()Output only.Configuration parameters for model interactions.inthashCode()id()Required.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.An audio content block.An image content block.Concatenated text from the last model output in response to the current request.A video content block.The ID of the previous interaction, if any.Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.Deprecated.field: This will be removed in a future release, please migrate away from it as soon as possible.Deprecated.field: This will be removed in a future release, please migrate away from it as soon as possible.Safety settings for the interaction.voidsetOutputs(List<Content> outputs) status()Required.steps()Output only.System instruction for the interaction.tools()A list of tool declarations the model may call during interaction.toString()updated()Output only.usage()Statistics on the interaction request's token usage.Message for configuring webhook events for a request.withAgent(AgentOption agent) The agent to interact with.withAgentConfig(InteractionAgentConfig agentConfig) Configuration parameters for the agent interaction.withCreated(String created) Output only.withEnvironment(InteractionEnvironment environment) The environment configuration for the interaction.withEnvironmentId(String environmentId) Output only.withErrors(List<Error> errors) Output only.withGenerationConfig(GenerationConfig generationConfig) Configuration parameters for model interactions.Required.withInput(InteractionsInput input) The input for the interaction.withLabels(Map<String, String> labels) 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.withOutputAudio(AudioContent outputAudio) An audio content block.withOutputImage(ImageContent outputImage) An image content block.withOutputText(String outputText) Concatenated text from the last model output in response to the current request.withOutputVideo(VideoContent outputVideo) A video content block.withPreviousInteractionId(String previousInteractionId) The ID of the previous interaction, if any.withResponseFormat(InteractionResponseFormat responseFormat) Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.withResponseMimeType(String responseMimeType) Deprecated.field: This will be removed in a future release, please migrate away from it as soon as possible.withResponseModalities(List<ResponseModality> responseModalities) Deprecated.field: This will be removed in a future release, please migrate away from it as soon as possible.withSafetySettings(List<SafetySetting> safetySettings) Safety settings for the interaction.withServiceTier(ServiceTier serviceTier) withStatus(InteractionStatus status) Required.Output only.withSystemInstruction(String systemInstruction) System instruction for the interaction.A list of tool declarations the model may call during interaction.withUpdated(String updated) Output only.Statistics on the interaction request's token usage.withWebhookConfig(WebhookConfig webhookConfig) Message for configuring webhook events for a request.
-
Constructor Details
-
Interaction
public Interaction(@Nullable AgentOption agent, @Nullable InteractionAgentConfig agentConfig, @Nullable String created, @Nullable InteractionEnvironment environment, @Nullable String environmentId, @Nullable List<Error> errors, @Nullable GenerationConfig generationConfig, @Nullable String id, @Nullable InteractionsInput input, @Nullable Map<String, String> labels, @Nullable Model model, @Nullable AudioContent outputAudio, @Nullable ImageContent outputImage, @Nullable String outputText, @Nullable VideoContent outputVideo, @Nullable String previousInteractionId, @Nullable InteractionResponseFormat responseFormat, @Nullable String responseMimeType, @Nullable List<ResponseModality> responseModalities, @Nullable List<SafetySetting> safetySettings, @Nullable ServiceTier serviceTier, @Nonnull InteractionStatus status, @Nullable List<Step> steps, @Nullable String systemInstruction, @Nullable List<Tool> tools, @Nullable String updated, @Nullable Usage usage, @Nullable WebhookConfig webhookConfig) -
Interaction
-
-
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.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. -
setOutputs
-
builder
-
withAgent
The agent to interact with. -
withAgentConfig
Configuration parameters for the agent interaction. -
withCreated
Output only. The time at which the response was created in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). -
withEnvironment
The environment configuration for the interaction. Can be an object specifying remote environment sources or a string referencing an existing environment ID. -
withEnvironmentId
Output only. The environment ID for the interaction. Only populated if environment config is set in the request. -
withErrors
Output only. Diagnostic faults / platform errors recorded on the interaction. -
withGenerationConfig
Configuration parameters for model interactions. -
withId
Required. Output only. A unique identifier for the interaction completion. -
withInput
The input for the interaction. -
withLabels
The labels with user-defined metadata for the request. -
withModel
The model that will complete your prompt.\n\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details. -
withOutputAudio
An audio content block. -
withOutputImage
An image content block. -
withOutputText
Concatenated text from the last model output in response to the current request.Note: this is added by the SDK.
-
withOutputVideo
A video content block. -
withPreviousInteractionId
The ID of the previous interaction, if any. -
withResponseFormat
Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field. -
withResponseMimeType
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. -
withResponseModalities
@Deprecated public Interaction withResponseModalities(@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). -
withSafetySettings
Safety settings for the interaction. -
withServiceTier
-
withStatus
Required. Output only. The status of the interaction. -
withSteps
Output only. The steps that make up the interaction, when included in the response. -
withSystemInstruction
System instruction for the interaction. -
withTools
A list of tool declarations the model may call during interaction. -
withUpdated
Output only. The time at which the response was last updated in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). -
withUsage
Statistics on the interaction request's token usage. -
withWebhookConfig
Message for configuring webhook events for a request. -
equals
-
hashCode
public int hashCode() -
toString
-