Class CreateModelInteraction
java.lang.Object
com.google.genai.gaos.models.interactions.CreateModelInteraction
CreateModelInteraction
Parameters for creating model interactions
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCreateModelInteraction(InteractionsInput input, Model model) CreateModelInteraction(Boolean background, CreateModelInteractionEnvironment environment, GenerationConfig generationConfig, InteractionsInput input, Map<String, String> labels, Model model, String previousInteractionId, CreateModelInteractionResponseFormat responseFormat, String responseMimeType, List<ResponseModality> responseModalities, List<SafetySetting> safetySettings, ServiceTier serviceTier, Boolean store, Boolean stream, String systemInstruction, List<Tool> tools, WebhookConfig webhookConfig) -
Method Summary
Modifier and TypeMethodDescriptionInput only.builder()The environment configuration for the interaction.booleanConfiguration parameters for model interactions.inthashCode()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.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.store()Input only.stream()Input only.System instruction for the interaction.tools()A list of tool declarations the model may call during interaction.toString()Message for configuring webhook events for a request.withBackground(Boolean background) Input only.withEnvironment(CreateModelInteractionEnvironment environment) The environment configuration for the interaction.withGenerationConfig(GenerationConfig generationConfig) Configuration parameters for model interactions.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.withPreviousInteractionId(String previousInteractionId) The ID of the previous interaction, if any.withResponseFormat(CreateModelInteractionResponseFormat 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) Input only.withStream(Boolean stream) Input only.withSystemInstruction(String systemInstruction) System instruction for the interaction.A list of tool declarations the model may call during interaction.withWebhookConfig(WebhookConfig webhookConfig) Message for configuring webhook events for a request.
-
Constructor Details
-
CreateModelInteraction
public CreateModelInteraction(@Nullable Boolean background, @Nullable CreateModelInteractionEnvironment environment, @Nullable GenerationConfig generationConfig, @Nonnull InteractionsInput input, @Nullable Map<String, String> labels, @Nonnull Model model, @Nullable String previousInteractionId, @Nullable CreateModelInteractionResponseFormat responseFormat, @Nullable String responseMimeType, @Nullable List<ResponseModality> responseModalities, @Nullable List<SafetySetting> safetySettings, @Nullable ServiceTier serviceTier, @Nullable Boolean store, @Nullable Boolean stream, @Nullable String systemInstruction, @Nullable List<Tool> tools, @Nullable WebhookConfig webhookConfig) -
CreateModelInteraction
-
-
Method Details
-
background
Input only. Whether to run the model interaction in the background. -
environment
The environment configuration for the interaction. Can be an object specifying remote environment sources or a string referencing an existing environment ID. -
generationConfig
Configuration parameters for model interactions. -
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. -
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
-
store
Input only. Whether to store the response and request for later retrieval. -
stream
Input only. Whether the interaction will be streamed. -
systemInstruction
System instruction for the interaction. -
tools
A list of tool declarations the model may call during interaction. -
webhookConfig
Message for configuring webhook events for a request. -
builder
-
withBackground
Input only. Whether to run the model interaction in the background. -
withEnvironment
public CreateModelInteraction withEnvironment(@Nullable CreateModelInteractionEnvironment environment) The environment configuration for the interaction. Can be an object specifying remote environment sources or a string referencing an existing environment ID. -
withGenerationConfig
Configuration parameters for model interactions. -
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. -
withPreviousInteractionId
The ID of the previous interaction, if any. -
withResponseFormat
public CreateModelInteraction withResponseFormat(@Nullable CreateModelInteractionResponseFormat responseFormat) 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 CreateModelInteraction 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
-
withStore
Input only. Whether to store the response and request for later retrieval. -
withStream
Input only. Whether the interaction will be streamed. -
withSystemInstruction
System instruction for the interaction. -
withTools
A list of tool declarations the model may call during interaction. -
withWebhookConfig
Message for configuring webhook events for a request. -
equals
-
hashCode
public int hashCode() -
toString
-