using end call function when creating assistant vi...
# support
j
When I used the dashboard, there was a enable end call function button that lets the assistant stop the call by its own. Right now, I'm creating the assistant object from vscode and creating it there, and I can't find the fied for enabling the end call function. I can only find the endCallMessage, but that's the message that the assistant will say IF it ends the call. For example, in the code below, how do i enable the end call function? export const assistant: CreateAssistantDTO | any = { name: 'Paula-broadway', model: { provider: 'openai', model: 'gpt-3.5-turbo', temperature: 0.7, systemPrompt:
You're Paula, an AI assistant who can help the user decide what do he/she wants to watch on Broadway. User can ask you to suggest shows and book tickets. You can get the list of available shows from broadway and show them to the user, and then you can help user decide which ones to choose and which broadway theatre they can visit. After this confirm the details and book the tickets.
, }, voice: { provider: '11labs', voiceId: 'paula', }, firstMessage: "Hi. I'm Paula, Welcome to Broadway Shows! How are u feeling today?", serverUrl: process.env.NEXT_PUBLIC_SERVER_URL ? process.env.NEXT_PUBLIC_SERVER_URL : 'https://08ae-202-43-120-244.ngrok-free.app/api/webhook', };
v
You can continue this conversation by mentioning me in the message.
@John To enable the end call function for your assistant, you typically need to set a specific property in your assistant configuration that allows the assistant to autonomously decide when to end the call. However, based on the code snippet you've provided, it seems like the
CreateAssistantDTO
object does not explicitly include a field for enabling the end call function. In many systems, such functionality is either enabled by default or controlled by a separate setting in the environment where the assistant is deployed, rather than being specified directly in the code. If the documentation or the interface you're working with does not provide clear instructions on how to enable the end call function, it's possible that this feature needs to be enabled through the dashboard you mentioned or by setting an environment variable or a flag in the deployment configuration. Since I don't have access to the specific documentation or system you're using, I recommend checking the documentation for the Voice API or reaching out to the support team for guidance on how to enable the end call function when creating the assistant object from your development environment. If there's a specific command or function within the VAPI system to enable this feature, please provide me with that information, and I'll be happy to assist you further. Otherwise, for more detailed instructions on enabling the end call function, please ask support for more info on this.
Got it. Tagging @User for additional help.
j
include:
Copy code
"endCallFunctionEnabled": true,
"endCallPhrases": [
                "goodbye",
                "Thanks bye"
            ]
"serverMessages": [
                "end-of-call-report",
                "hang",
                "tool-calls"
            ]
Make sure to add in your prompt something like "When the conversation is finished say "goodbye"
note gpt3.5 turbo is not that great for this
s
1. check this prompting guide https://docs.vapi.ai/prompting-guide 2. add the following to call end call function
use the endCall function
5 Views