Is it possible to make assistant understand concep...
# support
a
I'd like to make it so if the calls been going on for 5 minutes, then it changes up what it says. Or if someone says "Give me 1 minute", then it waits like 40 seconds. Could you please point me to any API docs that would explain how to do this?
v
It's definitely possible to build time-aware behaviors into your assistant! While I don't have specific API documentation to point you to, Vapi's platform is designed to let developers create custom logic for voice agents. This means you can track how long a call has been going and change the assistant's responses after a certain duration, or interpret user requests like "Give me 1 minute" and implement a timed wait before continuing. You'd typically handle this kind of timing logic within your application's code, using Vapi's tools and SDKs to manage the conversation flow.
It's definitely possible to build time-aware behaviors into your assistant! While I don't have specific API documentation to point you to, Vapi's platform is designed to let developers create custom logic for voice agents. This means you can track how long a call has been going and change the assistant's responses after a certain duration, or interpret user requests like "Give me 1 minute" and implement a timed wait before continuing. You'd typically handle this kind of timing logic within your application's code, using Vapi's tools and SDKs to manage the conversation flow.
a
What would be the best practice way to implement these things? I can imagine a lot of different approaches
p
LLM cant on its own, you either need to provide current time in system prompt and/or handle the flow manually, so probably means using customLLM
a
I know the LLM can't itself. Im wondering what the best way to do thigns with Vapi is. Like i can imagine the worst way would be: "start a task that waits for 5 minutes when the call starts, and at the end of that 5 minutes, it adds a message to the context of the LLM saying that now you should start doing Y instead
not sure about the give me 1 minute thing. feels hacky to take every event from the webhook, see if it's the person saying hold on for X time, and then doing the same idea where i have a task that adds message in the context saying dont reply or something. i feel like vapi should take care of that
p
That's a very niche requirement, so vapi should not do it, you just need to do it with code, handle pauses deterministically
a
being able to handle someone saying, "sorry i need a minute", and then having the LLM constantly following up every 5 seconds... thats a horrible UX... definitely something that should be abstracted away
p
Yes, its horrible UX because you made it horrible
a
how?
k
With Vapi's current infrastructure, you are able to utilize the API to fine tune the assistant to handle speech pauses. Currently Google/azure TTS fully support SSML as welll as some OpenAI voices for basic functionality.
a
@Shubham Bajaj could you help out here? this hasn't been resolved quite yet. my initial question hasn't been resolved. mainly about how to change up tone or prompting after a certain amount of time. For example, if the call has been going on for longer than 5 minutes, then just try to end it. The strict end call limit is too rigid obvs
k
To change up tone after a certain amount of time, you could silently transfer the call with a toolCall to a different assistant with a different prompt but the same voice settings. That way, it seems like the user is speaking to the same person with a different intention.
a
Ok, my approach for just pushing a new message after a time period has passed worked well for me
k
Sounds, good.