CreateModelInteraction: {
    background?: boolean;
    cached_content?: string;
    continuation_token?: string;
    environment?: Environment | string;
    generation_config?: GenerationConfig;
    input?: InteractionsInput;
    labels?: { [k: string]: string };
    model: Model;
    previous_interaction_id?: string;
    response_format?: ResponseFormat | ResponseFormat[];
    response_mime_type?: string;
    response_modalities?: ResponseModality[];
    safety_settings?: SafetySetting[];
    service_tier?: ServiceTier;
    store?: boolean;
    stream?: boolean;
    system_instruction?: string;
    tools?: Tool[];
    webhook_config?: WebhookConfig;
}

Interaction for generating the completion using models.

Type declaration

  • Optionalbackground?: boolean

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

  • 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: cachedContents/{cachedContent}

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

  • Optionalcontinuation_token?: string

    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.

  • 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.

  • Optionalgeneration_config?: GenerationConfig

    Configuration parameters for model interactions.

  • Optionalinput?: InteractionsInput

    The input for the interaction.

  • Optionallabels?: { [k: string]: string }

    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: Model

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

  • 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).

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

  • Optionalsafety_settings?: SafetySetting[]

    Safety settings for the interaction.

  • Optionalservice_tier?: ServiceTier
  • Optionalstore?: boolean

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

  • Optionalstream?: boolean

    Input only. Whether the interaction will be streamed.

  • Optionalsystem_instruction?: string

    System instruction for the interaction.

  • Optionaltools?: Tool[]

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

  • Optionalwebhook_config?: WebhookConfig

    Message for configuring webhook events for a request.