Returns the operations Resource.
Close httplib2 connections.
Deletes an Extension.
execute(name, body=None, x__xgafv=None)
Executes the request against a given extension.
Gets an Extension.
import_(parent, body=None, x__xgafv=None)
Imports an Extension.
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists Extensions in a location.
Retrieves the next page of results.
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates an Extension.
query(name, body=None, x__xgafv=None)
Queries an extension with a default controller.
close()
Close httplib2 connections.
delete(name, x__xgafv=None)
Deletes an Extension. Args: name: string, Required. The name of the Extension resource to be deleted. Format: `projects/{project}/locations/{location}/extensions/{extension}` (required) x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # This resource represents a long-running operation that is the result of a network API call. "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. "code": 42, # The status code, which should be an enum value of google.rpc.Code. "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. { "a_key": "", # Properties of the object. Contains field @type with type URL. }, ], "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. }, "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. "a_key": "", # Properties of the object. Contains field @type with type URL. }, "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. "a_key": "", # Properties of the object. Contains field @type with type URL. }, }
execute(name, body=None, x__xgafv=None)
Executes the request against a given extension. Args: name: string, Required. Name (identifier) of the extension; Format: `projects/{project}/locations/{location}/extensions/{extension}` (required) body: object, The request body. The object takes the form of: { # Request message for ExtensionExecutionService.ExecuteExtension. "operationId": "A String", # Required. The desired ID of the operation to be executed in this extension as defined in ExtensionOperation.operation_id. "operationParams": { # Optional. Request parameters that will be used for executing this operation. The struct should be in a form of map with param name as the key and actual param value as the value. E.g. If this operation requires a param "name" to be set to "abc". you can set this to something like {"name": "abc"}. "a_key": "", # Properties of the object. }, "runtimeAuthConfig": { # Auth configuration to run the extension. # Optional. Auth config provided at runtime to override the default value in Extension.manifest.auth_config. The AuthConfig.auth_type should match the value in Extension.manifest.auth_config. "apiKeyConfig": { # Config for authentication with API key. # Config for API key auth. "apiKeySecret": "A String", # Required. The name of the SecretManager secret version resource storing the API key. 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. "httpElementLocation": "A String", # Required. The location of the API key. "name": "A String", # Required. 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. }, "authType": "A String", # Type of auth scheme. "googleServiceAccountConfig": { # Config for Google Service Account Authentication. # Config for Google Service Account auth. "serviceAccount": "A String", # 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. }, "httpBasicAuthConfig": { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth. "credentialSecret": "A String", # 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. }, "oauthConfig": { # Config for user oauth. # Config for user oauth. "accessToken": "A String", # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time. "serviceAccount": "A String", # 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. }, "oidcConfig": { # Config for user OIDC auth. # Config for user OIDC auth. "idToken": "A String", # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time. "serviceAccount": "A String", # 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). }, }, } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Response message for ExtensionExecutionService.ExecuteExtension. "content": "A String", # Response content from the extension. The content should be conformant to the response.content schema in the extension's manifest/OpenAPI spec. }
get(name, x__xgafv=None)
Gets an Extension. Args: name: string, Required. The name of the Extension resource. Format: `projects/{project}/locations/{location}/extensions/{extension}` (required) x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Extensions are tools for large language models to access external data, run computations, etc. "createTime": "A String", # Output only. Timestamp when this Extension was created. "description": "A String", # Optional. The description of the Extension. "displayName": "A String", # Required. The display name of the Extension. The name can be up to 128 characters long and can consist of any UTF-8 characters. "etag": "A String", # Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. "extensionOperations": [ # Output only. Supported operations. { # Operation of an extension. "functionDeclaration": { # 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. # Output only. Structured representation of a function declaration as defined by the OpenAPI Spec. "description": "A String", # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. "name": "A String", # 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. "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # 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 "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. # Object with schema name: GoogleCloudAiplatformV1beta1Schema ], "default": "", # Optional. Default value of the data. "description": "A String", # Optional. The description of the data. "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} "A String", ], "example": "", # Optional. Example of the object. Will only populated when the object is the root. "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc "items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. "maxLength": "A String", # Optional. Maximum length of the Type.STRING "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER "nullable": True or False, # Optional. Indicates if the value may be null. "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. "a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema }, "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. "A String", ], "required": [ # Optional. Required properties of Type.OBJECT. "A String", ], "title": "A String", # Optional. The title of the Schema. "type": "A String", # Optional. The type of the data. }, "response": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # 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. "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. # Object with schema name: GoogleCloudAiplatformV1beta1Schema ], "default": "", # Optional. Default value of the data. "description": "A String", # Optional. The description of the data. "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} "A String", ], "example": "", # Optional. Example of the object. Will only populated when the object is the root. "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc "items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. "maxLength": "A String", # Optional. Maximum length of the Type.STRING "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER "nullable": True or False, # Optional. Indicates if the value may be null. "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. "a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema }, "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. "A String", ], "required": [ # Optional. Required properties of Type.OBJECT. "A String", ], "title": "A String", # Optional. The title of the Schema. "type": "A String", # Optional. The type of the data. }, }, "operationId": "A String", # Operation ID that uniquely identifies the operations among the extension. See: "Operation Object" in https://swagger.io/specification/. This field is parsed from the OpenAPI spec. For HTTP extensions, if it does not exist in the spec, we will generate one from the HTTP method and path. }, ], "manifest": { # Manifest spec of an Extension needed for runtime execution. # Required. Manifest of the Extension. "apiSpec": { # The API specification shown to the LLM. # Required. Immutable. The API specification shown to the LLM. "openApiGcsUri": "A String", # Cloud Storage URI pointing to the OpenAPI spec. "openApiYaml": "A String", # The API spec in Open API standard and YAML format. }, "authConfig": { # Auth configuration to run the extension. # Required. Immutable. Type of auth supported by this extension. "apiKeyConfig": { # Config for authentication with API key. # Config for API key auth. "apiKeySecret": "A String", # Required. The name of the SecretManager secret version resource storing the API key. 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. "httpElementLocation": "A String", # Required. The location of the API key. "name": "A String", # Required. 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. }, "authType": "A String", # Type of auth scheme. "googleServiceAccountConfig": { # Config for Google Service Account Authentication. # Config for Google Service Account auth. "serviceAccount": "A String", # 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. }, "httpBasicAuthConfig": { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth. "credentialSecret": "A String", # 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. }, "oauthConfig": { # Config for user oauth. # Config for user oauth. "accessToken": "A String", # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time. "serviceAccount": "A String", # 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. }, "oidcConfig": { # Config for user OIDC auth. # Config for user OIDC auth. "idToken": "A String", # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time. "serviceAccount": "A String", # 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). }, }, "description": "A String", # Required. The natural language description shown to the LLM. It should describe the usage of the extension, and is essential for the LLM to perform reasoning. e.g., if the extension is a data store, you can let the LLM know what data it contains. "name": "A String", # Required. Extension name shown to the LLM. The name can be up to 128 characters long. }, "name": "A String", # Identifier. The resource name of the Extension. "privateServiceConnectConfig": { # PrivateExtensionConfig configuration for the extension. # Optional. The PrivateServiceConnect config for the extension. If specified, the service endpoints associated with the Extension should be [registered with private network access in the provided Service Directory](https://cloud.google.com/service-directory/docs/configuring-private-network-access). If the service contains more than one endpoint with a network, the service will arbitrarilty choose one of the endpoints to use for extension execution. "serviceDirectory": "A String", # Required. The Service Directory resource name in which the service endpoints associated to the extension are registered. Format: `projects/{project_id}/locations/{location_id}/namespaces/{namespace_id}/services/{service_id}` - The Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) should be granted `servicedirectory.viewer` and `servicedirectory.pscAuthorizedService` roles on the resource. }, "runtimeConfig": { # Runtime configuration to run the extension. # Optional. Runtime config controlling the runtime behavior of this Extension. "codeInterpreterRuntimeConfig": { # Code execution runtime configurations for code interpreter extension. "fileInputGcsBucket": "A String", # Optional. The Cloud Storage bucket for file input of this Extension. If specified, support input from the Cloud Storage bucket. Vertex Extension Custom Code Service Agent should be granted file reader to this bucket. If not specified, the extension will only accept file contents from request body and reject Cloud Storage file inputs. "fileOutputGcsBucket": "A String", # Optional. The Cloud Storage bucket for file output of this Extension. If specified, write all output files to the Cloud Storage bucket. Vertex Extension Custom Code Service Agent should be granted file writer to this bucket. If not specified, the file content will be output in response body. }, "defaultParams": { # Optional. Default parameters that will be set for all the execution of this extension. If specified, the parameter values can be overridden by values in [[ExecuteExtensionRequest.operation_params]] at request time. The struct should be in a form of map with param name as the key and actual param value as the value. E.g. If this operation requires a param "name" to be set to "abc". you can set this to something like {"name": "abc"}. "a_key": "", # Properties of the object. }, "vertexAiSearchRuntimeConfig": { # Runtime configuration for Vertex AI Search extension. "engineId": "A String", # Optional. Vertex AI Search engine ID. This is used to construct the search request. By setting this engine_id, API will construct the serving config using the default value to call search API for the user. The engine_id and serving_config_name cannot both be empty at the same time. "servingConfigName": "A String", # Optional. Vertex AI Search serving config name. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}` }, }, "toolUseExamples": [ # Optional. Examples to illustrate the usage of the extension as a tool. { # A single example of the tool usage. "displayName": "A String", # Required. The display name for example. "extensionOperation": { # Identifies one operation of the extension. # Extension operation to call. "extension": "A String", # Resource name of the extension. "operationId": "A String", # Required. Operation ID of the extension. }, "functionName": "A String", # Function name to call. "query": "A String", # Required. Query that should be routed to this tool. "requestParams": { # Request parameters used for executing this tool. "a_key": "", # Properties of the object. }, "responseParams": { # Response parameters generated by this tool. "a_key": "", # Properties of the object. }, "responseSummary": "A String", # Summary of the tool response to the user query. }, ], "updateTime": "A String", # Output only. Timestamp when this Extension was most recently updated. }
import_(parent, body=None, x__xgafv=None)
Imports an Extension. Args: parent: string, Required. The resource name of the Location to import the Extension in. Format: `projects/{project}/locations/{location}` (required) body: object, The request body. The object takes the form of: { # Extensions are tools for large language models to access external data, run computations, etc. "createTime": "A String", # Output only. Timestamp when this Extension was created. "description": "A String", # Optional. The description of the Extension. "displayName": "A String", # Required. The display name of the Extension. The name can be up to 128 characters long and can consist of any UTF-8 characters. "etag": "A String", # Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. "extensionOperations": [ # Output only. Supported operations. { # Operation of an extension. "functionDeclaration": { # 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. # Output only. Structured representation of a function declaration as defined by the OpenAPI Spec. "description": "A String", # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. "name": "A String", # 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. "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # 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 "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. # Object with schema name: GoogleCloudAiplatformV1beta1Schema ], "default": "", # Optional. Default value of the data. "description": "A String", # Optional. The description of the data. "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} "A String", ], "example": "", # Optional. Example of the object. Will only populated when the object is the root. "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc "items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. "maxLength": "A String", # Optional. Maximum length of the Type.STRING "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER "nullable": True or False, # Optional. Indicates if the value may be null. "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. "a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema }, "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. "A String", ], "required": [ # Optional. Required properties of Type.OBJECT. "A String", ], "title": "A String", # Optional. The title of the Schema. "type": "A String", # Optional. The type of the data. }, "response": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # 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. "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. # Object with schema name: GoogleCloudAiplatformV1beta1Schema ], "default": "", # Optional. Default value of the data. "description": "A String", # Optional. The description of the data. "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} "A String", ], "example": "", # Optional. Example of the object. Will only populated when the object is the root. "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc "items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. "maxLength": "A String", # Optional. Maximum length of the Type.STRING "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER "nullable": True or False, # Optional. Indicates if the value may be null. "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. "a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema }, "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. "A String", ], "required": [ # Optional. Required properties of Type.OBJECT. "A String", ], "title": "A String", # Optional. The title of the Schema. "type": "A String", # Optional. The type of the data. }, }, "operationId": "A String", # Operation ID that uniquely identifies the operations among the extension. See: "Operation Object" in https://swagger.io/specification/. This field is parsed from the OpenAPI spec. For HTTP extensions, if it does not exist in the spec, we will generate one from the HTTP method and path. }, ], "manifest": { # Manifest spec of an Extension needed for runtime execution. # Required. Manifest of the Extension. "apiSpec": { # The API specification shown to the LLM. # Required. Immutable. The API specification shown to the LLM. "openApiGcsUri": "A String", # Cloud Storage URI pointing to the OpenAPI spec. "openApiYaml": "A String", # The API spec in Open API standard and YAML format. }, "authConfig": { # Auth configuration to run the extension. # Required. Immutable. Type of auth supported by this extension. "apiKeyConfig": { # Config for authentication with API key. # Config for API key auth. "apiKeySecret": "A String", # Required. The name of the SecretManager secret version resource storing the API key. 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. "httpElementLocation": "A String", # Required. The location of the API key. "name": "A String", # Required. 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. }, "authType": "A String", # Type of auth scheme. "googleServiceAccountConfig": { # Config for Google Service Account Authentication. # Config for Google Service Account auth. "serviceAccount": "A String", # 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. }, "httpBasicAuthConfig": { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth. "credentialSecret": "A String", # 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. }, "oauthConfig": { # Config for user oauth. # Config for user oauth. "accessToken": "A String", # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time. "serviceAccount": "A String", # 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. }, "oidcConfig": { # Config for user OIDC auth. # Config for user OIDC auth. "idToken": "A String", # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time. "serviceAccount": "A String", # 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). }, }, "description": "A String", # Required. The natural language description shown to the LLM. It should describe the usage of the extension, and is essential for the LLM to perform reasoning. e.g., if the extension is a data store, you can let the LLM know what data it contains. "name": "A String", # Required. Extension name shown to the LLM. The name can be up to 128 characters long. }, "name": "A String", # Identifier. The resource name of the Extension. "privateServiceConnectConfig": { # PrivateExtensionConfig configuration for the extension. # Optional. The PrivateServiceConnect config for the extension. If specified, the service endpoints associated with the Extension should be [registered with private network access in the provided Service Directory](https://cloud.google.com/service-directory/docs/configuring-private-network-access). If the service contains more than one endpoint with a network, the service will arbitrarilty choose one of the endpoints to use for extension execution. "serviceDirectory": "A String", # Required. The Service Directory resource name in which the service endpoints associated to the extension are registered. Format: `projects/{project_id}/locations/{location_id}/namespaces/{namespace_id}/services/{service_id}` - The Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) should be granted `servicedirectory.viewer` and `servicedirectory.pscAuthorizedService` roles on the resource. }, "runtimeConfig": { # Runtime configuration to run the extension. # Optional. Runtime config controlling the runtime behavior of this Extension. "codeInterpreterRuntimeConfig": { # Code execution runtime configurations for code interpreter extension. "fileInputGcsBucket": "A String", # Optional. The Cloud Storage bucket for file input of this Extension. If specified, support input from the Cloud Storage bucket. Vertex Extension Custom Code Service Agent should be granted file reader to this bucket. If not specified, the extension will only accept file contents from request body and reject Cloud Storage file inputs. "fileOutputGcsBucket": "A String", # Optional. The Cloud Storage bucket for file output of this Extension. If specified, write all output files to the Cloud Storage bucket. Vertex Extension Custom Code Service Agent should be granted file writer to this bucket. If not specified, the file content will be output in response body. }, "defaultParams": { # Optional. Default parameters that will be set for all the execution of this extension. If specified, the parameter values can be overridden by values in [[ExecuteExtensionRequest.operation_params]] at request time. The struct should be in a form of map with param name as the key and actual param value as the value. E.g. If this operation requires a param "name" to be set to "abc". you can set this to something like {"name": "abc"}. "a_key": "", # Properties of the object. }, "vertexAiSearchRuntimeConfig": { # Runtime configuration for Vertex AI Search extension. "engineId": "A String", # Optional. Vertex AI Search engine ID. This is used to construct the search request. By setting this engine_id, API will construct the serving config using the default value to call search API for the user. The engine_id and serving_config_name cannot both be empty at the same time. "servingConfigName": "A String", # Optional. Vertex AI Search serving config name. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}` }, }, "toolUseExamples": [ # Optional. Examples to illustrate the usage of the extension as a tool. { # A single example of the tool usage. "displayName": "A String", # Required. The display name for example. "extensionOperation": { # Identifies one operation of the extension. # Extension operation to call. "extension": "A String", # Resource name of the extension. "operationId": "A String", # Required. Operation ID of the extension. }, "functionName": "A String", # Function name to call. "query": "A String", # Required. Query that should be routed to this tool. "requestParams": { # Request parameters used for executing this tool. "a_key": "", # Properties of the object. }, "responseParams": { # Response parameters generated by this tool. "a_key": "", # Properties of the object. }, "responseSummary": "A String", # Summary of the tool response to the user query. }, ], "updateTime": "A String", # Output only. Timestamp when this Extension was most recently updated. } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # This resource represents a long-running operation that is the result of a network API call. "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. "code": 42, # The status code, which should be an enum value of google.rpc.Code. "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. { "a_key": "", # Properties of the object. Contains field @type with type URL. }, ], "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. }, "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. "a_key": "", # Properties of the object. Contains field @type with type URL. }, "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. "a_key": "", # Properties of the object. Contains field @type with type URL. }, }
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists Extensions in a location. Args: parent: string, Required. The resource name of the Location to list the Extensions from. Format: `projects/{project}/locations/{location}` (required) filter: string, Optional. The standard list filter. Supported fields: * `display_name` * `create_time` * `update_time` More detail in [AIP-160](https://google.aip.dev/160). orderBy: string, Optional. A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `display_name` * `create_time` * `update_time` Example: `display_name, create_time desc`. pageSize: integer, Optional. The standard list page size. pageToken: string, Optional. The standard list page token. x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Response message for ExtensionRegistryService.ListExtensions "extensions": [ # List of Extension in the requested page. { # Extensions are tools for large language models to access external data, run computations, etc. "createTime": "A String", # Output only. Timestamp when this Extension was created. "description": "A String", # Optional. The description of the Extension. "displayName": "A String", # Required. The display name of the Extension. The name can be up to 128 characters long and can consist of any UTF-8 characters. "etag": "A String", # Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. "extensionOperations": [ # Output only. Supported operations. { # Operation of an extension. "functionDeclaration": { # 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. # Output only. Structured representation of a function declaration as defined by the OpenAPI Spec. "description": "A String", # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. "name": "A String", # 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. "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # 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 "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. # Object with schema name: GoogleCloudAiplatformV1beta1Schema ], "default": "", # Optional. Default value of the data. "description": "A String", # Optional. The description of the data. "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} "A String", ], "example": "", # Optional. Example of the object. Will only populated when the object is the root. "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc "items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. "maxLength": "A String", # Optional. Maximum length of the Type.STRING "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER "nullable": True or False, # Optional. Indicates if the value may be null. "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. "a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema }, "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. "A String", ], "required": [ # Optional. Required properties of Type.OBJECT. "A String", ], "title": "A String", # Optional. The title of the Schema. "type": "A String", # Optional. The type of the data. }, "response": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # 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. "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. # Object with schema name: GoogleCloudAiplatformV1beta1Schema ], "default": "", # Optional. Default value of the data. "description": "A String", # Optional. The description of the data. "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} "A String", ], "example": "", # Optional. Example of the object. Will only populated when the object is the root. "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc "items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. "maxLength": "A String", # Optional. Maximum length of the Type.STRING "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER "nullable": True or False, # Optional. Indicates if the value may be null. "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. "a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema }, "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. "A String", ], "required": [ # Optional. Required properties of Type.OBJECT. "A String", ], "title": "A String", # Optional. The title of the Schema. "type": "A String", # Optional. The type of the data. }, }, "operationId": "A String", # Operation ID that uniquely identifies the operations among the extension. See: "Operation Object" in https://swagger.io/specification/. This field is parsed from the OpenAPI spec. For HTTP extensions, if it does not exist in the spec, we will generate one from the HTTP method and path. }, ], "manifest": { # Manifest spec of an Extension needed for runtime execution. # Required. Manifest of the Extension. "apiSpec": { # The API specification shown to the LLM. # Required. Immutable. The API specification shown to the LLM. "openApiGcsUri": "A String", # Cloud Storage URI pointing to the OpenAPI spec. "openApiYaml": "A String", # The API spec in Open API standard and YAML format. }, "authConfig": { # Auth configuration to run the extension. # Required. Immutable. Type of auth supported by this extension. "apiKeyConfig": { # Config for authentication with API key. # Config for API key auth. "apiKeySecret": "A String", # Required. The name of the SecretManager secret version resource storing the API key. 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. "httpElementLocation": "A String", # Required. The location of the API key. "name": "A String", # Required. 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. }, "authType": "A String", # Type of auth scheme. "googleServiceAccountConfig": { # Config for Google Service Account Authentication. # Config for Google Service Account auth. "serviceAccount": "A String", # 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. }, "httpBasicAuthConfig": { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth. "credentialSecret": "A String", # 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. }, "oauthConfig": { # Config for user oauth. # Config for user oauth. "accessToken": "A String", # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time. "serviceAccount": "A String", # 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. }, "oidcConfig": { # Config for user OIDC auth. # Config for user OIDC auth. "idToken": "A String", # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time. "serviceAccount": "A String", # 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). }, }, "description": "A String", # Required. The natural language description shown to the LLM. It should describe the usage of the extension, and is essential for the LLM to perform reasoning. e.g., if the extension is a data store, you can let the LLM know what data it contains. "name": "A String", # Required. Extension name shown to the LLM. The name can be up to 128 characters long. }, "name": "A String", # Identifier. The resource name of the Extension. "privateServiceConnectConfig": { # PrivateExtensionConfig configuration for the extension. # Optional. The PrivateServiceConnect config for the extension. If specified, the service endpoints associated with the Extension should be [registered with private network access in the provided Service Directory](https://cloud.google.com/service-directory/docs/configuring-private-network-access). If the service contains more than one endpoint with a network, the service will arbitrarilty choose one of the endpoints to use for extension execution. "serviceDirectory": "A String", # Required. The Service Directory resource name in which the service endpoints associated to the extension are registered. Format: `projects/{project_id}/locations/{location_id}/namespaces/{namespace_id}/services/{service_id}` - The Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) should be granted `servicedirectory.viewer` and `servicedirectory.pscAuthorizedService` roles on the resource. }, "runtimeConfig": { # Runtime configuration to run the extension. # Optional. Runtime config controlling the runtime behavior of this Extension. "codeInterpreterRuntimeConfig": { # Code execution runtime configurations for code interpreter extension. "fileInputGcsBucket": "A String", # Optional. The Cloud Storage bucket for file input of this Extension. If specified, support input from the Cloud Storage bucket. Vertex Extension Custom Code Service Agent should be granted file reader to this bucket. If not specified, the extension will only accept file contents from request body and reject Cloud Storage file inputs. "fileOutputGcsBucket": "A String", # Optional. The Cloud Storage bucket for file output of this Extension. If specified, write all output files to the Cloud Storage bucket. Vertex Extension Custom Code Service Agent should be granted file writer to this bucket. If not specified, the file content will be output in response body. }, "defaultParams": { # Optional. Default parameters that will be set for all the execution of this extension. If specified, the parameter values can be overridden by values in [[ExecuteExtensionRequest.operation_params]] at request time. The struct should be in a form of map with param name as the key and actual param value as the value. E.g. If this operation requires a param "name" to be set to "abc". you can set this to something like {"name": "abc"}. "a_key": "", # Properties of the object. }, "vertexAiSearchRuntimeConfig": { # Runtime configuration for Vertex AI Search extension. "engineId": "A String", # Optional. Vertex AI Search engine ID. This is used to construct the search request. By setting this engine_id, API will construct the serving config using the default value to call search API for the user. The engine_id and serving_config_name cannot both be empty at the same time. "servingConfigName": "A String", # Optional. Vertex AI Search serving config name. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}` }, }, "toolUseExamples": [ # Optional. Examples to illustrate the usage of the extension as a tool. { # A single example of the tool usage. "displayName": "A String", # Required. The display name for example. "extensionOperation": { # Identifies one operation of the extension. # Extension operation to call. "extension": "A String", # Resource name of the extension. "operationId": "A String", # Required. Operation ID of the extension. }, "functionName": "A String", # Function name to call. "query": "A String", # Required. Query that should be routed to this tool. "requestParams": { # Request parameters used for executing this tool. "a_key": "", # Properties of the object. }, "responseParams": { # Response parameters generated by this tool. "a_key": "", # Properties of the object. }, "responseSummary": "A String", # Summary of the tool response to the user query. }, ], "updateTime": "A String", # Output only. Timestamp when this Extension was most recently updated. }, ], "nextPageToken": "A String", # A token to retrieve the next page of results. Pass to ListExtensionsRequest.page_token to obtain that page. }
list_next()
Retrieves the next page of results. Args: previous_request: The request for the previous page. (required) previous_response: The response from the request for the previous page. (required) Returns: A request object that you can call 'execute()' on to request the next page. Returns None if there are no more items in the collection.
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates an Extension. Args: name: string, Identifier. The resource name of the Extension. (required) body: object, The request body. The object takes the form of: { # Extensions are tools for large language models to access external data, run computations, etc. "createTime": "A String", # Output only. Timestamp when this Extension was created. "description": "A String", # Optional. The description of the Extension. "displayName": "A String", # Required. The display name of the Extension. The name can be up to 128 characters long and can consist of any UTF-8 characters. "etag": "A String", # Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. "extensionOperations": [ # Output only. Supported operations. { # Operation of an extension. "functionDeclaration": { # 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. # Output only. Structured representation of a function declaration as defined by the OpenAPI Spec. "description": "A String", # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. "name": "A String", # 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. "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # 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 "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. # Object with schema name: GoogleCloudAiplatformV1beta1Schema ], "default": "", # Optional. Default value of the data. "description": "A String", # Optional. The description of the data. "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} "A String", ], "example": "", # Optional. Example of the object. Will only populated when the object is the root. "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc "items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. "maxLength": "A String", # Optional. Maximum length of the Type.STRING "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER "nullable": True or False, # Optional. Indicates if the value may be null. "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. "a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema }, "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. "A String", ], "required": [ # Optional. Required properties of Type.OBJECT. "A String", ], "title": "A String", # Optional. The title of the Schema. "type": "A String", # Optional. The type of the data. }, "response": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # 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. "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. # Object with schema name: GoogleCloudAiplatformV1beta1Schema ], "default": "", # Optional. Default value of the data. "description": "A String", # Optional. The description of the data. "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} "A String", ], "example": "", # Optional. Example of the object. Will only populated when the object is the root. "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc "items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. "maxLength": "A String", # Optional. Maximum length of the Type.STRING "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER "nullable": True or False, # Optional. Indicates if the value may be null. "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. "a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema }, "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. "A String", ], "required": [ # Optional. Required properties of Type.OBJECT. "A String", ], "title": "A String", # Optional. The title of the Schema. "type": "A String", # Optional. The type of the data. }, }, "operationId": "A String", # Operation ID that uniquely identifies the operations among the extension. See: "Operation Object" in https://swagger.io/specification/. This field is parsed from the OpenAPI spec. For HTTP extensions, if it does not exist in the spec, we will generate one from the HTTP method and path. }, ], "manifest": { # Manifest spec of an Extension needed for runtime execution. # Required. Manifest of the Extension. "apiSpec": { # The API specification shown to the LLM. # Required. Immutable. The API specification shown to the LLM. "openApiGcsUri": "A String", # Cloud Storage URI pointing to the OpenAPI spec. "openApiYaml": "A String", # The API spec in Open API standard and YAML format. }, "authConfig": { # Auth configuration to run the extension. # Required. Immutable. Type of auth supported by this extension. "apiKeyConfig": { # Config for authentication with API key. # Config for API key auth. "apiKeySecret": "A String", # Required. The name of the SecretManager secret version resource storing the API key. 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. "httpElementLocation": "A String", # Required. The location of the API key. "name": "A String", # Required. 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. }, "authType": "A String", # Type of auth scheme. "googleServiceAccountConfig": { # Config for Google Service Account Authentication. # Config for Google Service Account auth. "serviceAccount": "A String", # 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. }, "httpBasicAuthConfig": { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth. "credentialSecret": "A String", # 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. }, "oauthConfig": { # Config for user oauth. # Config for user oauth. "accessToken": "A String", # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time. "serviceAccount": "A String", # 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. }, "oidcConfig": { # Config for user OIDC auth. # Config for user OIDC auth. "idToken": "A String", # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time. "serviceAccount": "A String", # 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). }, }, "description": "A String", # Required. The natural language description shown to the LLM. It should describe the usage of the extension, and is essential for the LLM to perform reasoning. e.g., if the extension is a data store, you can let the LLM know what data it contains. "name": "A String", # Required. Extension name shown to the LLM. The name can be up to 128 characters long. }, "name": "A String", # Identifier. The resource name of the Extension. "privateServiceConnectConfig": { # PrivateExtensionConfig configuration for the extension. # Optional. The PrivateServiceConnect config for the extension. If specified, the service endpoints associated with the Extension should be [registered with private network access in the provided Service Directory](https://cloud.google.com/service-directory/docs/configuring-private-network-access). If the service contains more than one endpoint with a network, the service will arbitrarilty choose one of the endpoints to use for extension execution. "serviceDirectory": "A String", # Required. The Service Directory resource name in which the service endpoints associated to the extension are registered. Format: `projects/{project_id}/locations/{location_id}/namespaces/{namespace_id}/services/{service_id}` - The Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) should be granted `servicedirectory.viewer` and `servicedirectory.pscAuthorizedService` roles on the resource. }, "runtimeConfig": { # Runtime configuration to run the extension. # Optional. Runtime config controlling the runtime behavior of this Extension. "codeInterpreterRuntimeConfig": { # Code execution runtime configurations for code interpreter extension. "fileInputGcsBucket": "A String", # Optional. The Cloud Storage bucket for file input of this Extension. If specified, support input from the Cloud Storage bucket. Vertex Extension Custom Code Service Agent should be granted file reader to this bucket. If not specified, the extension will only accept file contents from request body and reject Cloud Storage file inputs. "fileOutputGcsBucket": "A String", # Optional. The Cloud Storage bucket for file output of this Extension. If specified, write all output files to the Cloud Storage bucket. Vertex Extension Custom Code Service Agent should be granted file writer to this bucket. If not specified, the file content will be output in response body. }, "defaultParams": { # Optional. Default parameters that will be set for all the execution of this extension. If specified, the parameter values can be overridden by values in [[ExecuteExtensionRequest.operation_params]] at request time. The struct should be in a form of map with param name as the key and actual param value as the value. E.g. If this operation requires a param "name" to be set to "abc". you can set this to something like {"name": "abc"}. "a_key": "", # Properties of the object. }, "vertexAiSearchRuntimeConfig": { # Runtime configuration for Vertex AI Search extension. "engineId": "A String", # Optional. Vertex AI Search engine ID. This is used to construct the search request. By setting this engine_id, API will construct the serving config using the default value to call search API for the user. The engine_id and serving_config_name cannot both be empty at the same time. "servingConfigName": "A String", # Optional. Vertex AI Search serving config name. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}` }, }, "toolUseExamples": [ # Optional. Examples to illustrate the usage of the extension as a tool. { # A single example of the tool usage. "displayName": "A String", # Required. The display name for example. "extensionOperation": { # Identifies one operation of the extension. # Extension operation to call. "extension": "A String", # Resource name of the extension. "operationId": "A String", # Required. Operation ID of the extension. }, "functionName": "A String", # Function name to call. "query": "A String", # Required. Query that should be routed to this tool. "requestParams": { # Request parameters used for executing this tool. "a_key": "", # Properties of the object. }, "responseParams": { # Response parameters generated by this tool. "a_key": "", # Properties of the object. }, "responseSummary": "A String", # Summary of the tool response to the user query. }, ], "updateTime": "A String", # Output only. Timestamp when this Extension was most recently updated. } updateMask: string, Required. Mask specifying which fields to update. Supported fields: * `display_name` * `description` * `runtime_config` * `tool_use_examples` * `manifest.description` x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Extensions are tools for large language models to access external data, run computations, etc. "createTime": "A String", # Output only. Timestamp when this Extension was created. "description": "A String", # Optional. The description of the Extension. "displayName": "A String", # Required. The display name of the Extension. The name can be up to 128 characters long and can consist of any UTF-8 characters. "etag": "A String", # Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. "extensionOperations": [ # Output only. Supported operations. { # Operation of an extension. "functionDeclaration": { # 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. # Output only. Structured representation of a function declaration as defined by the OpenAPI Spec. "description": "A String", # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. "name": "A String", # 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. "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # 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 "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. # Object with schema name: GoogleCloudAiplatformV1beta1Schema ], "default": "", # Optional. Default value of the data. "description": "A String", # Optional. The description of the data. "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} "A String", ], "example": "", # Optional. Example of the object. Will only populated when the object is the root. "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc "items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. "maxLength": "A String", # Optional. Maximum length of the Type.STRING "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER "nullable": True or False, # Optional. Indicates if the value may be null. "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. "a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema }, "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. "A String", ], "required": [ # Optional. Required properties of Type.OBJECT. "A String", ], "title": "A String", # Optional. The title of the Schema. "type": "A String", # Optional. The type of the data. }, "response": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed. # 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. "anyOf": [ # Optional. The value should be validated against any (one or more) of the subschemas in the list. # Object with schema name: GoogleCloudAiplatformV1beta1Schema ], "default": "", # Optional. Default value of the data. "description": "A String", # Optional. The description of the data. "enum": [ # Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} "A String", ], "example": "", # Optional. Example of the object. Will only populated when the object is the root. "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc "items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. "maxItems": "A String", # Optional. Maximum number of the elements for Type.ARRAY. "maxLength": "A String", # Optional. Maximum length of the Type.STRING "maxProperties": "A String", # Optional. Maximum number of the properties for Type.OBJECT. "maximum": 3.14, # Optional. Maximum value of the Type.INTEGER and Type.NUMBER "minItems": "A String", # Optional. Minimum number of the elements for Type.ARRAY. "minLength": "A String", # Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING "minProperties": "A String", # Optional. Minimum number of the properties for Type.OBJECT. "minimum": 3.14, # Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER "nullable": True or False, # Optional. Indicates if the value may be null. "pattern": "A String", # Optional. Pattern of the Type.STRING to restrict a string to a regular expression. "properties": { # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. "a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema }, "propertyOrdering": [ # Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. "A String", ], "required": [ # Optional. Required properties of Type.OBJECT. "A String", ], "title": "A String", # Optional. The title of the Schema. "type": "A String", # Optional. The type of the data. }, }, "operationId": "A String", # Operation ID that uniquely identifies the operations among the extension. See: "Operation Object" in https://swagger.io/specification/. This field is parsed from the OpenAPI spec. For HTTP extensions, if it does not exist in the spec, we will generate one from the HTTP method and path. }, ], "manifest": { # Manifest spec of an Extension needed for runtime execution. # Required. Manifest of the Extension. "apiSpec": { # The API specification shown to the LLM. # Required. Immutable. The API specification shown to the LLM. "openApiGcsUri": "A String", # Cloud Storage URI pointing to the OpenAPI spec. "openApiYaml": "A String", # The API spec in Open API standard and YAML format. }, "authConfig": { # Auth configuration to run the extension. # Required. Immutable. Type of auth supported by this extension. "apiKeyConfig": { # Config for authentication with API key. # Config for API key auth. "apiKeySecret": "A String", # Required. The name of the SecretManager secret version resource storing the API key. 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. "httpElementLocation": "A String", # Required. The location of the API key. "name": "A String", # Required. 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. }, "authType": "A String", # Type of auth scheme. "googleServiceAccountConfig": { # Config for Google Service Account Authentication. # Config for Google Service Account auth. "serviceAccount": "A String", # 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. }, "httpBasicAuthConfig": { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth. "credentialSecret": "A String", # 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. }, "oauthConfig": { # Config for user oauth. # Config for user oauth. "accessToken": "A String", # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time. "serviceAccount": "A String", # 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. }, "oidcConfig": { # Config for user OIDC auth. # Config for user OIDC auth. "idToken": "A String", # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time. "serviceAccount": "A String", # 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). }, }, "description": "A String", # Required. The natural language description shown to the LLM. It should describe the usage of the extension, and is essential for the LLM to perform reasoning. e.g., if the extension is a data store, you can let the LLM know what data it contains. "name": "A String", # Required. Extension name shown to the LLM. The name can be up to 128 characters long. }, "name": "A String", # Identifier. The resource name of the Extension. "privateServiceConnectConfig": { # PrivateExtensionConfig configuration for the extension. # Optional. The PrivateServiceConnect config for the extension. If specified, the service endpoints associated with the Extension should be [registered with private network access in the provided Service Directory](https://cloud.google.com/service-directory/docs/configuring-private-network-access). If the service contains more than one endpoint with a network, the service will arbitrarilty choose one of the endpoints to use for extension execution. "serviceDirectory": "A String", # Required. The Service Directory resource name in which the service endpoints associated to the extension are registered. Format: `projects/{project_id}/locations/{location_id}/namespaces/{namespace_id}/services/{service_id}` - The Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) should be granted `servicedirectory.viewer` and `servicedirectory.pscAuthorizedService` roles on the resource. }, "runtimeConfig": { # Runtime configuration to run the extension. # Optional. Runtime config controlling the runtime behavior of this Extension. "codeInterpreterRuntimeConfig": { # Code execution runtime configurations for code interpreter extension. "fileInputGcsBucket": "A String", # Optional. The Cloud Storage bucket for file input of this Extension. If specified, support input from the Cloud Storage bucket. Vertex Extension Custom Code Service Agent should be granted file reader to this bucket. If not specified, the extension will only accept file contents from request body and reject Cloud Storage file inputs. "fileOutputGcsBucket": "A String", # Optional. The Cloud Storage bucket for file output of this Extension. If specified, write all output files to the Cloud Storage bucket. Vertex Extension Custom Code Service Agent should be granted file writer to this bucket. If not specified, the file content will be output in response body. }, "defaultParams": { # Optional. Default parameters that will be set for all the execution of this extension. If specified, the parameter values can be overridden by values in [[ExecuteExtensionRequest.operation_params]] at request time. The struct should be in a form of map with param name as the key and actual param value as the value. E.g. If this operation requires a param "name" to be set to "abc". you can set this to something like {"name": "abc"}. "a_key": "", # Properties of the object. }, "vertexAiSearchRuntimeConfig": { # Runtime configuration for Vertex AI Search extension. "engineId": "A String", # Optional. Vertex AI Search engine ID. This is used to construct the search request. By setting this engine_id, API will construct the serving config using the default value to call search API for the user. The engine_id and serving_config_name cannot both be empty at the same time. "servingConfigName": "A String", # Optional. Vertex AI Search serving config name. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}` }, }, "toolUseExamples": [ # Optional. Examples to illustrate the usage of the extension as a tool. { # A single example of the tool usage. "displayName": "A String", # Required. The display name for example. "extensionOperation": { # Identifies one operation of the extension. # Extension operation to call. "extension": "A String", # Resource name of the extension. "operationId": "A String", # Required. Operation ID of the extension. }, "functionName": "A String", # Function name to call. "query": "A String", # Required. Query that should be routed to this tool. "requestParams": { # Request parameters used for executing this tool. "a_key": "", # Properties of the object. }, "responseParams": { # Response parameters generated by this tool. "a_key": "", # Properties of the object. }, "responseSummary": "A String", # Summary of the tool response to the user query. }, ], "updateTime": "A String", # Output only. Timestamp when this Extension was most recently updated. }
query(name, body=None, x__xgafv=None)
Queries an extension with a default controller. Args: name: string, Required. Name (identifier) of the extension; Format: `projects/{project}/locations/{location}/extensions/{extension}` (required) body: object, The request body. The object takes the form of: { # Request message for ExtensionExecutionService.QueryExtension. "contents": [ # 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. { # 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. "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. { # 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. "codeExecutionResult": { # Result of executing the [ExecutableCode]. Always follows a `part` containing the [ExecutableCode]. # Optional. Result of executing the [ExecutableCode]. "outcome": "A String", # Required. Outcome of the code execution. "output": "A String", # Optional. Contains stdout when code execution is successful, stderr or other description otherwise. }, "executableCode": { # Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the [FunctionDeclaration] tool and [FunctionCallingConfig] mode is set to [Mode.CODE]. # Optional. Code generated by the model that is meant to be executed. "code": "A String", # Required. The code to be executed. "language": "A String", # Required. Programming language of the `code`. }, "fileData": { # URI based data. # Optional. URI based data. "fileUri": "A String", # Required. URI. "mimeType": "A String", # Required. The IANA standard MIME type of the source data. }, "functionCall": { # 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. # Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. "args": { # Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. "a_key": "", # Properties of the object. }, "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name]. }, "functionResponse": { # 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. # 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. "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. "response": { # 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. "a_key": "", # Properties of the object. }, }, "inlineData": { # Content blob. It's preferred to send as text directly rather than raw bytes. # Optional. Inlined bytes data. "data": "A String", # Required. Raw bytes. "mimeType": "A String", # Required. The IANA standard MIME type of the source data. }, "text": "A String", # Optional. Text part (can be code). "videoMetadata": { # Metadata describes the input video content. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. "endOffset": "A String", # Optional. The end offset of the video. "startOffset": "A String", # Optional. The start offset of the video. }, }, ], "role": "A String", # 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. }, ], } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Response message for ExtensionExecutionService.QueryExtension. "failureMessage": "A String", # Failure message if any. "steps": [ # Steps of extension or LLM interaction, can contain function call, function response, or text response. The last step contains the final response to the query. { # 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. "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types. { # 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. "codeExecutionResult": { # Result of executing the [ExecutableCode]. Always follows a `part` containing the [ExecutableCode]. # Optional. Result of executing the [ExecutableCode]. "outcome": "A String", # Required. Outcome of the code execution. "output": "A String", # Optional. Contains stdout when code execution is successful, stderr or other description otherwise. }, "executableCode": { # Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the [FunctionDeclaration] tool and [FunctionCallingConfig] mode is set to [Mode.CODE]. # Optional. Code generated by the model that is meant to be executed. "code": "A String", # Required. The code to be executed. "language": "A String", # Required. Programming language of the `code`. }, "fileData": { # URI based data. # Optional. URI based data. "fileUri": "A String", # Required. URI. "mimeType": "A String", # Required. The IANA standard MIME type of the source data. }, "functionCall": { # 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. # Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. "args": { # Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. "a_key": "", # Properties of the object. }, "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name]. }, "functionResponse": { # 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. # 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. "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. "response": { # 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. "a_key": "", # Properties of the object. }, }, "inlineData": { # Content blob. It's preferred to send as text directly rather than raw bytes. # Optional. Inlined bytes data. "data": "A String", # Required. Raw bytes. "mimeType": "A String", # Required. The IANA standard MIME type of the source data. }, "text": "A String", # Optional. Text part (can be code). "videoMetadata": { # Metadata describes the input video content. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. "endOffset": "A String", # Optional. The end offset of the video. "startOffset": "A String", # Optional. The start offset of the video. }, }, ], "role": "A String", # 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. }, ], }