Overriding request-response-delayed
# support
m
I'm getting a lot of "just a sec" and "one moment" responses from vapi assistant. Any way to override the "request-response-delayed" via the "assistantOverrides" ? Or I need to create a new assistant via JSON. Also having issues, where the vapi is calling the tool multiple times, even when the initial request is a success. https://cdn.discordapp.com/attachments/1273838459454492683/1273838459684913303/image.png?ex=66c01203&is=66bec083&hm=ad79cfb17e001a1a29a7eab9811b7283ae303153dba71bb4ad5808419cb152eb&
v
@Mishal It sounds like you're experiencing a couple of issues with the VAPI assistant's response times and repeated tool invocations. Let's address each concern: 1. To reduce the frequency of "just a sec" and "one moment" responses, you can indeed use the "assistantOverrides" feature to adjust the assistant's behavior. This might involve tweaking the response settings or the logic that determines when these messages are used. If you provide me with more details on how you'd like the assistant to behave, I can guide you through the process of setting up the overrides. 2. If the VAPI is calling a tool multiple times despite a successful initial request, this could be due to a misconfiguration in the assistant's logic or a bug. To resolve this, we would need to review the assistant's configuration and the conditions under which it calls the tools. If you can share more specifics about when this issue occurs or the context in which the tool is being called, I can provide more targeted assistance. If you're looking to create a new assistant via JSON, that's certainly an option, but it might be more efficient to adjust the existing assistant's configuration if possible. Please let me know how you'd like to proceed, and I'll be happy to help you further.
You can continue this conversation by mentioning me in the message.
m
@Vapi , OK how can I adjust the existing assistant ? I have tried this previously
Copy code
const assistantOverrides =  {
    "type": "function",
    "messages": [
 {
            "type": "request-response-delayed",
            "content": "It appears there is some delay in communication with the weather API.",
            "timingMilliseconds": 2000
        }
    ],
}

vapi.start("79f3XXXX-XXXX-XXXX-XXXX-XXXXXXXXce48", assistantOverrides);
v
@Mishal It seems like you're on the right track with using
assistantOverrides
to adjust the behavior of your existing assistant. However, the structure of the
assistantOverrides
object you've provided doesn't quite match what's typically expected for overriding assistant behavior. The
assistantOverrides
should be used to modify the assistant's configuration, such as changing the response messages or timing. The object you've provided appears to be structured as a function with a
messages
array, which isn't the standard format for overrides. To adjust the existing assistant, you should modify the assistant's configuration directly. Here's an example of how you might structure the
assistantOverrides
to change the delay message and timing:
Copy code
javascript
const assistantOverrides = {
  messages: {
    requestResponseDelayed: {
      content: "It appears there is some delay in communication with the weather API.",
      timingMilliseconds: 2000
    }
  }
};

vapi.start({
  assistantId: "79f3XXXX-XXXX-XXXX-XXXX-XXXXXXXXce48",
  overrides: assistantOverrides
});
In this example,
messages
is an object where
requestResponseDelayed
is the key for the specific message type you want to override. You then provide the new
content
and
timingMilliseconds
you want to use. Please note that the
vapi.start
function may have specific parameters it accepts, and the
assistantId
and
overrides
should be part of the configuration object you pass to it. If this doesn't resolve your issue, or if the
vapi.start
function requires a different format, please refer to the VAPI documentation or ask support for more info on this.
m
@Vapi using the above method getting this error
Copy code
{
  "message": [
    "assistant.property assistantId should not exist",
    "assistant.property overrides should not exist"
  ],
  "error": "Bad Request",
  "statusCode": 400
}
v
@Mishal I apologize for the confusion. It seems there was a misunderstanding in the structure of the request. The error indicates that the properties
assistantId
and
overrides
should not be directly within the
assistant
object. Let's try a different approach. You should construct the JSON payload as per the VAPI's expected format. Here's an example of how you might structure the payload:
Copy code
json
{
  "assistantId": "79f3XXXX-XXXX-XXXX-XXXX-XXXXXXXXce48",
  "assistantOverride": {
    "messages": {
      "requestResponseDelayed": {
        "content": "It appears there is some delay in communication with the weather API.",
        "timingMilliseconds": 2000
      }
    }
  }
}
You would then send this payload to the VAPI to start the assistant with the overrides. Make sure you are using the correct method to send this payload, as the
vapi.start
function I referenced earlier may not be accurate. If you are using an SDK or API, ensure that you are following the method signature and parameters as per the documentation. If you continue to experience issues, please refer to the VAPI documentation for the correct usage or ask support for more info on this.
m
Copy code
const response = await vapi.start({
        "assistantId": "fda05013-xxx-xxx-9321-db6ffb31c9ea",
        "assistantOverride": {
          "messages": {
            "requestResponseDelayed": {
              "content": "It appears there is some delay in communication with the weather API.",
              "timingMilliseconds": 2000
            }
          }
        }
      });
nope this does not work @Vapi
v
@Mishal I apologize for the confusion earlier. It seems there might be a misunderstanding regarding the structure of the request or the method to apply the overrides. The error message you received indicates that the
assistantId
and
overrides
properties are not expected in the payload you are sending. To resolve this, we need to ensure that we're following the correct protocol for applying overrides to your VAPI assistant. Since the exact method to apply overrides can vary based on the specific implementation of VAPI you're using, I recommend checking the official documentation or reaching out to the support team for guidance on the correct procedure. If the documentation or support indicates a different method for applying overrides, please follow that method. If you're unable to find the necessary information, you can ask support for more info on this. Again, I apologize for any inconvenience, and I'm here to assist you with any further questions you may have.
m
@Vapi OK, any way to resolve this ? Because there is nothing available in the documentation. and Can I get any human support
v
@Mishal I understand the situation can be frustrating when the documentation doesn't provide the answers you need. Since the specific method to apply
assistantOverrides
isn't clear and the provided examples haven't resolved the issue, the best course of action would be to reach out to human support for assistance. You can typically contact human support through the following channels: 1. **Support Email**: Check if there's a support email provided by the VAPI service you can write to. 2. **Support Portal or Help Desk**: Look for a support portal or help desk where you can submit a ticket detailing your issue. 3. **Live Chat**: Some services offer a live chat option on their website for immediate assistance. 4. **Community Forums**: If there's a developer community or forum for VAPI, you might find help from other users who have faced similar issues. 5. **Phone Support**: If available, you can call the support number for direct assistance. Please reach out to them with the details of your issue, including the error messages you've received and what you've tried so far. They should be able to provide you with the correct procedure for applying
assistantOverrides
or help troubleshoot the issue further. If you need any more help or have additional questions, feel free to ask.
m
@Vapi What are all the best practises to resolve the tool being called multiple times. What all things that can be done in it ?
@Vapi you got any answers for my question.
s
Can you share a latest call_id and tell me exact time stamp in audio where you are getting this issue?
Also do need a way to update "request-response-delayed" value from "just a sec" to another audio
s
Sent you a calendly link
we will discuss it over there meanwhile i am closing this ticket
3 Views