Bots
On this page |
What’s about
In this section, you can find the blocks useful to configure a voicebot in your call flow.
Important
Please note that the below blocks are related to third-party apps: functionalities, costs, and behaviors depend on providers. An Internet connection is required to make the blocks properly work.
Remember that we will apply a cost per each AI Conversation managed by bots. Please refer to this page (Advanced wiki with Jira credentials).
Video tutorial
OpenAI ChatGPT
from VERSION 3.36.0
This block will allow Voicebot creation via ChatGPT, by configuring an OpenAI account under Cloud Providers section.
Requirements:
Set up an OpenAI Cloud Provider with a valid API key
If you want to use Transcription and speech generation features, you need to have a paid OpenAI account. Explore OpenAI pricing
Configure an OpenAI bot in Tools → OpenAI Bots
Label: here you can type a brief description
Choose an OpenAI bot: select the created bot from the list (mandatory field)
Text: you want to send (e.g. the variable {GOOGLE_ASR_TRANSCRIPT} or {OPENAI_WHISPER_TRANSCRIPT})
Sound to play while waiting (available from version 3.40.0): a playback sound, previously uploaded in Tools/Sound section, executed for the customer while waiting for a response from OpenAI, such as, “We are analyzing your request, we will get back to you shortly” , thus improving the user experience and avoiding audio gaps.
This option is not mandatory and by default the sound is set on “No option chosen”. If you decide to select a sound, it is executed right after sending the HTTP request, while the server waits for OpenAI answer. The playback is executed to the end, without being interrupted in case OpenAI's response was already ready before the completion of the audio.
In the Cally Square context, the user can configure the project, by using one of the ASR blocks to understand the conversation, then the ChatGPT block to generate the response, and one of the TTS blocks to play the response.
Requirements for the sample project:
Set up a AWS Cloud Provider with a valid API key
Set up an OpenAI Cloud Provider with a valid API key
Check if available or set these variables in Tools:
OPENAI_WHISPER_TRANSCRIPT to send to OpenAI the text of what the user said to search for the answer
OPENAI_CHATGPT_RESULT to get the text response from OpenAI, managed by TTS block
Example
In AWS Polly block set the Access Key ID and Secret Access Key. Then define the welcome message and the voiceover
Then you configure the OpenAI Whisper ASR block
On OpenAI ChatGPT block retrieve your OpenAI Bot configured in Tools section and in text section set the Variable {OPENAI_WHISPER_TRANSCRIPT}
in GoToif block, set the condition '{OPENAI_CHATGPT_EXIT}' == 'true'. So the system can understand if the conversation with the bot has to continue (false condition) or it it has to end (true condition)
If the condition is true, the call pass to the queue
If the condition is false in TTS ASW Polly block set the variable {OPENAI_CHATGPT_RESULT} to get the text response from OpenAI.
The text result is saved in database insquare_messages
table
Dialogflow V2
This box allows you to build a voicebot using the Google Dialogflow integration. Discover here How to create a Dialogflow project
Label: here you can type a brief description
Project ID: Cloud Platform project ID
Client Email: email address associated to Service Account Key
Private Key: private key associated to Service Account Key
Language: the language you want use for the bot
Text: the text you want to send
Please note Dialogflow requires a valid Service Account Key and a sufficient amount of acquired credits. Explore this documentation to find out How to retrieve Google Key for Cally Square blocks
Exit Arrows
This box provides just one arrow out to the next step
TIP
Click here to learn more about voice bot triggers useful to enable conversation transcript view
Example - Scenario healthcare
Call comes in
A playback starts e.g. with the welcome message "Welcome, how can I help you?"
The customer says his sentence for example:
"I would like to know the clinic's opening hours", or
"I would like to speak with an operator" or
"I would like to know the date of my reservation that I cannot remember"
AWS ASR turns the voice into text and sends it to DialogflowV2 which understands customer's intent
the call passes to switch option
if the request is for clinic hours, a playback will say them
if the request is to speak to an operator, a playback will say "please hold, we are transferring your call" and the interaction will pass to a queue
if the request is for a reservation time, a playback will say "Please hold for a moment, I search for the required information" and the info goes to the Database, which retrieves the data and the AWS Polly will say "the date of your reservation is Saturday, March 9 at 11 a.m."
finally there is the Hangup of the interaction
Amazon Lex
This box allows you to build a voice bot using the Amazon Lex integration.
For additional information see https://docs.aws.amazon.com/en_us/lex/latest/dg/getting-started.html
Label: here you can type a brief description
Access Key ID and Secret Access Key: AWS security credentials
(see http://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html )Region: AWS available regional endpoint (explore the official Amazon Lex documentation to discover supported regions → Supported AWS Lex Regions)
Bot name: the bot name. Required: Yes
Text: the text you want to send. Required: Yes
The Amazon Lex block saves the results in the following variables:
AWS_LEX_INTENTNAME: The current user intent that Amazon Lex is aware of. (Read more)
AWS_LEX_MESSAGE: The message to convey to the user.
AWS_LEX_MESSAGEFORMAT: The format of the response message. (Read more)
AWS_LEX_DIALOGSTATE: Identifies the current state of the user interaction. (Read more)
AWS_LEX_SLOTTOELICIT: If the AWS_LEX_DIALOGSTATE value is ElicitSlot, returns the name of the slot for which Amazon Lex is eliciting a value.
AWS_LEX_SLOT_*: The intent slots that Amazon Lex detected from the user input in the conversation. (ex. AWS_LEX_SLOT_PICKUPCITY)
TIP
Click here to learn more about voice bot triggers useful for enabling conversation transcript view
DeepSeek
from version 3.51.0
This block will allow Deepseek Chat, to use the bot configured with DeepSeek account.
Requirements:
Set up an DeepSeek Cloud Provider with a valid API key
Configure a DeepSeek bot in Tools → OpenAI Bots
In this case in the block, you have to specify:
Label: here you can type a brief description
Choose a DeepSeek bot: select the created bot from the list (mandatory field)
Text: you want to send (e.g. the variable {GOOGLE_ASR_TRANSCRIPT} or {OPENAI_WHISPER_TRANSCRIPT})
Sound to play while waiting: a playback sound, previously uploaded in Tools/Sound section, executed for the customer while waiting for a response from DeepSeek, such as, “We are analyzing your request, we will get back to you shortly” , thus improving the user experience and avoiding audio gaps.
This option is not mandatory and by default the sound is set on “No option chosen”. If you decide to select a sound, it is executed right after sending the HTTP request, while the server waits for DeepSeek answer. The playback is executed to the end, without being interrupted in case DeepSeek's response was already ready before the completion of the audio.
The bot will then populate the variable DEEPSEEK_CHAT_EXIT
to 1 if the chat has to exit and DEEPSEEK_CHAT_RESULT
with the text generated by the bot.
So you can configure the TTS block in this way: