UNPKG

googleapis

Version:
1,123 lines 86.8 kB
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common'; import { Readable } from 'stream'; export declare namespace firebaseml_v2beta { export interface Options extends GlobalOptions { version: 'v2beta'; } interface StandardParameters { /** * Auth client or API Key for the request */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth; /** * V1 error format. */ '$.xgafv'?: string; /** * OAuth access token. */ access_token?: string; /** * Data format for response. */ alt?: string; /** * JSONP */ callback?: string; /** * Selector specifying which fields to include in a partial response. */ fields?: string; /** * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ key?: string; /** * OAuth 2.0 token for the current user. */ oauth_token?: string; /** * Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** * Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** * Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; } /** * Firebase ML API * * Access custom machine learning models hosted via Firebase ML. * * @example * ```js * const {google} = require('googleapis'); * const firebaseml = google.firebaseml('v2beta'); * ``` */ export class Firebaseml { context: APIRequestContext; projects: Resource$Projects; constructor(options: GlobalOptions, google?: GoogleConfigurable); } /** * Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp */ export interface Schema$Date { /** * Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */ day?: number | null; /** * Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */ month?: number | null; /** * Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */ year?: number | null; } /** * The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. */ export interface Schema$GoogleCloudAiplatformV1beta1ApiAuth { /** * The API secret. */ apiKeyConfig?: Schema$GoogleCloudAiplatformV1beta1ApiAuthApiKeyConfig; } /** * The API secret. */ export interface Schema$GoogleCloudAiplatformV1beta1ApiAuthApiKeyConfig { /** * Required. The SecretManager secret version resource name storing API key. e.g. projects/{project\}/secrets/{secret\}/versions/{version\} */ apiKeySecretVersion?: string | null; /** * The API key string. Either this or `api_key_secret_version` must be set. */ apiKeyString?: string | null; } /** * Auth configuration to run the extension. */ export interface Schema$GoogleCloudAiplatformV1beta1AuthConfig { /** * Config for API key auth. */ apiKeyConfig?: Schema$GoogleCloudAiplatformV1beta1AuthConfigApiKeyConfig; /** * Type of auth scheme. */ authType?: string | null; /** * Config for Google Service Account auth. */ googleServiceAccountConfig?: Schema$GoogleCloudAiplatformV1beta1AuthConfigGoogleServiceAccountConfig; /** * Config for HTTP Basic auth. */ httpBasicAuthConfig?: Schema$GoogleCloudAiplatformV1beta1AuthConfigHttpBasicAuthConfig; /** * Config for user oauth. */ oauthConfig?: Schema$GoogleCloudAiplatformV1beta1AuthConfigOauthConfig; /** * Config for user OIDC auth. */ oidcConfig?: Schema$GoogleCloudAiplatformV1beta1AuthConfigOidcConfig; } /** * Config for authentication with API key. */ export interface Schema$GoogleCloudAiplatformV1beta1AuthConfigApiKeyConfig { /** * Optional. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project\}/secrets/{secrete\}/versions/{version\}` - If both `api_key_secret` and `api_key_string` are specified, this field takes precedence over `api_key_string`. - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource. */ apiKeySecret?: string | null; /** * Optional. The API key to be used in the request directly. */ apiKeyString?: string | null; /** * Optional. The location of the API key. */ httpElementLocation?: string | null; /** * Optional. The parameter name of the API key. E.g. If the API request is "https://example.com/act?api_key=", "api_key" would be the parameter name. */ name?: string | null; } /** * Config for Google Service Account Authentication. */ export interface Schema$GoogleCloudAiplatformV1beta1AuthConfigGoogleServiceAccountConfig { /** * Optional. The service account that the extension execution service runs as. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified service account. - If not specified, the Vertex AI Extension Service Agent will be used to execute the Extension. */ serviceAccount?: string | null; } /** * Config for HTTP Basic Authentication. */ export interface Schema$GoogleCloudAiplatformV1beta1AuthConfigHttpBasicAuthConfig { /** * Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project\}/secrets/{secrete\}/versions/{version\}` - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource. */ credentialSecret?: string | null; } /** * Config for user oauth. */ export interface Schema$GoogleCloudAiplatformV1beta1AuthConfigOauthConfig { /** * Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time. */ accessToken?: string | null; /** * The service account used to generate access tokens for executing the Extension. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account. */ serviceAccount?: string | null; } /** * Config for user OIDC auth. */ export interface Schema$GoogleCloudAiplatformV1beta1AuthConfigOidcConfig { /** * OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time. */ idToken?: string | null; /** * The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc). - The audience for the token will be set to the URL in the server url defined in the OpenApi spec. - If the service account is provided, the service account should grant `iam.serviceAccounts.getOpenIdToken` permission to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents). */ serviceAccount?: string | null; } /** * Content blob. */ export interface Schema$GoogleCloudAiplatformV1beta1Blob { /** * Required. Raw bytes. */ data?: string | null; /** * Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled. */ displayName?: string | null; /** * Required. The IANA standard MIME type of the source data. */ mimeType?: string | null; } /** * A response candidate generated from the model. */ export interface Schema$GoogleCloudAiplatformV1beta1Candidate { /** * Output only. Average log probability score of the candidate. */ avgLogprobs?: number | null; /** * Output only. Source attribution of the generated content. */ citationMetadata?: Schema$GoogleCloudAiplatformV1beta1CitationMetadata; /** * Output only. Content parts of the candidate. */ content?: Schema$GoogleCloudAiplatformV1beta1Content; /** * Output only. Describes the reason the mode stopped generating tokens in more detail. This is only filled when `finish_reason` is set. */ finishMessage?: string | null; /** * Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens. */ finishReason?: string | null; /** * Output only. Metadata specifies sources used to ground generated content. */ groundingMetadata?: Schema$GoogleCloudAiplatformV1beta1GroundingMetadata; /** * Output only. Index of the candidate. */ index?: number | null; /** * Output only. Log-likelihood scores for the response tokens and top tokens */ logprobsResult?: Schema$GoogleCloudAiplatformV1beta1LogprobsResult; /** * Output only. List of ratings for the safety of a response candidate. There is at most one rating per category. */ safetyRatings?: Schema$GoogleCloudAiplatformV1beta1SafetyRating[]; /** * Output only. Metadata related to url context retrieval tool. */ urlContextMetadata?: Schema$GoogleCloudAiplatformV1beta1UrlContextMetadata; } /** * Source attributions for content. */ export interface Schema$GoogleCloudAiplatformV1beta1Citation { /** * Output only. End index into the content. */ endIndex?: number | null; /** * Output only. License of the attribution. */ license?: string | null; /** * Output only. Publication date of the attribution. */ publicationDate?: Schema$Date; /** * Output only. Start index into the content. */ startIndex?: number | null; /** * Output only. Title of the attribution. */ title?: string | null; /** * Output only. Url reference of the attribution. */ uri?: string | null; } /** * A collection of source attributions for a piece of content. */ export interface Schema$GoogleCloudAiplatformV1beta1CitationMetadata { /** * Output only. List of citations. */ citations?: Schema$GoogleCloudAiplatformV1beta1Citation[]; } /** * Result of executing the [ExecutableCode]. Only generated when using the [CodeExecution] tool, and always follows a `part` containing the [ExecutableCode]. */ export interface Schema$GoogleCloudAiplatformV1beta1CodeExecutionResult { /** * Required. Outcome of the code execution. */ outcome?: string | null; /** * Optional. Contains stdout when code execution is successful, stderr or other description otherwise. */ output?: string | null; } /** * The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. */ export interface Schema$GoogleCloudAiplatformV1beta1Content { /** * Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. */ parts?: Schema$GoogleCloudAiplatformV1beta1Part[]; /** * Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. */ role?: string | null; } /** * Request message for PredictionService.CountTokens. */ export interface Schema$GoogleCloudAiplatformV1beta1CountTokensRequest { /** * Optional. Input content. */ contents?: Schema$GoogleCloudAiplatformV1beta1Content[]; /** * Optional. Generation config that the model will use to generate the response. */ generationConfig?: Schema$GoogleCloudAiplatformV1beta1GenerationConfig; /** * Optional. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model. */ instances?: any[] | null; /** * Optional. The name of the publisher model requested to serve the prediction. Format: `projects/{project\}/locations/{location\}/publishers/x/models/x` */ model?: string | null; /** * Optional. The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph. */ systemInstruction?: Schema$GoogleCloudAiplatformV1beta1Content; /** * Optional. A list of `Tools` the model may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. */ tools?: Schema$GoogleCloudAiplatformV1beta1Tool[]; } /** * Response message for PredictionService.CountTokens. */ export interface Schema$GoogleCloudAiplatformV1beta1CountTokensResponse { /** * Output only. List of modalities that were processed in the request input. */ promptTokensDetails?: Schema$GoogleCloudAiplatformV1beta1ModalityTokenCount[]; /** * The total number of billable characters counted across all instances from the request. */ totalBillableCharacters?: number | null; /** * The total number of tokens counted across all instances from the request. */ totalTokens?: number | null; } /** * Describes the options to customize dynamic retrieval. */ export interface Schema$GoogleCloudAiplatformV1beta1DynamicRetrievalConfig { /** * Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. */ dynamicThreshold?: number | null; /** * The mode of the predictor to be used in dynamic retrieval. */ mode?: string | null; } /** * Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. */ export interface Schema$GoogleCloudAiplatformV1beta1EnterpriseWebSearch { } /** * Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the [CodeExecution] tool, in which the code will be automatically executed, and a corresponding [CodeExecutionResult] will also be generated. */ export interface Schema$GoogleCloudAiplatformV1beta1ExecutableCode { /** * Required. The code to be executed. */ code?: string | null; /** * Required. Programming language of the `code`. */ language?: string | null; } /** * Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. */ export interface Schema$GoogleCloudAiplatformV1beta1ExternalApi { /** * The authentication config to access the API. Deprecated. Please use auth_config instead. */ apiAuth?: Schema$GoogleCloudAiplatformV1beta1ApiAuth; /** * The API spec that the external API implements. */ apiSpec?: string | null; /** * The authentication config to access the API. */ authConfig?: Schema$GoogleCloudAiplatformV1beta1AuthConfig; /** * Parameters for the elastic search API. */ elasticSearchParams?: Schema$GoogleCloudAiplatformV1beta1ExternalApiElasticSearchParams; /** * The endpoint of the external API. The system will call the API at this endpoint to retrieve the data for grounding. Example: https://acme.com:443/search */ endpoint?: string | null; /** * Parameters for the simple search API. */ simpleSearchParams?: Schema$GoogleCloudAiplatformV1beta1ExternalApiSimpleSearchParams; } /** * The search parameters to use for the ELASTIC_SEARCH spec. */ export interface Schema$GoogleCloudAiplatformV1beta1ExternalApiElasticSearchParams { /** * The ElasticSearch index to use. */ index?: string | null; /** * Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch as the `num_hits` param. */ numHits?: number | null; /** * The ElasticSearch search template to use. */ searchTemplate?: string | null; } /** * The search parameters to use for SIMPLE_SEARCH spec. */ export interface Schema$GoogleCloudAiplatformV1beta1ExternalApiSimpleSearchParams { } /** * URI based data. */ export interface Schema$GoogleCloudAiplatformV1beta1FileData { /** * Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled. */ displayName?: string | null; /** * Required. URI. */ fileUri?: string | null; /** * Required. The IANA standard MIME type of the source data. */ mimeType?: string | null; } /** * A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values. */ export interface Schema$GoogleCloudAiplatformV1beta1FunctionCall { /** * Optional. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. */ args?: { [key: string]: any; } | null; /** * Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`. */ id?: string | null; /** * Required. The name of the function to call. Matches [FunctionDeclaration.name]. */ name?: string | null; } /** * Function calling config. */ export interface Schema$GoogleCloudAiplatformV1beta1FunctionCallingConfig { /** * Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. */ allowedFunctionNames?: string[] | null; /** * Optional. Function calling mode. */ mode?: string | null; } /** * Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client. */ export interface Schema$GoogleCloudAiplatformV1beta1FunctionDeclaration { /** * Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */ description?: string | null; /** * Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. */ name?: string | null; /** * Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 */ parameters?: Schema$GoogleCloudAiplatformV1beta1Schema; /** * Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { "type": "object", "properties": { "name": { "type": "string" \}, "age": { "type": "integer" \} \}, "additionalProperties": false, "required": ["name", "age"], "propertyOrdering": ["name", "age"] \} ``` This field is mutually exclusive with `parameters`. */ parametersJsonSchema?: any | null; /** * Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function. */ response?: Schema$GoogleCloudAiplatformV1beta1Schema; /** * Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`. */ responseJsonSchema?: any | null; } /** * The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction. */ export interface Schema$GoogleCloudAiplatformV1beta1FunctionResponse { /** * Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`. */ id?: string | null; /** * Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. */ name?: string | null; /** * Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. */ response?: { [key: string]: any; } | null; } /** * Request message for [PredictionService.GenerateContent]. */ export interface Schema$GoogleCloudAiplatformV1beta1GenerateContentRequest { /** * Optional. 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\}` */ cachedContent?: string | null; /** * Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request. */ contents?: Schema$GoogleCloudAiplatformV1beta1Content[]; /** * Optional. Generation config. */ generationConfig?: Schema$GoogleCloudAiplatformV1beta1GenerationConfig; /** * Optional. The labels with user-defined metadata for the request. It is used for billing and reporting only. 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. */ labels?: { [key: string]: string; } | null; /** * Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates. */ safetySettings?: Schema$GoogleCloudAiplatformV1beta1SafetySetting[]; /** * Optional. The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph. */ systemInstruction?: Schema$GoogleCloudAiplatformV1beta1Content; /** * Optional. Tool config. This config is shared for all tools provided in the request. */ toolConfig?: Schema$GoogleCloudAiplatformV1beta1ToolConfig; /** * Optional. A list of `Tools` the model may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. */ tools?: Schema$GoogleCloudAiplatformV1beta1Tool[]; } /** * Response message for [PredictionService.GenerateContent]. */ export interface Schema$GoogleCloudAiplatformV1beta1GenerateContentResponse { /** * Output only. Generated candidates. */ candidates?: Schema$GoogleCloudAiplatformV1beta1Candidate[]; /** * Output only. Timestamp when the request is made to the server. */ createTime?: string | null; /** * Output only. The model version used to generate the response. */ modelVersion?: string | null; /** * Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations. */ promptFeedback?: Schema$GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback; /** * Output only. response_id is used to identify each response. It is the encoding of the event_id. */ responseId?: string | null; /** * Usage metadata about the response(s). */ usageMetadata?: Schema$GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata; } /** * Content filter results for a prompt sent in the request. */ export interface Schema$GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback { /** * Output only. Blocked reason. */ blockReason?: string | null; /** * Output only. A readable block reason message. */ blockReasonMessage?: string | null; /** * Output only. Safety ratings. */ safetyRatings?: Schema$GoogleCloudAiplatformV1beta1SafetyRating[]; } /** * Usage metadata about response(s). */ export interface Schema$GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata { /** * Output only. Number of tokens in the cached part in the input (the cached content). */ cachedContentTokenCount?: number | null; /** * Output only. List of modalities of the cached content in the request input. */ cacheTokensDetails?: Schema$GoogleCloudAiplatformV1beta1ModalityTokenCount[]; /** * Number of tokens in the response(s). */ candidatesTokenCount?: number | null; /** * Output only. List of modalities that were returned in the response. */ candidatesTokensDetails?: Schema$GoogleCloudAiplatformV1beta1ModalityTokenCount[]; /** * Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */ promptTokenCount?: number | null; /** * Output only. List of modalities that were processed in the request input. */ promptTokensDetails?: Schema$GoogleCloudAiplatformV1beta1ModalityTokenCount[]; /** * Output only. Number of tokens present in thoughts output. */ thoughtsTokenCount?: number | null; /** * Output only. Number of tokens present in tool-use prompt(s). */ toolUsePromptTokenCount?: number | null; /** * Output only. List of modalities that were processed for tool-use request inputs. */ toolUsePromptTokensDetails?: Schema$GoogleCloudAiplatformV1beta1ModalityTokenCount[]; /** * Total token count for prompt, response candidates, and tool-use prompts (if present). */ totalTokenCount?: number | null; /** * Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */ trafficType?: string | null; } /** * Generation config. */ export interface Schema$GoogleCloudAiplatformV1beta1GenerationConfig { /** * Optional. If enabled, audio timestamp will be included in the request to the model. */ audioTimestamp?: boolean | null; /** * Optional. Number of candidates to generate. */ candidateCount?: number | null; /** * Optional. If enabled, the model will detect emotions and adapt its responses accordingly. */ enableAffectiveDialog?: boolean | null; /** * Optional. Frequency penalties. */ frequencyPenalty?: number | null; /** * Optional. Logit probabilities. */ logprobs?: number | null; /** * Optional. The maximum number of output tokens to generate per message. */ maxOutputTokens?: number | null; /** * Optional. If specified, the media resolution specified will be used. */ mediaResolution?: string | null; /** * Optional. Config for model selection. */ modelConfig?: Schema$GoogleCloudAiplatformV1beta1GenerationConfigModelConfig; /** * Optional. Positive penalties. */ presencePenalty?: number | null; /** * Optional. Output schema of the generated response. This is an alternative to `response_schema` that accepts [JSON Schema](https://json-schema.org/). If set, `response_schema` must be omitted, but `response_mime_type` is required. While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported: - `$id` - `$defs` - `$ref` - `$anchor` - `type` - `format` - `title` - `description` - `enum` (for strings and numbers) - `items` - `prefixItems` - `minItems` - `maxItems` - `minimum` - `maximum` - `anyOf` - `oneOf` (interpreted the same as `anyOf`) - `properties` - `additionalProperties` - `required` The non-standard `propertyOrdering` property may also be set. Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If `$ref` is set on a sub-schema, no other properties, except for than those starting as a `$`, may be set. */ responseJsonSchema?: any | null; /** * Optional. If true, export the logprobs results in response. */ responseLogprobs?: boolean | null; /** * Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. */ responseMimeType?: string | null; /** * Optional. The modalities of the response. */ responseModalities?: string[] | null; /** * Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response. */ responseSchema?: Schema$GoogleCloudAiplatformV1beta1Schema; /** * Optional. Routing configuration. */ routingConfig?: Schema$GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig; /** * Optional. Seed. */ seed?: number | null; /** * Optional. The speech generation config. */ speechConfig?: Schema$GoogleCloudAiplatformV1beta1SpeechConfig; /** * Optional. Stop sequences. */ stopSequences?: string[] | null; /** * Optional. Controls the randomness of predictions. */ temperature?: number | null; /** * Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking. */ thinkingConfig?: Schema$GoogleCloudAiplatformV1beta1GenerationConfigThinkingConfig; /** * Optional. If specified, top-k sampling will be used. */ topK?: number | null; /** * Optional. If specified, nucleus sampling will be used. */ topP?: number | null; } /** * Config for model selection. */ export interface Schema$GoogleCloudAiplatformV1beta1GenerationConfigModelConfig { /** * Required. Feature selection preference. */ featureSelectionPreference?: string | null; } /** * The configuration for routing the request to a specific model. */ export interface Schema$GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig { /** * Automated routing. */ autoMode?: Schema$GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigAutoRoutingMode; /** * Manual routing. */ manualMode?: Schema$GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigManualRoutingMode; } /** * When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. */ export interface Schema$GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigAutoRoutingMode { /** * The model routing preference. */ modelRoutingPreference?: string | null; } /** * When manual routing is set, the specified model will be used directly. */ export interface Schema$GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigManualRoutingMode { /** * The model name to use. Only the public LLM models are accepted. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models). */ modelName?: string | null; } /** * Config for thinking features. */ export interface Schema$GoogleCloudAiplatformV1beta1GenerationConfigThinkingConfig { /** * Optional. Indicates whether to include thoughts in the response. If true, thoughts are returned only when available. */ includeThoughts?: boolean | null; /** * Optional. Indicates the thinking budget in tokens. */ thinkingBudget?: number | null; } /** * Tool to retrieve public web data for grounding, powered by Google. */ export interface Schema$GoogleCloudAiplatformV1beta1GoogleSearchRetrieval { /** * Specifies the dynamic retrieval configuration for the given source. */ dynamicRetrievalConfig?: Schema$GoogleCloudAiplatformV1beta1DynamicRetrievalConfig; } /** * Grounding chunk. */ export interface Schema$GoogleCloudAiplatformV1beta1GroundingChunk { /** * Grounding chunk from context retrieved by the retrieval tools. */ retrievedContext?: Schema$GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext; /** * Grounding chunk from the web. */ web?: Schema$GoogleCloudAiplatformV1beta1GroundingChunkWeb; } /** * Chunk from context retrieved by the retrieval tools. */ export interface Schema$GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext { /** * Additional context for the RAG retrieval result. This is only populated when using the RAG retrieval tool. */ ragChunk?: Schema$GoogleCloudAiplatformV1beta1RagChunk; /** * Text of the attribution. */ text?: string | null; /** * Title of the attribution. */ title?: string | null; /** * URI reference of the attribution. */ uri?: string | null; } /** * Chunk from the web. */ export interface Schema$GoogleCloudAiplatformV1beta1GroundingChunkWeb { /** * Domain of the (original) URI. */ domain?: string | null; /** * Title of the chunk. */ title?: string | null; /** * URI reference of the chunk. */ uri?: string | null; } /** * Metadata returned to client when grounding is enabled. */ export interface Schema$GoogleCloudAiplatformV1beta1GroundingMetadata { /** * List of supporting references retrieved from specified grounding source. */ groundingChunks?: Schema$GoogleCloudAiplatformV1beta1GroundingChunk[]; /** * Optional. List of grounding support. */ groundingSupports?: Schema$GoogleCloudAiplatformV1beta1GroundingSupport[]; /** * Optional. Output only. Retrieval metadata. */ retrievalMetadata?: Schema$GoogleCloudAiplatformV1beta1RetrievalMetadata; /** * Optional. Queries executed by the retrieval tools. */ retrievalQueries?: string[] | null; /** * Optional. Google search entry for the following-up web searches. */ searchEntryPoint?: Schema$GoogleCloudAiplatformV1beta1SearchEntryPoint; /** * Optional. Web search queries for the following-up web search. */ webSearchQueries?: string[] | null; } /** * Grounding support. */ export interface Schema$GoogleCloudAiplatformV1beta1GroundingSupport { /** * Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. For Gemini 2.0 and before, this list must have the same size as the grounding_chunk_indices. For Gemini 2.5 and after, this list will be empty and should be ignored. */ confidenceScores?: number[] | null; /** * A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim. */ groundingChunkIndices?: number[] | null; /** * Segment of the content this support belongs to. */ segment?: Schema$GoogleCloudAiplatformV1beta1Segment; } /** * Logprobs Result */ export interface Schema$GoogleCloudAiplatformV1beta1LogprobsResult { /** * Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates. */ chosenCandidates?: Schema$GoogleCloudAiplatformV1beta1LogprobsResultCandidate[]; /** * Length = total number of decoding steps. */ topCandidates?: Schema$GoogleCloudAiplatformV1beta1LogprobsResultTopCandidates[]; } /** * Candidate for the logprobs token and score. */ export interface Schema$GoogleCloudAiplatformV1beta1LogprobsResultCandidate { /** * The candidate's log probability. */ logProbability?: number | null; /** * The candidate's token string value. */ token?: string | null; /** * The candidate's token id value. */ tokenId?: number | null; } /** * Candidates with top log probabilities at each decoding step. */ export interface Schema$GoogleCloudAiplatformV1beta1LogprobsResultTopCandidates { /** * Sorted by log probability in descending order. */ candidates?: Schema$GoogleCloudAiplatformV1beta1LogprobsResultCandidate[]; } /** * Represents token counting info for a single modality. */ export interface Schema$GoogleCloudAiplatformV1beta1ModalityTokenCount { /** * The modality associated with this token count. */ modality?: string | null; /** * Number of tokens. */ tokenCount?: number | null; } /** * A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes. */ export interface Schema$GoogleCloudAiplatformV1beta1Part { /** * Optional. Result of executing the [ExecutableCode]. */ codeExecutionResult?: Schema$GoogleCloudAiplatformV1beta1CodeExecutionResult; /** * Optional. Code generated by the model that is meant to be executed. */ executableCode?: Schema$GoogleCloudAiplatformV1beta1ExecutableCode; /** * Optional. URI based data. */ fileData?: Schema$GoogleCloudAiplatformV1beta1FileData; /** * Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. */ functionCall?: Schema$GoogleCloudAiplatformV1beta1FunctionCall; /** * Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. */ functionResponse?: Schema$GoogleCloudAiplatformV1beta1FunctionResponse; /** * Optional. Inlined bytes data. */ inlineData?: Schema$GoogleCloudAiplatformV1beta1Blob; /** * Optional. Text part (can be code). */ text?: string | null; /** * Optional. Indicates if the part is thought from the model. */ thought?: boolean | null; /** * Optional. An opaque signature for the thought so it can be reused in subsequent requests. */ thoughtSignature?: string | null; /** * Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. */ videoMetadata?: Schema$GoogleCloudAiplatformV1beta1VideoMetadata; } /** * The configuration for the prebuilt speaker to use. */ export interface Schema$GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig { /** * The name of the preset voice to use. */ voiceName?: string | null; } /** * A RagChunk includes the content of a chunk of a RagFile, and associated metadata. */ export interface Schema$GoogleCloudAiplatformV1beta1RagChunk { /** * If populated, represents where the chunk starts and ends in the document. */ pageSpan?: Schema$GoogleCloudAiplatformV1beta1RagChunkPageSpan; /** * The content of the chunk. */ text?: string | null; } /** * Represents where the chunk starts and ends in the document. */ export interface Schema$GoogleCloudAiplatformV1beta1RagChunkPageSpan { /** * Page where chunk starts in the document. Inclusive. 1-indexed. */ firstPage?: number | null; /** * Page where chunk ends in the document. Inclusive. 1-indexed. */ lastPage?: number | null; } /** * Specifies the context retrieval config. */ export interface Schema$GoogleCloudAiplatformV1beta1RagRetrievalConfig { /** * Optional. Config for filters. */ filter?: Schema$GoogleCloudAiplatformV1beta1RagRetrievalConfigFilter; /** * Optional. Config for Hybrid Search. */ hybridSearch?: Schema$GoogleCloudAiplatformV1beta1RagRetrievalConfigHybridSearch; /** * Optional. Config for ranking and reranking. */ ranking?: Schema$GoogleCloudAiplatformV1beta1RagRetrievalConfigRanking; /** * Optional. The number of contexts to retrieve. */ topK?: number | null; } /** * Config for filters. */ export interface Schema$GoogleCloudAiplatformV1beta1RagRetrievalConfigFilter { /** * Optional. String for metadata filtering. */ metadataFilter?: string | null; /** * Optional. Only returns contexts with vector distance smaller than the threshold. */ vectorDistanceThreshold?: number | null; /** * Optional. Only returns contexts with vector similarity larger than the threshold. */ vectorSimilarityThreshold?: number | null; } /** * Config for Hybrid Search. */ export interface Schema$GoogleCloudAiplatformV1beta1RagRetrievalConfigHybridSearch { /** * Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally. */ alpha?: number | null; } /** * Config for ra