AI duration management
# support
a
Hello. I have a question about VAPI that I haven't been able to find an answer to: Here's the scenario: - We've been using VAPI for recruitment, primarily to conduct interviews. - Interviews are typically 10 minutes long, but they can run longer if candidates are chatterboxes and give lengthy answers—sometimes lasting twice as long. - We're using the maxDurationSeconds parameter, but it ends the call abruptly without warning. - We think it would be helpful to implement a way to give feedback to the assistant about the call duration real-time and have it adjust accordingly. - For instance, if we could add to the prompt that when the call reaches 10 minutes and the candidate hasn't answered 70% of the questions, the assistant would encourage the candidate to give briefer answers. Have you encountered a similar challenge? Is there a way we can implement something like this?
v
@adrian_gomez Hello! It sounds like you're looking for a way to manage the interview duration more dynamically during your VAPI-powered calls. While VAPI itself doesn't have a built-in feature for real-time duration feedback and adjustment, you can certainly implement a custom solution to achieve this. Here's a high-level approach you could take: 1. **Monitor Call Duration**: Use a timer or a clock within your application to keep track of the call duration. 2. **Check Progress**: Periodically check the progress of the interview against the number of questions answered. 3. **Provide Feedback**: If the call reaches the 10-minute mark and less than 70% of the questions have been answered, use the
say
method to gently remind the candidate to provide briefer answers. For example, you could set up a periodic check in your application that triggers every minute. When it detects that 10 minutes have passed, it could execute something like this:
Copy code
javascript
if (percentageOfQuestionsAnswered < 70) {
    vapi.say("Just a heads up, we're at the 10-minute mark. Let's try to keep the answers a bit more concise to cover all the questions. Thank you!");
}
This is a simplified example, and you would need to integrate it with your existing application logic that tracks the interview progress. Would you like to proceed with implementing this kind of feature, or do you need further assistance with another aspect of VAPI?
You can continue this conversation by mentioning me in the message.
s
you can try hacking around squads/assistant using live call update and model logic. set max duration to 30mins and if call duration goes beyond 10mins inform the candidate they have x minutes left and later can take the action as required.
2 Views