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: README.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -681,24 +681,25 @@ sms:
681
681
682
682
### Customize the prompts
683
683
684
-
Note that prompt examples contains `{xxx}` placeholders. These placeholders are replaced by the bot with the corresponding data. For example, `{bot_name}` is internally replaced by the bot name.
685
-
686
-
Be sure to write all the TTS prompts in English. This language is used as a pivot language for the conversation translation.
684
+
Note that prompt examples contains `{xxx}` placeholders. These placeholders are replaced by the bot with the corresponding data. For example, `{bot_name}` is internally replaced by the bot name. Be sure to write all the TTS prompts in English. This language is used as a pivot language for the conversation translation. All texts are referenced as lists, so user can have a different experience each time they call, thus making the conversation more engaging.
687
685
688
686
```yaml
689
687
# config.yaml
690
688
prompts:
691
689
tts:
692
-
hello_tpl: |
693
-
Hello, I'm {bot_name}, from {bot_company}! I'm an IT support specialist.
690
+
hello_tpl:
691
+
- : |
692
+
Hello, I'm {bot_name}, from {bot_company}! I'm an IT support specialist.
693
+
694
+
Here's how I work: when I'm working, you'll hear a little music; then, at the beep, it's your turn to speak. You can speak to me naturally, I'll understand.
694
695
695
-
Here's how I work: when I'm working, you'll hear a little music; then, at the beep, it's your turn to speak. You can speak to me naturally, I'll understand.
696
+
What's your problem?
697
+
- : |
698
+
Hi, I'm {bot_name} from {bot_company}. I'm here to help.
696
699
697
-
Examples:
698
-
- "I've got a problem with my computer, it won't turn on".
699
-
- "The external screen is flashing, I don't know why".
700
+
You'll hear music, then a beep. Speak naturally, I'll understand.
700
701
701
-
What's your problem?
702
+
What's the issue?
702
703
llm:
703
704
default_system_tpl: |
704
705
Assistant is called {bot_name} and is in a call center for the company {bot_company} as an expert with 20 years of experience in IT service.
Copy file name to clipboardExpand all lines: app/helpers/config_models/prompts.py
+60-22Lines changed: 60 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
importjson
2
+
importrandom
2
3
fromdatetimeimportdatetime
3
4
fromfunctoolsimportcached_property
4
5
fromhtmlimportescape
@@ -492,24 +493,56 @@ def logger(self) -> Logger:
492
493
493
494
classTtsModel(BaseModel):
494
495
tts_lang: str="en-US"
495
-
calltransfer_failure_tpl: str="It seems I can't connect you with an agent at the moment, but the next available agent will call you back as soon as possible."
496
-
connect_agent_tpl: str="I'm sorry, I wasn't able to respond your request. Please allow me to transfer you to an agent who can assist you further. Please stay on the line and I will get back to you shortly."
497
-
end_call_to_connect_agent_tpl: str= (
498
-
"Of course, stay on the line. I will transfer you to an agent."
499
-
)
500
-
error_tpl: str= (
501
-
"I'm sorry, I have encountered an error. Could you repeat your request?"
502
-
)
503
-
goodbye_tpl: str="Thank you for calling, I hope I've been able to help. You can call back, I've got it all memorized. {bot_company} wishes you a wonderful day!"
504
-
hello_tpl: str="""
505
-
Hello, I'm {bot_name}, the virtual assistant {bot_company}! Here's how I work: while I'm processing your information, wou will hear a music. Feel free to speak to me in a natural way - I'm designed to understand your requests. During the conversation, you can also send me text messages.
506
-
"""
507
-
timeout_silence_tpl: str="I'm sorry, I didn't hear anything. If you need help, let me know how I can help you."
508
-
welcome_back_tpl: str="Hello, I'm {bot_name}, from {bot_company}!"
509
-
timeout_loading_tpl: str= (
510
-
"It's taking me longer than expected to reply. Thank you for your patience…"
511
-
)
512
-
ivr_language_tpl: str="To continue in {label}, press {index}."
496
+
calltransfer_failure_tpl: list[str] = [
497
+
"It seems I can't connect you with an agent at the moment, but the next available agent will call you back as soon as possible.",
498
+
"I'm unable to connect you with an agent right now, but someone will get back to you shortly.",
499
+
"Sorry, no agents are available. We'll call you back soon.",
500
+
]
501
+
connect_agent_tpl: list[str] = [
502
+
"I'm sorry, I wasn't able to respond to your request. Please allow me to transfer you to an agent who can assist you further. Please stay on the line and I will get back to you shortly.",
503
+
"I apologize for not being able to assist you. Let me connect you to an agent who can help. Please hold on.",
504
+
"Sorry for the inconvenience. I'll transfer you to an agent now. Please hold.",
505
+
]
506
+
end_call_to_connect_agent_tpl: list[str] = [
507
+
"Of course, stay on the line. I will transfer you to an agent.",
508
+
"Sure, please hold on. I'll connect you to an agent.",
509
+
"Hold on, I'll transfer you now.",
510
+
]
511
+
error_tpl: list[str] = [
512
+
"I'm sorry, I didn't understand. Can you rephrase?",
513
+
"I didn't catch that. Could you say it differently?",
514
+
"Please repeat that.",
515
+
]
516
+
goodbye_tpl: list[str] = [
517
+
"Thank you for calling, I hope I've been able to help. You can call back, I've got it all memorized. {bot_company} wishes you a wonderful day!",
518
+
"It was a pleasure assisting you today. Remember, {bot_company} is always here to help. Have a fantastic day!",
519
+
"Thanks for reaching out! {bot_company} appreciates you. Have a great day!",
520
+
]
521
+
hello_tpl: list[str] = [
522
+
"Hello, I'm {bot_name}, the virtual assistant from {bot_company}! Here's how I work: while I'm processing your information, you will hear music. Feel free to speak to me in a natural way - I'm designed to understand your requests. During the conversation, you can also send me text messages.",
523
+
"Hi there! I'm {bot_name} from {bot_company}. While I process your info, you'll hear some music. Just talk to me naturally, and you can also send text messages.",
524
+
"Hello! I'm {bot_name} from {bot_company}. Speak naturally, and you can also text me.",
525
+
]
526
+
timeout_silence_tpl: list[str] = [
527
+
"I'm sorry, I didn't hear anything. If you need help, let me know how I can help you.",
528
+
"It seems quiet on your end. How can I assist you?",
529
+
"I didn't catch that. How can I help?",
530
+
]
531
+
welcome_back_tpl: list[str] = [
532
+
"Hello, I'm {bot_name}, from {bot_company}!",
533
+
"Hi there, {bot_name} from {bot_company} here!",
534
+
"Hey, it's {bot_name} from {bot_company}!",
535
+
]
536
+
timeout_loading_tpl: list[str] = [
537
+
"It's taking me longer than expected to reply. Thank you for your patience…",
538
+
"I'm working on your request. Thanks for waiting!",
0 commit comments