Skip to content

Commit d13be45

Browse files
Fix Issue 24131 : Add support for new_recognition_result_notification_config in google_dialogflow_conversation_profile (#15129)
1 parent c0fa533 commit d13be45

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

mmv1/products/dialogflow/ConversationProfile.yaml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ examples:
4444
primary_resource_id: 'basic_profile'
4545
vars:
4646
profile_name: 'dialogflow-profile'
47+
- name: 'dialogflow_conversation_profile_recognition_result_notification'
48+
primary_resource_id: 'recognition_result_notification_profile'
49+
vars:
50+
profile_name: 'dialogflow-profile'
51+
topic_name: 'recognition-result-notification'
52+
message_format: 'JSON'
4753
parameters:
4854
- name: 'location'
4955
type: String
@@ -536,7 +542,7 @@ properties:
536542
description: |
537543
Whether to log conversation events
538544
- type: NestedObject
539-
name: newMessageEventNotificationConfig
545+
name: 'newMessageEventNotificationConfig'
540546
description: |
541547
Pub/Sub topic on which to publish new agent assistant events.
542548
Expects the format "projects/<Project ID>/locations/<Location ID>/topics/<Topic ID>"
@@ -656,3 +662,23 @@ properties:
656662
- SSML_VOICE_GENDER_MALE
657663
- SSML_VOICE_GENDER_FEMALE
658664
- SSML_VOICE_GENDER_NEUTRAL
665+
- type: NestedObject
666+
name: 'newRecognitionResultNotificationConfig'
667+
description: |
668+
Optional. Configuration for publishing transcription intermediate results. Event will be sent in format of ConversationEvent. If configured, the following information will be populated as ConversationEvent Pub/Sub message attributes: - "participant_id" - "participantRole" - "message_id"
669+
properties:
670+
- type: string
671+
name: 'topic'
672+
description: |
673+
Name of the Pub/Sub topic to publish conversation events like CONVERSATION_STARTED as serialized ConversationEvent protos.
674+
For telephony integration to receive notification, make sure either this topic is in the same project as the conversation or you grant service-<Conversation Project Number>@gcp-sa-dialogflow.iam.gserviceaccount.com the Dialogflow Service Agent role in the topic project.
675+
For chat integration to receive notification, make sure API caller has been granted the Dialogflow Service Agent role for the topic.
676+
Format: projects/<Project ID>/locations/<Location ID>/topics/<Topic ID>.
677+
- name: 'messageFormat'
678+
type: Enum
679+
description: |
680+
Format of message.
681+
enum_values:
682+
- 'MESSAGE_FORMAT_UNSPECIFIED'
683+
- 'PROTO'
684+
- 'JSON'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
resource "google_dialogflow_conversation_profile" "{{$.PrimaryResourceId}}" {
2+
display_name = "{{index $.Vars "profile_name"}}"
3+
location = "global"
4+
new_recognition_result_notification_config {
5+
topic = google_pubsub_topic.{{$.PrimaryResourceId}}.id
6+
message_format = "{{index $.Vars "message_format"}}"
7+
}
8+
}
9+
10+
resource "google_pubsub_topic" "{{$.PrimaryResourceId}}" {
11+
name = "{{index $.Vars "topic_name"}}"
12+
}

0 commit comments

Comments
 (0)