Class CreateModelInteraction.Builder
java.lang.Object
com.google.genai.gaos.models.interactions.CreateModelInteraction.Builder
- Enclosing class:
- CreateModelInteraction
-
Method Summary
Modifier and TypeMethodDescriptionbackground(Boolean background) Input only.build()cachedContent(String cachedContent) Deprecated.field: This will be removed in a future release, please migrate away from it as soon as possible.continuationToken(String continuationToken) Opaque token to resume a long decode.environment(CreateModelInteractionEnvironment environment) The environment configuration for the interaction.generationConfig(GenerationConfig generationConfig) Configuration parameters for model interactions.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.previousInteractionId(String previousInteractionId) The ID of the previous interaction, if any.responseFormat(CreateModelInteractionResponseFormat 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) Input only.Input only.systemInstruction(String systemInstruction) System instruction for the interaction.A list of tool declarations the model may call during interaction.webhookConfig(WebhookConfig webhookConfig) Message for configuring webhook events for a request.
-
Method Details
-
background
Input only. Whether to run the model interaction in the background. -
cachedContent
Deprecated.field: This will be removed in a future release, please migrate away from it as soon as possible.The name of the cached content used as context to serve the prediction. Note: only used in explicit caching, where users can have control over caching (e.g. what content to cache) and enjoy guaranteed cost savings.Format: cachedContents/{cachedContent}
-
continuationToken
Opaque token to resume a long decode. Output: set when status is INCOMPLETE and decoding can be resumed. Input: pass the latest token back unchanged in CreateInteraction to continue decoding. -
environment
public CreateModelInteraction.Builder environment(@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. -
generationConfig
Configuration parameters for model interactions. -
input
The input for the interaction. -
labels
The labels with user-defined metadata for the request.Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.
-
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
public CreateModelInteraction.Builder responseFormat(@Nullable CreateModelInteractionResponseFormat responseFormat) Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field. -
responseMimeType
@Deprecated public CreateModelInteraction.Builder responseMimeType(@Nullable String 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 CreateModelInteraction.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
-
store
Input only. Whether to store the response and request for later retrieval. -
model
-
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. -
build
-