Dynaimc Buttons Function
Guide:
This will not only give some ideas to the user, but also motivate the user to continue on the conversation for more engagement.
Input Variables
Language - The language the buttons should be in (i.e "Italian" or "English")
Max Tokens - The maximum amount of tokens you want the LLM to use in the response (i.e 1000)
License - Your FlowBridge custom functions license found on the Custom Function page on your FlowBridge environment
Ai Response - This is the last response the AI gave (Generally voiceflow uses the {last_response} variable for this). If you are using our Custom Function for querying DeepInfra, you would want this to be the variable you created as output for that step.
User Query - This would generally be the {last_utterance} variable
Model - The model you want to use from DeepInfra
Api Key - Your API key found on the DeepInfra dashboard (See steps below for more info)
System Prompt - The system prompt you want to use for the LLM (i.e "You are a customer support agent trying to help the user")
Output Variables
Question 1 - A potential question for one of the buttons suggesting the user's reply
Question 2 - A potential question for one of the buttons suggesting the user's reply
Question 3 - A potential question for one of the buttons suggesting the user's reply
Step-by-step guide
Navigate to the FlowBridge admin panel
Click "Custom Functions"

Click "Download"

Go to your Voiceflow Project
Click "Functions"

Click here to import the function

Click "Browse"

Click "Browse"

Click "Import"

Click "Workflows"

Double-click on your workflow.

Click here and drag the line somewhere else.

Click "Capture"

Click here.

Click "Response AI"

Click here.

Type "Answer the question of the user below and make sure to ask a follow up question. [[enterenter]] Question: {las"
Click "last_utterance"

Click here and drag the line somwhere.

Click "Function"

Click "Select existing function"

Click "Dynamic Buttons Deepinfra Ouput Variables"

Click here.

Type "English" or any other language you want the buttons in
Click here.

Type "1000" or another number you want to use as the maximum amount of tokens used
Click here.

Go to the FlowBridge custom functions page, and copy your license key
Paste the license key in here

Click here.

Type "{la"
Click "last_response" to get the last response the AI made in your flow.
Make sure you had a Response AI step prior to the function, otherwise the last_reponse variable will not be populated with data.
If you are using the FlowBirdge DeepInfra function for querying the LLM, make sure you set this to the variable used for the output of that function

Click here.

Type "{las"
Click "last_utterance"

Click here.

Go thehttps://deepinfra.com
Click "Models"

Click this icon to copy the LLM name.

Paste the LLM name here

Click "Dashboard"

Click "API Keys"

Click "New API key"

Click the "API Key name" field.

Type "FlowBridge Dynamic Buttons" or the label you want to give this API key
Click "Generate API key"

Click this image.

Paste the api key from DeepInfra here

Click here.

Type the system prompt you want to use like "You are a customer support agent trying to help the user"
Click here.

Type "{"
Click "Create variable"

Type "button1"
Click "Create variable"

Click here.

Type "{"
Click "Create variable"

Type "button2"
Click "Create variable"

Click here.

Type "{b"
Click here.

Type "utton3"
Click "Create variable"

Click here and drag a line somewhere

Click "Buttons"

Click here.

Type "{but"
Click "button1"

Click "Add Button"

Type "{bu"
Click "button2"

Click "Add Button"

Type "{b"
Click "button3"

Click "No match"

Click here.

Click here.

Drag the line from Button1 directly to the Response AI step you want the button to go to (Not on the block, but the response step itself)

Drag the line from Button2 directly to the Response AI step you want the button to go to (Not on the block, but the response step itself)

Drag the line from Button3 directly to the Response AI step you want the button to go to (Not on the block, but the response step itself)

Drag the line from No Match directly to the Response AI step you want the button to go to (Not on the block, but the response step itself)
This will allow the user to type a message rather than forcing them to click a button.

Last updated