Interaction: {
    agent?: AgentOption;
    agent_config?: DynamicAgentConfig | DeepResearchAgentConfig;
    cached_content?: string;
    created?: string;
    environment?: Environment | string;
    environment_id?: string;
    generation_config?: GenerationConfig;
    id: string;
    input?: InteractionsInput;
    model?: Model;
    output_audio?: AudioContent;
    output_image?: ImageContent;
    output_text?: string;
    output_video?: VideoContent;
    previous_interaction_id?: string;
    response_format?: ResponseFormat[] | ResponseFormat;
    response_mime_type?: string;
    response_modalities?: ResponseModality[];
    service_tier?: ServiceTier;
    status: InteractionStatus;
    steps?: Step[];
    system_instruction?: string;
    tools?: Tool[];
    updated?: string;
    usage?: Usage;
    webhook_config?: WebhookConfig;
}

The Interaction resource.

Type declaration

  • Optionalagent?: AgentOption

    The agent to interact with.

  • Optionalagent_config?: DynamicAgentConfig | DeepResearchAgentConfig

    Configuration parameters for the agent interaction.

  • Optionalcached_content?: string

    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: projects/{project}/locations/{location}/cachedContents/{cachedContent}

  • Optionalcreated?: string

    Output only. The time at which the response was created in ISO 8601 format

    (YYYY-MM-DDThh:mm:ssZ).

  • Optionalenvironment?: Environment | string

    The environment configuration for the interaction. Can be an object specifying remote environment sources or a string referencing an existing environment ID.

  • Optionalenvironment_id?: string

    Output only. The environment ID for the interaction. Only populated if environment

    config is set in the request.

  • Optionalgeneration_config?: GenerationConfig

    Configuration parameters for model interactions.

  • id: string

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

  • Optionalinput?: InteractionsInput

    The input for the interaction.

  • Optionalmodel?: Model

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

  • Optionaloutput_audio?: AudioContent

    An audio content block.

  • Optionaloutput_image?: ImageContent

    An image content block.

  • Optionaloutput_text?: string

    Concatenated text from the last model output in response to the current request.

    Note: this is added by the SDK.

  • Optionaloutput_video?: VideoContent

    A video content block.

  • Optionalprevious_interaction_id?: string

    The ID of the previous interaction, if any.

  • Optionalresponse_format?: ResponseFormat[] | ResponseFormat

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

  • Optionalresponse_mime_type?: string

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

    field: This will be removed in a future release, please migrate away from it as soon as possible.

  • Optionalresponse_modalities?: ResponseModality[]

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

  • Optionalservice_tier?: ServiceTier
  • status: InteractionStatus

    Required. Output only. The status of the interaction.

  • Optionalsteps?: Step[]

    Output only. The steps that make up the interaction, when included in the response.

  • Optionalsystem_instruction?: string

    System instruction for the interaction.

  • Optionaltools?: Tool[]

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

  • Optionalupdated?: string

    Output only. The time at which the response was last updated in ISO 8601 format

    (YYYY-MM-DDThh:mm:ssZ).

  • Optionalusage?: Usage

    Statistics on the interaction request's token usage.

  • Optionalwebhook_config?: WebhookConfig

    Message for configuring webhook events for a request.