Builder

public final class Builder

A builder for CreateModelInteractionParams.

Functions

Link copied to clipboard
public final CreateModelInteractionParams.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
Link copied to clipboard

Alias for calling addTool with Tool.ofFunction(function).

Adds a single Tool to tools.

Alias for calling addTool with Tool.ofComputerUse(computerUse).

Alias for calling addTool with Tool.ofFileSearch(fileSearch).

Alias for calling addTool with Tool.ofGoogleMaps(googleMaps).

Alias for calling addTool with Tool.ofGoogleSearch(googleSearch).

Alias for calling addTool with Tool.ofMcpServer(mcpServer).

Alias for calling addTool with Tool.ofRetrieval(retrieval).

Link copied to clipboard

Alias for calling addTool with Tool.ofCodeExecution().

Link copied to clipboard

Alias for calling addTool with Tool.ofUrlContext().

Link copied to clipboard
public final CreateModelInteractionParams.Builder background(JsonField<Boolean> background)

Sets Builder.background to an arbitrary JSON value.

Input only. Whether to run the model interaction in the background.

Link copied to clipboard

Returns an immutable instance of CreateModelInteractionParams.

Link copied to clipboard

Sets Builder.created to an arbitrary JSON value.

Required. Output only. The time at which the response was created in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

Link copied to clipboard
public final CreateModelInteractionParams.Builder generationConfig(JsonField<GenerationConfig> generationConfig)

Sets Builder.generationConfig to an arbitrary JSON value.

Input only. Configuration parameters for the model interaction.

Link copied to clipboard
public final CreateModelInteractionParams.Builder id(JsonField<String> id)

Sets Builder.id to an arbitrary JSON value.

Required. Output only. A unique identifier for the interaction completion.

Link copied to clipboard

Sets Builder.input to an arbitrary JSON value.

Alias for calling input with Input.ofAudioContent(audioContent).

The input for the interaction.

Alias for calling input with Input.ofDocumentContent(documentContent).

Alias for calling input with Input.ofImageContent(imageContent).

Alias for calling input with Input.ofTextContent(textContent).

Alias for calling input with Input.ofVideoContent(videoContent).

Alias for calling input with Input.ofString(string).

Link copied to clipboard

Alias for calling input with Input.ofContentList(contentList).

Link copied to clipboard

Alias for calling input with Input.ofStepList(stepList).

Link copied to clipboard
public final CreateModelInteractionParams.Builder model(JsonField<Model> model)

Sets Builder.model to an arbitrary JSON value.

The model that will complete your prompt.\n\nSee models for additional details.

Sets model to an arbitrary String.

Link copied to clipboard
public final CreateModelInteractionParams.Builder previousInteractionId(JsonField<String> previousInteractionId)

Sets Builder.previousInteractionId to an arbitrary JSON value.

The ID of the previous interaction, if any.

Link copied to clipboard
Link copied to clipboard
public final CreateModelInteractionParams.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
Link copied to clipboard

Sets Builder.responseFormat to an arbitrary JSON value.

public final CreateModelInteractionParams.Builder responseFormat(JsonValue jsonValue)

Alias for calling responseFormat with ResponseFormat.ofJsonValue(jsonValue).

Alias for calling responseFormat with ResponseFormat.ofAudio(audio).

Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.

Alias for calling responseFormat with ResponseFormat.ofImage(image).

Alias for calling responseFormat with ResponseFormat.ofText(text).

Link copied to clipboard
Link copied to clipboard
public final CreateModelInteractionParams.Builder responseMimeType(JsonField<String> responseMimeType)

Sets Builder.responseMimeType to an arbitrary JSON value.

The mime type of the response. This is required if response_format is set.

Link copied to clipboard

Sets Builder.responseModalities to an arbitrary JSON value.

The requested modalities of the response (TEXT, IMAGE, AUDIO).

Link copied to clipboard
@Deprecated(message = "deprecated")
public final CreateModelInteractionParams.Builder role(JsonField<String> role)

Sets Builder.role to an arbitrary JSON value.

@Deprecated(message = "deprecated")
public final CreateModelInteractionParams.Builder role(String role)

Output only. The role of the interaction.

Link copied to clipboard

Sets Builder.serviceTier to an arbitrary JSON value.

The service tier for the interaction.

Link copied to clipboard

Sets Builder.status to an arbitrary JSON value.

Required. Output only. The status of the interaction.

Link copied to clipboard
public final CreateModelInteractionParams.Builder store(JsonField<Boolean> store)

Sets Builder.store to an arbitrary JSON value.

Input only. Whether to store the response and request for later retrieval.

Link copied to clipboard
public final CreateModelInteractionParams.Builder stream(JsonField<Boolean> stream)

Sets Builder.stream to an arbitrary JSON value.

Input only. Whether the interaction will be streamed.

Link copied to clipboard
public final CreateModelInteractionParams.Builder systemInstruction(JsonField<String> systemInstruction)

Sets Builder.systemInstruction to an arbitrary JSON value.

System instruction for the interaction.

Link copied to clipboard
public final CreateModelInteractionParams.Builder tools(JsonField<List<Tool>> tools)

Sets Builder.tools to an arbitrary JSON value.

A list of tool declarations the model may call during interaction.

Link copied to clipboard

Sets Builder.updated to an arbitrary JSON value.

Required. Output only. The time at which the response was last updated in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

Link copied to clipboard
public final CreateModelInteractionParams.Builder usage(JsonField<Usage> usage)

Sets Builder.usage to an arbitrary JSON value.

Output only. Statistics on the interaction request's token usage.

Link copied to clipboard

Sets Builder.webhookConfig to an arbitrary JSON value.

Optional. Webhook configuration for receiving notifications when the interaction completes.