Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
feat: add metadata from dialogflow related to transcript segment (#54)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 399513805

Source-Link: googleapis/googleapis@0766e6d

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
  • Loading branch information
gcf-owl-bot[bot] authored Sep 29, 2021
1 parent d884ec2 commit ef575cf
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions google/cloud/contact_center_insights_v1/types/resources.py
Original file line number Diff line number Diff line change
@@ -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,)


0 comments on commit ef575cf

Please sign in to comment.