You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/agents/voice/breeze_buddy/workflows/order_confirmation/websocket_bot.py
+14-7Lines changed: 14 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -538,7 +538,7 @@ def _get_flow_config(self):
538
538
),
539
539
FlowsFunctionSchema(
540
540
name="cancel_order",
541
-
description="Call this function to cancel the user's order. If the user gives a reason for cancellation, pass it.",
541
+
description="Call this function if the customer explicitly asks to cancel the order. If the user gives a reason for cancellation, pass it.",
542
542
handler=self._deny_order_handler,
543
543
properties={
544
544
"reason": {
@@ -568,7 +568,7 @@ def _get_flow_config(self):
568
568
),
569
569
FlowsFunctionSchema(
570
570
name="cancel_order",
571
-
description="Call this function to cancel the user's order. If the user gives a reason for cancellation, pass it.",
571
+
description="Call this function if the customer explicitly asks to cancel the order. If the user gives a reason for cancellation, pass it.",
572
572
handler=self._deny_order_handler,
573
573
properties={
574
574
"reason": {
@@ -599,6 +599,13 @@ def _get_flow_config(self):
599
599
properties={},
600
600
required=[],
601
601
),
602
+
FlowsFunctionSchema(
603
+
name="user_busy",
604
+
description="Call this function if the user says they are busy or it's not a good time to talk.",
605
+
handler=self._user_busy_handler,
606
+
properties={},
607
+
required=[],
608
+
),
602
609
]
603
610
604
611
# Address update functions
@@ -659,7 +666,7 @@ def _get_flow_config(self):
659
666
"task_messages": [
660
667
{
661
668
"role": "system",
662
-
"content": "The order is confirmed. Say: 'Thank you for confirming your order. Your order will be delivered soon. Have a good day'",
669
+
"content": "Thank you for confirming your order. Your order will be delivered soon. Have a good day.",
663
670
}
664
671
],
665
672
"post_actions": [
@@ -671,7 +678,7 @@ def _get_flow_config(self):
671
678
"task_messages": [
672
679
{
673
680
"role": "system",
674
-
"content": "The user confirmed the order but asked a question. Say: 'Thank you for confirming the order. I am here just to confirm your order, for any questions related to the order please refer to the website for more details. Have a good day.'",
681
+
"content": "Thank you for confirming the order. I am here just to confirm your order, for any questions related to the order please refer to the website for more details. Have a good day.",
675
682
}
676
683
],
677
684
"post_actions": [
@@ -683,7 +690,7 @@ def _get_flow_config(self):
683
690
"task_messages": [
684
691
{
685
692
"role": "system",
686
-
"content": "The order is cancelled. Say: 'I understand you don't want to proceed with this order. I am cancelling your order. Thank you for your time.'",
693
+
"content": "I understand you don't want to proceed with this order. I am cancelling your order. Thank you for your time.",
687
694
}
688
695
],
689
696
"post_actions": [
@@ -695,7 +702,7 @@ def _get_flow_config(self):
695
702
"task_messages": [
696
703
{
697
704
"role": "system",
698
-
"content": "The user is busy. Say: 'I understand. I will call you back later. Thank you for your time.'",
705
+
"content": "I understand. I will call you back later. Thank you for your time.",
699
706
}
700
707
],
701
708
"post_actions": [
@@ -707,7 +714,7 @@ def _get_flow_config(self):
707
714
"task_messages": [
708
715
{
709
716
"role": "system",
710
-
"content": f"The user asked an unrelated question. Say: 'I'm not able to help you with that right now, but you can find all the latest details on the {self.shop_name} website. Regarding your order, would you like to confirm it?'",
717
+
"content": f"I'm not able to help you with that right now, but you can find all the latest details on the {self.shop_name} website. Regarding your order, would you like to confirm it?",
0 commit comments