call control
# support
a
Are there performance benefits to using an assistant configured in the VAPI dashboard compared to configuring it on the fly in the assistant field of the response on ServerMessageAssistantRequest?
v
@Alex Absolutely! Configuring an assistant in the VAPI dashboard allows for performance optimizations that are not possible when configuring on the fly. When you set up an assistant in the dashboard, the configuration is saved and can be reused across multiple interactions, which reduces the overhead of setting up the assistant for each request. This can lead to faster response times and a more efficient use of resources. Additionally, by pre-configuring the assistant, you can take advantage of VAPI's infrastructure to ensure that the assistant's model is optimized for the tasks it needs to perform. This can result in better performance, especially for complex tasks or when handling a high volume of requests. If you need any assistance with setting up your assistant or have further questions, feel free to ask!
You can continue this conversation by mentioning me in the message.
a
@Vapi Thank you! Let me provide some details to ensure our case is covered. In our flow, we call the assistant. The phone number does not have preselected assistant, this way we receive the ServerMessageAssistantRequest and can provide custom variables, we also return the assistant ID. Would there be a performance loss on the VAPI side if we return a custom assistant in the "assistant" field instead of the assistant ID? This may occur if VAPI has caching or optimization for static assistants.
v
@Alex Using a custom assistant configuration on the fly for each ServerMessageAssistantRequest, as opposed to using a preselected assistant ID, could potentially introduce some performance overhead. This is because each new configuration would need to be interpreted and loaded at runtime, which might take longer than accessing a pre-configured assistant that is already optimized and possibly cached by VAPI's infrastructure. VAPI is designed to be efficient with pre-configured assistants, as these configurations can be optimized ahead of time. When you use a static assistant ID, VAPI can leverage caching mechanisms to quickly load the assistant's settings, which can result in faster response times and lower latency. However, if your use case requires dynamic configuration to provide custom variables and behavior, the flexibility might outweigh the performance cost. It's important to balance the need for dynamic responses with the potential performance impact. If you are experiencing noticeable delays or have specific performance requirements, it might be worth exploring if there are ways to optimize your dynamic configurations or if some parts of the assistant's behavior can be standardized and pre-configured. For more detailed information on performance implications or optimization strategies, please ask support for more info on this.
s
@Alex there is no difference b/w either method of creating the asisstant because underneath the source of truths is APIs only.
Do let me know if you have more questions.