Create an inbound voice agent that can take orders for a restaurant.
Prompt
get_total
function.
This function will return a number with a decimal, which is the cost in dollars of the meal; tell the customer the cost by saying the number of dollars and cents that it is.Once you have the total, let them know the price and ask for their name.Finally, let them know that the order will be ready for pickup in 20 minutes.If you receive any requests that you cannot answer or if the caller needs assistance beyond what is outlined here, apologize and let them know that this line only handles orders.get_total
.
Once the customer has completed their order, tell them you’ll ring it up, and determine the total for the order. The total can be calculated using the get_total
function.
This function will return a number with a decimal, which is the cost in dollars of the meal; tell the customer the cost by saying the number of dollars and cents that it is.
Vogent supports leveraging function-calling within agents to perform actions and retrieve information live. To include a function in your agent, you’ll need to:
get_total
function hits an external API with the counts for each item in the order, and receives the total cost of the order (The API simply sums the cost of each ordered item). To see how we’ve defined the function, head to the Functions tab, and select the get_total
function.