Returns the deployments Resource.
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.
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 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}`
"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 it is not specified, the Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) will be used. - If the service account is provided, the service account should grant Vertex AI Extension Service Agent `iam.serviceAccounts.getAccessToken` permission.
},
"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}`
},
"noAuth": { # Empty message, used to indicate no authentication for an endpoint. # Config for no auth.
},
"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 that the extension execution service will use to query extension. Used for generating OAuth token on behalf of provided service account. - If the service account is provided, the service account should grant Vertex AI Service Agent `iam.serviceAccounts.getAccessToken` permission.
},
"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.
},
},
}
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.
"output": { # Output from the extension. The output should be conformant to the extension's manifest/OpenAPI spec. The output can contain values for keys like "content", "headers", etc. This field is deprecated, please use content field below for the extension execution result.
"a_key": "", # Properties of the object.
},
}
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 and parameters. 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). 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
"description": "A String", # Optional. The description of the data.
"enum": [ # Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
"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
"items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. Schema of the elements of Type.ARRAY.
"nullable": True or False, # Optional. Indicates if the value may be null.
"properties": { # Optional. Properties of Type.OBJECT.
"a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema
},
"required": [ # Optional. Required properties of Type.OBJECT.
"A String",
],
"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}`
"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 it is not specified, the Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) will be used. - If the service account is provided, the service account should grant Vertex AI Extension Service Agent `iam.serviceAccounts.getAccessToken` permission.
},
"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}`
},
"noAuth": { # Empty message, used to indicate no authentication for an endpoint. # Config for no auth.
},
"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 that the extension execution service will use to query extension. Used for generating OAuth token on behalf of provided service account. - If the service account is provided, the service account should grant Vertex AI Service Agent `iam.serviceAccounts.getAccessToken` permission.
},
"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.
},
},
"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.
"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.
"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 and parameters. 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). 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
"description": "A String", # Optional. The description of the data.
"enum": [ # Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
"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
"items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. Schema of the elements of Type.ARRAY.
"nullable": True or False, # Optional. Indicates if the value may be null.
"properties": { # Optional. Properties of Type.OBJECT.
"a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema
},
"required": [ # Optional. Required properties of Type.OBJECT.
"A String",
],
"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}`
"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 it is not specified, the Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) will be used. - If the service account is provided, the service account should grant Vertex AI Extension Service Agent `iam.serviceAccounts.getAccessToken` permission.
},
"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}`
},
"noAuth": { # Empty message, used to indicate no authentication for an endpoint. # Config for no auth.
},
"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 that the extension execution service will use to query extension. Used for generating OAuth token on behalf of provided service account. - If the service account is provided, the service account should grant Vertex AI Service Agent `iam.serviceAccounts.getAccessToken` permission.
},
"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.
},
},
"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.
"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.
"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 and parameters. 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). 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
"description": "A String", # Optional. The description of the data.
"enum": [ # Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
"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
"items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. Schema of the elements of Type.ARRAY.
"nullable": True or False, # Optional. Indicates if the value may be null.
"properties": { # Optional. Properties of Type.OBJECT.
"a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema
},
"required": [ # Optional. Required properties of Type.OBJECT.
"A String",
],
"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}`
"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 it is not specified, the Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) will be used. - If the service account is provided, the service account should grant Vertex AI Extension Service Agent `iam.serviceAccounts.getAccessToken` permission.
},
"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}`
},
"noAuth": { # Empty message, used to indicate no authentication for an endpoint. # Config for no auth.
},
"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 that the extension execution service will use to query extension. Used for generating OAuth token on behalf of provided service account. - If the service account is provided, the service account should grant Vertex AI Service Agent `iam.serviceAccounts.getAccessToken` permission.
},
"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.
},
},
"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.
"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.
"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 and parameters. 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). 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
"description": "A String", # Optional. The description of the data.
"enum": [ # Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
"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
"items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. Schema of the elements of Type.ARRAY.
"nullable": True or False, # Optional. Indicates if the value may be null.
"properties": { # Optional. Properties of Type.OBJECT.
"a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema
},
"required": [ # Optional. Required properties of Type.OBJECT.
"A String",
],
"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}`
"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 it is not specified, the Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) will be used. - If the service account is provided, the service account should grant Vertex AI Extension Service Agent `iam.serviceAccounts.getAccessToken` permission.
},
"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}`
},
"noAuth": { # Empty message, used to indicate no authentication for an endpoint. # Config for no auth.
},
"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 that the extension execution service will use to query extension. Used for generating OAuth token on behalf of provided service account. - If the service account is provided, the service account should grant Vertex AI Service Agent `iam.serviceAccounts.getAccessToken` permission.
},
"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.
},
},
"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.
"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.
"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`
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 and parameters. 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). 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
"description": "A String", # Optional. The description of the data.
"enum": [ # Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
"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
"items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. Schema of the elements of Type.ARRAY.
"nullable": True or False, # Optional. Indicates if the value may be null.
"properties": { # Optional. Properties of Type.OBJECT.
"a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema
},
"required": [ # Optional. Required properties of Type.OBJECT.
"A String",
],
"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}`
"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 it is not specified, the Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) will be used. - If the service account is provided, the service account should grant Vertex AI Extension Service Agent `iam.serviceAccounts.getAccessToken` permission.
},
"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}`
},
"noAuth": { # Empty message, used to indicate no authentication for an endpoint. # Config for no auth.
},
"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 that the extension execution service will use to query extension. Used for generating OAuth token on behalf of provided service account. - If the service account is provided, the service account should grant Vertex AI Service Agent `iam.serviceAccounts.getAccessToken` permission.
},
"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.
},
},
"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.
"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.
"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.
}