diff --git a/mmv1/products/dialogflow/Generator.yaml b/mmv1/products/dialogflow/Generator.yaml index 58fa343b9a9c..5cebd88b1f9f 100644 --- a/mmv1/products/dialogflow/Generator.yaml +++ b/mmv1/products/dialogflow/Generator.yaml @@ -24,6 +24,10 @@ self_link: '{{name}}' create_url: projects/{{project}}/locations/{{location}}/generators?generatorId={{generator_id}} update_mask: true update_verb: PATCH +timeouts: + insert_minutes: 20 + update_minutes: 20 + delete_minutes: 20 custom_code: pre_create: templates/terraform/pre_create/dialogflow_set_endpoint.go.tmpl post_create: templates/terraform/post_create/set_computed_name.tmpl @@ -38,6 +42,14 @@ samples: - name: dialogflow_generator_basic resource_id_vars: profile_name: dialogflow-profile + - name: dialogflow_generator_agent_coaching + primary_resource_id: agent_coaching_generator + steps: + - name: dialogflow_generator_agent_coaching + - name: dialogflow_generator_with_tools + primary_resource_id: generator_with_tools + steps: + - name: dialogflow_generator_with_tools parameters: - name: location type: String @@ -63,7 +75,13 @@ properties: Optional. Human readable description of the generator. - name: summarizationContext type: NestedObject - required: true + exactly_one_of: + - summarization_context + - free_form_context + - agent_coaching_context + - translation_context + - agent_feedback_context + - customer_message_generation_context description: | Input of prebuilt Summarization feature. properties: @@ -205,11 +223,244 @@ properties: type: String default_from_api: true description: | - Optional. Version of the feature. If not set, default to latest version. Current candidates are ["1.0"]. + Optional. Version of the feature. If not set, default to latest version. Current candidates are ["5.0", "6.0"]. - name: outputLanguageCode type: String description: | Optional. The target language of the generated summary. The language code for conversation will be used if this field is empty. Supported 2.0 and later versions. + - name: freeFormContext + type: NestedObject + exactly_one_of: + - summarization_context + - free_form_context + - agent_coaching_context + - translation_context + - agent_feedback_context + - customer_message_generation_context + description: | + Free form text input to LLM. + properties: + - name: text + type: String + description: | + Optional. Free form text input to LLM. + - name: agentCoachingContext + type: NestedObject + exactly_one_of: + - summarization_context + - free_form_context + - agent_coaching_context + - translation_context + - agent_feedback_context + - customer_message_generation_context + description: | + Agent coaching context. + properties: + - name: overarchingGuidance + type: String + description: | + Optional. The overarching guidance for the agent coaching. This should be set only for v1.5 and later versions. + - name: version + type: String + description: | + Optional. Version of the feature. If not set, default to latest version. Current candidates are ["2.5"]. + - name: outputLanguageCode + type: String + description: | + Optional. Output language code. + - name: searchConfig + type: NestedObject + description: | + Optional. Search configuration for agent coaching. This is used for general articles search. + properties: + - name: searchEngine + type: String + description: | + Required. The search engine to use for the agent coaching articles/instructions. Format: `projects/{project}/locations/global/collections/default_collection/engines/{engine_id}` + - name: datastores + type: Array + description: | + Optional. The datastore ids linked to the search engine. + item_type: + type: String + - name: instructions + type: Array + description: | + Optional. Customized instructions for agent coaching. + item_type: + type: NestedObject + properties: + - name: displayName + type: String + description: | + Optional. Display name for the instruction. + - name: displayDetails + type: String + description: | + Optional. The detailed description of this instruction. + - name: condition + type: String + description: | + Optional. The condition of the instruction. + - name: agentAction + type: String + description: | + Optional. The action that human agent should take. + - name: systemAction + type: String + description: | + Optional. The action that system should take. + - name: triggeringEvent + type: Enum + description: | + Optional. The trigger event of the instruction. + enum_values: + - END_OF_UTTERANCE + - MANUAL_CALL + - CUSTOMER_MESSAGE + - AGENT_MESSAGE + - name: translationContext + type: NestedObject + exactly_one_of: + - summarization_context + - free_form_context + - agent_coaching_context + - translation_context + - agent_feedback_context + - customer_message_generation_context + description: | + Translation context. + properties: + - name: agentLanguageCode + type: String + required: true + description: | + Required. The language code used by the agent. At least one of agent_language_code and customer_language_code must be English (en-US). + - name: customerLanguageCode + type: String + required: true + description: | + Required. The language code used by the customer. At least one of agent_language_code and customer_language_code must be English (en-US). + - name: version + type: String + description: | + Optional. Version of the feature. If not set, default to latest version. Current candidates are ["1.0"]. + - name: translationCustomization + type: NestedObject + description: | + Optional. Customized translation for specific glossaries and sentences. + properties: + - name: glossaryTerms + type: Array + description: | + Optional. Translation of a specific glossary in both agent and customer languages. + item_type: + type: NestedObject + properties: + - name: agentLanguageGlossary + type: String + required: true + description: | + Required. The glossary in agent language. + - name: customerLanguageGlossary + type: String + required: true + description: | + Required. The glossary in customer language. + - name: sentenceTranslations + type: Array + description: | + Optional. Translation of a specific sentence in both agent and customer languages. + item_type: + type: NestedObject + properties: + - name: agentLanguageSentence + type: String + required: true + description: | + Required. The sentence in agent language. + - name: customerLanguageSentence + type: String + required: true + description: | + Required. The sentence in customer language. + - name: agentFeedbackContext + type: NestedObject + exactly_one_of: + - summarization_context + - free_form_context + - agent_coaching_context + - translation_context + - agent_feedback_context + - customer_message_generation_context + description: | + Agent feedback context. + properties: + - name: version + type: String + description: | + Optional. Version of the feature. If not set, default to latest version. Current candidates are ["1.0"]. + - name: instructions + type: Array + description: | + Optional. Instructions to generate feedback from. + item_type: + type: NestedObject + properties: + - name: displayName + type: String + description: | + Optional. Display name for the instruction. + - name: displayDetails + type: String + description: | + Optional. The detailed description of this instruction. + - name: condition + type: String + description: | + Optional. The condition of the instruction. + - name: agentAction + type: String + description: | + Optional. The action that human agent should take. + - name: systemAction + type: String + description: | + Optional. The action that system should take. + - name: triggeringEvent + type: Enum + description: | + Optional. The trigger event of the instruction. + enum_values: + - END_OF_UTTERANCE + - MANUAL_CALL + - CUSTOMER_MESSAGE + - AGENT_MESSAGE + - name: customerMessageGenerationContext + type: NestedObject + exactly_one_of: + - summarization_context + - free_form_context + - agent_coaching_context + - translation_context + - agent_feedback_context + - customer_message_generation_context + description: | + Customer message generation context. + properties: + - name: version + type: String + description: | + Optional. Version of the feature. If not set, default to latest version. Current candidates are ["1.0"]. + - name: customization + type: NestedObject + description: | + Optional. Customizations for customer message generation. + properties: + - name: scenario + type: String + description: | + Optional. Scenario for generating customer messages. - name: inferenceParameter type: NestedObject description: | @@ -240,7 +491,18 @@ properties: - MANUAL_CALL - CUSTOMER_MESSAGE - AGENT_MESSAGE + - TOOL_CALL_COMPLETION - name: publishedModel type: String description: | Optional. The published Large Language Model name. * To use the latest model version, specify the model name without version number. Example: text-bison * To use a stable model version, specify the version number as well. Example: text-bison@002. + - name: tunedModel + type: String + description: | + Optional. Tuned Large Language Model endpoint from Vertex. Format: `projects//locations//endpoints/`. + - name: tools + type: Array + description: | + Optional. A list of tools this generator can use. Format: `projects//locations//tools/`. + item_type: + type: String diff --git a/mmv1/products/dialogflow/Tool.yaml b/mmv1/products/dialogflow/Tool.yaml new file mode 100644 index 000000000000..6daebbe3a5a8 --- /dev/null +++ b/mmv1/products/dialogflow/Tool.yaml @@ -0,0 +1,302 @@ +# Copyright 2026 Google Inc. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License stroke stroke distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +name: Tool +description: | + Provides a list of actions available to a Generator/Playbook (e.g., OpenAPI call, Function call). +references: + guides: + Official Documentation: https://cloud.google.com/agent-assist/docs + api: https://cloud.google.com/dialogflow/es/docs/reference/rest/v2beta1/projects.locations.tools +base_url: projects/{{project}}/locations/{{location}}/tools +self_link: '{{name}}' +update_mask: true +update_verb: PATCH +custom_code: + pre_create: templates/terraform/pre_create/dialogflow_set_endpoint.go.tmpl + pre_read: templates/terraform/pre_create/dialogflow_set_endpoint.go.tmpl + pre_update: templates/terraform/pre_create/dialogflow_set_endpoint.go.tmpl + pre_delete: templates/terraform/pre_create/dialogflow_set_endpoint.go.tmpl +samples: + - name: dialogflow_tool_basic + primary_resource_id: basic_tool + min_version: "beta" + steps: + - name: dialogflow_tool_basic + resource_id_vars: + location: "global" + tool_key: "basic_tool_key" + - name: dialogflow_tool_connector + primary_resource_id: connector_tool + min_version: "beta" + steps: + - name: dialogflow_tool_connector + resource_id_vars: + location: "global" + tool_key: "connector_tool_key" + - name: dialogflow_tool_datastore + primary_resource_id: datastore_tool + min_version: "beta" + steps: + - name: dialogflow_tool_datastore + resource_id_vars: + location: "global" + tool_key: "datastore_tool_key" + - name: dialogflow_tool_function + primary_resource_id: function_tool + min_version: "beta" + steps: + - name: dialogflow_tool_function + resource_id_vars: + location: "global" + tool_key: "function_tool_key" + - name: dialogflow_tool_auth + primary_resource_id: auth_tool + min_version: "beta" + steps: + - name: dialogflow_tool_auth + resource_id_vars: + location: "global" + tool_key: "auth_tool_key" + - name: dialogflow_tool_bearer + primary_resource_id: bearer_tool + min_version: "beta" + steps: + - name: dialogflow_tool_bearer + resource_id_vars: + location: "global" + tool_key: "bearer_token_tool_key" + - name: dialogflow_tool_oauth + primary_resource_id: oauth_tool + min_version: "beta" + steps: + - name: dialogflow_tool_oauth + resource_id_vars: + location: "global" + tool_key: "oauth_tool_key" + - name: dialogflow_tool_service_agent + primary_resource_id: service_agent_tool + min_version: "beta" + steps: + - name: dialogflow_tool_service_agent + resource_id_vars: + location: "global" + tool_key: "service_agent_tool_key" + +parameters: + - name: location + type: String + required: true + url_param_only: true + description: | + The location of the tool. +properties: + - name: name + type: String + description: | + The resource name of the tool. + output: true + - name: toolKey + type: String + description: | + Required. A human readable short name of the tool, which should be unique within the project. It should only contain letters, numbers, and underscores, and it will be used by LLM to identify the tool. + required: true + - name: displayName + type: String + description: | + Optional. The human-readable name of the tool, unique within the project and location. + - name: description + type: String + description: | + Optional. Human readable description of the tool. + - name: openApiSpec + type: NestedObject + description: | + Specification for OpenAPI tool. + This field is part of a union field `specification`: Only one of `openApiSpec`, `dataStoreSpec`, `functionSpec`, or `connectorSpec` may be set. + properties: + - name: authentication + type: NestedObject + description: | + Optional. Authentication information required by the API. + properties: + - name: apiKeyConfig + type: NestedObject + description: | + Config for API key auth. + This field is part of a union field `auth_config`: Only one of `apiKeyConfig`, `oauthConfig`, `serviceAgentAuthConfig`, or `bearerTokenConfig` may be set. + properties: + - name: keyName + type: String + description: | + The parameter name or the header name of the API key. + required: true + - name: apiKey + type: String + description: | + Optional. The API key. + sensitive: true + - name: requestLocation + type: String + description: | + Key location in the request. + required: true + - name: oauthConfig + type: NestedObject + description: | + Config for OAuth. + This field is part of a union field `auth_config`: Only one of `apiKeyConfig`, `oauthConfig`, `serviceAgentAuthConfig`, or `bearerTokenConfig` may be set. + properties: + - name: oauthGrantType + type: String + description: | + OAuth grant types. + required: true + - name: clientId + type: String + description: | + The client ID from the OAuth provider. + required: true + - name: clientSecret + type: String + description: | + Optional. The client secret from the OAuth provider. + sensitive: true + - name: tokenEndpoint + type: String + description: | + The token endpoint in the OAuth provider to exchange for an access token. + required: true + - name: scopes + type: Array + description: | + Optional. The OAuth scopes to grant. + item_type: + type: String + - name: serviceAgentAuthConfig + type: NestedObject + description: | + Config for service agent auth. + This field is part of a union field `auth_config`: Only one of `apiKeyConfig`, `oauthConfig`, `serviceAgentAuthConfig`, or `bearerTokenConfig` may be set. + properties: + - name: serviceAgentAuth + type: String + description: | + Optional. Indicate the auth token type generated from the Diglogflow service agent. + - name: bearerTokenConfig + type: NestedObject + description: | + Config for bearer token auth. + This field is part of a union field `auth_config`: Only one of `apiKeyConfig`, `oauthConfig`, `serviceAgentAuthConfig`, or `bearerTokenConfig` may be set. + properties: + - name: token + type: String + description: | + Optional. The text token appended to the text Bearer to the request Authorization header. + sensitive: true + - name: textSchema + type: String + description: | + Required. The OpenAPI schema in YAML or JSON format. + required: true + - name: dataStoreSpec + type: NestedObject + description: | + Data store search tool specification. + This field is part of a union field `specification`: Only one of `openApiSpec`, `dataStoreSpec`, `functionSpec`, or `connectorSpec` may be set. + properties: + - name: dataStoreConnections + type: Array + description: | + List of data stores to search. + required: true + item_type: + type: NestedObject + properties: + - name: dataStoreType + type: String + description: | + The type of the connected data store. + - name: dataStore + type: String + description: | + The full name of the referenced data store. + - name: documentProcessingMode + type: String + description: | + The document processing mode for the data store connection. + - name: functionSpec + type: NestedObject + description: | + Client side executed function specification. + This field is part of a union field `specification`: Only one of `openApiSpec`, `dataStoreSpec`, `functionSpec`, or `connectorSpec` may be set. + properties: + - name: inputSchema + type: String + description: | + Optional. The JSON schema describing the input of the function. + - name: outputSchema + type: String + description: | + Optional. The JSON schema describing the output of the function. + - name: connectorSpec + type: NestedObject + description: | + Integration connectors tool specification. + This field is part of a union field `specification`: Only one of `openApiSpec`, `dataStoreSpec`, `functionSpec`, or `connectorSpec` may be set. + properties: + - name: name + type: String + required: true + description: | + The full resource name of the referenced Integration Connectors Connection. + - name: actions + type: Array + required: true + description: | + Actions for the tool to use. + item_type: + type: NestedObject + properties: + - name: inputFields + type: Array + description: | + Entity fields to use as inputs for the operation. + item_type: + type: String + - name: outputFields + type: Array + description: | + Entity fields to return from the operation. + item_type: + type: String + - name: connectionActionId + type: String + description: | + ID of a Connection action for the tool to use. + - name: entityOperation + type: NestedObject + description: | + Entity operation configuration for the tool to use. + properties: + - name: entityId + type: String + description: | + ID of the entity. + required: true + - name: operation + type: String + description: | + The operation to perform on the entity. + required: true diff --git a/mmv1/templates/terraform/samples/services/dialogflow/dialogflow_generator_agent_coaching.tf.tmpl b/mmv1/templates/terraform/samples/services/dialogflow/dialogflow_generator_agent_coaching.tf.tmpl new file mode 100644 index 000000000000..8dc582706a6d --- /dev/null +++ b/mmv1/templates/terraform/samples/services/dialogflow/dialogflow_generator_agent_coaching.tf.tmpl @@ -0,0 +1,8 @@ +resource "google_dialogflow_generator" "{{$.PrimaryResourceId}}" { + location = "global" + description = "An agent coaching generator." + agent_coaching_context { + version = "1.0" + overarching_guidance = "Be helpful." + } +} diff --git a/mmv1/templates/terraform/samples/services/dialogflow/dialogflow_generator_basic.tf.tmpl b/mmv1/templates/terraform/samples/services/dialogflow/dialogflow_generator_basic.tf.tmpl index 6d8ccb62ba19..4691bac5de6a 100644 --- a/mmv1/templates/terraform/samples/services/dialogflow/dialogflow_generator_basic.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/dialogflow/dialogflow_generator_basic.tf.tmpl @@ -8,7 +8,7 @@ resource "google_dialogflow_generator" "{{$.PrimaryResourceId}}" { top_p = 0.95 } summarization_context { - version = "4.0" + version = "6.0" output_language_code = "en" } trigger_event = "MANUAL_CALL" diff --git a/mmv1/templates/terraform/samples/services/dialogflow/dialogflow_generator_with_tools.tf.tmpl b/mmv1/templates/terraform/samples/services/dialogflow/dialogflow_generator_with_tools.tf.tmpl new file mode 100644 index 000000000000..aa4effac333d --- /dev/null +++ b/mmv1/templates/terraform/samples/services/dialogflow/dialogflow_generator_with_tools.tf.tmpl @@ -0,0 +1,32 @@ +resource "google_dialogflow_generator" "{{$.PrimaryResourceId}}" { + location = "global" + description = "A generator with tools." + tools = [google_dialogflow_tool.test_tool.name] + summarization_context { + version = "6.0" + output_language_code = "en" + } + trigger_event = "MANUAL_CALL" +} + +resource "google_dialogflow_tool" "test_tool" { + location = "global" + display_name = "test-tool" + description = "A test tool" + open_api_spec { + text_schema = <