From c37a35b7a62e990d9e1a6f103f5eb550fa90da13 Mon Sep 17 00:00:00 2001 From: Arthur Ceccotti Date: Wed, 20 Aug 2025 09:20:11 +0200 Subject: [PATCH 1/2] Add webhook note --- src/gradient_labs/conversation.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gradient_labs/conversation.py b/src/gradient_labs/conversation.py index d6193a0..098af36 100644 --- a/src/gradient_labs/conversation.py +++ b/src/gradient_labs/conversation.py @@ -166,6 +166,9 @@ class ConversationHandOffEvent: # Reason is a human-legible description of the Reason code. reason: str + # Note is a human-legible summary of the conversation so far, for a smooth hand-off. + note: Optional[str] = None + # Target defines where the agent wants to hand this conversation to. target: Optional[str] = None From 124106ef6fc08ba429b140a14b07d6d736fd23ba Mon Sep 17 00:00:00 2001 From: Arthur Ceccotti Date: Wed, 20 Aug 2025 09:23:19 +0200 Subject: [PATCH 2/2] Add webhook note --- src/gradient_labs/conversation.py | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/gradient_labs/conversation.py b/src/gradient_labs/conversation.py index 098af36..fb6c057 100644 --- a/src/gradient_labs/conversation.py +++ b/src/gradient_labs/conversation.py @@ -158,19 +158,31 @@ class ConversationHandOffEvent: """ Details of the conversation the event relates to. """ - - # reason_code is the code that describes why the agent wants to hand off this - # conversation. reason_code: str - - # Reason is a human-legible description of the Reason code. + """ + reason_code is the code that describes why the agent wants to hand off this + conversation. + """ + reason: str + """ + reason is a human-legible description of the Reason code. + """ - # Note is a human-legible summary of the conversation so far, for a smooth hand-off. note: Optional[str] = None + """ + Note is a human-legible summary of the conversation so far, for a smooth hand-off. + """ + + intent: Optional[str] = None + """ + Intent is the most recent intent that was classified from the customer's conversation, if any. + """ - # Target defines where the agent wants to hand this conversation to. target: Optional[str] = None + """ + Target defines where the agent wants to hand this conversation to. + """ @dataclass_json