From ef575cf076376261c784b9c3332ef2befa1a11d9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Sep 2021 00:14:17 +0000 Subject: [PATCH] feat: add metadata from dialogflow related to transcript segment (#54) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 399513805 Source-Link: https://github.com/googleapis/googleapis/commit/0766e6d42598a894007ab037c3c96283f58ab30b Source-Link: https://github.com/googleapis/googleapis-gen/commit/2bc8343812fa9c07c73292ac34b43f05c9686b74 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmJjODM0MzgxMmZhOWMwN2M3MzI5MmFjMzRiNDNmMDVjOTY4NmI3NCJ9 feat: add sentiment data for transcript segment feat: add obfuscated if from dialogflow --- .../types/resources.py | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/google/cloud/contact_center_insights_v1/types/resources.py b/google/cloud/contact_center_insights_v1/types/resources.py index e2df252..2d64af3 100644 --- a/google/cloud/contact_center_insights_v1/types/resources.py +++ b/google/cloud/contact_center_insights_v1/types/resources.py @@ -157,6 +157,9 @@ class Transcript(proto.Message): class TranscriptSegment(proto.Message): r"""A segment of a full transcript. Attributes: + message_time (google.protobuf.timestamp_pb2.Timestamp): + The time that the message occurred, if + provided. text (str): The text of this segment. confidence (float): @@ -179,6 +182,11 @@ class TranscriptSegment(proto.Message): indicates that the audio is mono. segment_participant (google.cloud.contact_center_insights_v1.types.ConversationParticipant): The participant of this segment. + dialogflow_segment_metadata (google.cloud.contact_center_insights_v1.types.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata): + CCAI metadata relating to the current + transcript segment. + sentiment (google.cloud.contact_center_insights_v1.types.SentimentData): + The sentiment for this transcript segment. """ class WordInfo(proto.Message): @@ -209,6 +217,22 @@ class WordInfo(proto.Message): word = proto.Field(proto.STRING, number=3,) confidence = proto.Field(proto.FLOAT, number=4,) + class DialogflowSegmentMetadata(proto.Message): + r"""Metadata from Dialogflow relating to the current transcript + segment. + + Attributes: + smart_reply_allowlist_covered (bool): + Whether the transcript segment was covered + under the configured smart reply allowlist in + Agent Assist. + """ + + smart_reply_allowlist_covered = proto.Field(proto.BOOL, number=1,) + + message_time = proto.Field( + proto.MESSAGE, number=6, message=timestamp_pb2.Timestamp, + ) text = proto.Field(proto.STRING, number=1,) confidence = proto.Field(proto.FLOAT, number=2,) words = proto.RepeatedField( @@ -221,6 +245,12 @@ class WordInfo(proto.Message): segment_participant = proto.Field( proto.MESSAGE, number=9, message="ConversationParticipant", ) + dialogflow_segment_metadata = proto.Field( + proto.MESSAGE, + number=10, + message="Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata", + ) + sentiment = proto.Field(proto.MESSAGE, number=11, message="SentimentData",) transcript_segments = proto.RepeatedField( proto.MESSAGE, @@ -1276,6 +1306,8 @@ class ConversationParticipant(proto.Message): Deprecated. Use ``dialogflow_participant_name`` instead. The name of the Dialogflow participant. Format: projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} + obfuscated_external_user_id (str): + Obfuscated user ID from Dialogflow. role (google.cloud.contact_center_insights_v1.types.ConversationParticipant.Role): The role of the participant. """ @@ -1293,6 +1325,7 @@ class Role(proto.Enum): ) user_id = proto.Field(proto.STRING, number=6, oneof="participant",) dialogflow_participant = proto.Field(proto.STRING, number=1,) + obfuscated_external_user_id = proto.Field(proto.STRING, number=3,) role = proto.Field(proto.ENUM, number=2, enum=Role,)