Resource: Extension
extensions are tools for large language models to access external data, run computations, etc.
JSON representation |
---|
{ "name": string, "displayName": string, "description": string, "createTime": string, "updateTime": string, "etag": string, "manifest": { object ( |
Fields | |
---|---|
name |
Identifier. The resource name of the Extension. |
displayName |
Required. The display name of the Extension. The name can be up to 128 characters long and can consist of any UTF-8 characters. |
description |
Optional. The description of the Extension. |
createTime |
Output only. timestamp when this Extension was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
updateTime |
Output only. timestamp when this Extension was most recently updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
etag |
Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. |
manifest |
Required. Manifest of the Extension. |
extensionOperations[] |
Output only. Supported operations. |
runtimeConfig |
Optional. Runtime config controlling the runtime behavior of this Extension. |
toolUseExamples[] |
Optional. Examples to illustrate the usage of the extension as a tool. |
privateServiceConnectConfig |
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. |
ExtensionManifest
Manifest spec of an Extension needed for runtime execution.
JSON representation |
---|
{ "name": string, "description": string, "apiSpec": { object ( |
Fields | |
---|---|
name |
Required. Extension name shown to the LLM. The name can be up to 128 characters long. |
description |
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. |
apiSpec |
Required. Immutable. The API specification shown to the LLM. |
authConfig |
Required. Immutable. type of auth supported by this extension. |
ApiSpec
The API specification shown to the LLM.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
openApiYaml |
The API spec in Open API standard and YAML format. |
openApiGcsUri |
Cloud Storage URI pointing to the OpenAPI spec. |
AuthConfig
Auth configuration to run the extension.
JSON representation |
---|
{ "authType": enum ( |
Fields | |
---|---|
authType |
type of auth scheme. |
Union field
|
|
apiKeyConfig |
Config for API key auth. |
httpBasicAuthConfig |
Config for HTTP Basic auth. |
googleServiceAccountConfig |
Config for Google service Account auth. |
oauthConfig |
Config for user oauth. |
oidcConfig |
Config for user OIDC auth. |
ApiKeyConfig
Config for authentication with API key.
JSON representation |
---|
{
"name": string,
"apiKeySecret": string,
"httpElementLocation": enum ( |
Fields | |
---|---|
name |
Required. The parameter name of the API key. E.g. If the API request is "https://example.com/act?apiKey= |
apiKeySecret |
Required. The name of the SecretManager secret version resource storing the API key. Format:
|
httpElementLocation |
Required. The location of the API key. |
HttpElementLocation
Enum of location an HTTP element can be.
Enums | |
---|---|
HTTP_IN_UNSPECIFIED |
|
HTTP_IN_QUERY |
Element is in the HTTP request query. |
HTTP_IN_HEADER |
Element is in the HTTP request header. |
HTTP_IN_PATH |
Element is in the HTTP request path. |
HTTP_IN_BODY |
Element is in the HTTP request body. |
HTTP_IN_COOKIE |
Element is in the HTTP request cookie. |
HttpBasicAuthConfig
Config for HTTP Basic Authentication.
JSON representation |
---|
{ "credentialSecret": string } |
Fields | |
---|---|
credentialSecret |
Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format:
|
GoogleServiceAccountConfig
Config for Google service Account Authentication.
JSON representation |
---|
{ "serviceAccount": string } |
Fields | |
---|---|
serviceAccount |
Optional. The service account that the extension execution service runs as.
|
OauthConfig
Config for user oauth.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
accessToken |
Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time. |
serviceAccount |
The service account used to generate access tokens for executing the Extension.
|
OidcConfig
Config for user OIDC auth.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
idToken |
OpenID Connect formatted id token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time. |
serviceAccount |
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).
|
AuthType
type of Auth.
Enums | |
---|---|
AUTH_TYPE_UNSPECIFIED |
|
NO_AUTH |
No Auth. |
API_KEY_AUTH |
API Key Auth. |
HTTP_BASIC_AUTH |
HTTP Basic Auth. |
GOOGLE_SERVICE_ACCOUNT_AUTH |
Google service Account Auth. |
OAUTH |
OAuth auth. |
OIDC_AUTH |
OpenID Connect (OIDC) Auth. |
ExtensionOperation
Operation of an extension.
JSON representation |
---|
{
"operationId": string,
"functionDeclaration": {
object ( |
Fields | |
---|---|
operationId |
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. |
functionDeclaration |
Output only. Structured representation of a function declaration as defined by the OpenAPI Spec. |
RuntimeConfig
Runtime configuration to run the extension.
JSON representation |
---|
{ "defaultParams": { object }, // Union field |
Fields | |
---|---|
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"}. |
Union field GoogleFirstPartyExtensionConfig . Runtime configurations for Google first party extensions. GoogleFirstPartyExtensionConfig can be only one of the following: |
|
codeInterpreterRuntimeConfig |
code execution runtime configurations for code interpreter extension. |
vertexAiSearchRuntimeConfig |
Runtime configuration for Vertex AI Search extension. |
CodeInterpreterRuntimeConfig
JSON representation |
---|
{ "fileInputGcsBucket": string, "fileOutputGcsBucket": string } |
Fields | |
---|---|
fileInputGcsBucket |
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 |
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. |
VertexAISearchRuntimeConfig
JSON representation |
---|
{ "servingConfigName": string, "engineId": string } |
Fields | |
---|---|
servingConfigName |
Optional. Vertex AI Search serving config name. Format: |
engineId |
Optional. Vertex AI Search engine id. This is used to construct the search request. By setting this engineId, API will construct the serving config using the default value to call search API for the user. The engineId and servingConfigName cannot both be empty at the same time. |
ToolUseExample
A single example of the tool usage.
JSON representation |
---|
{ "displayName": string, "query": string, "requestParams": { object }, "responseParams": { object }, "responseSummary": string, // Union field |
Fields | |
---|---|
displayName |
Required. The display name for example. |
query |
Required. Query that should be routed to this tool. |
requestParams |
Request parameters used for executing this tool. |
responseParams |
Response parameters generated by this tool. |
responseSummary |
Summary of the tool response to the user query. |
Union field Target . Target tool to use. Target can be only one of the following: |
|
extensionOperation |
Extension operation to call. |
functionName |
Function name to call. |
ExtensionOperation
Identifies one operation of the extension.
JSON representation |
---|
{ "extension": string, "operationId": string } |
Fields | |
---|---|
extension |
Resource name of the extension. |
operationId |
Required. Operation id of the extension. |
ExtensionPrivateServiceConnectConfig
PrivateExtensionConfig configuration for the extension.
JSON representation |
---|
{ "serviceDirectory": string } |
Fields | |
---|---|
serviceDirectory |
Required. The service Directory resource name in which the service endpoints associated to the extension are registered. Format:
|
Methods |
|
---|---|
|
Deletes an Extension. |
|
Executes the request against a given extension. |
|
Gets an Extension. |
|
Imports an Extension. |
|
Lists Extensions in a location. |
|
Updates an Extension. |
|
Queries an extension with a default controller. |