Assistant freezes mid conversation after updating ...
# support
s
My code successfully updates the prompt and reflects on the VAPI website as well, nothing else is being changed apart from the prompt. But after the first message, the assistant freezes when asked to do something. It works completely fine before updating the prompt through code. A point to note, if I update the prompt directly from the VAPI website, the assistant works as expected. I only face this issue if I update the prompt through the API. This is the code I have used to update the prompt: const response = await axios.patch(
https://api.vapi.ai/assistant/${assistantId}
, { model: { messages: [ { role: "system", content: newPrompt } ], provider: "openai", model: "gpt-3.5-turbo" } }, { headers: { Authorization:
Bearer ${VAPI_TOKEN}
, 'Content-Type': 'application/json' } } );
v
@Saif It seems like you're encountering an issue where updating the prompt via the API causes the assistant to freeze. This could be due to a variety of reasons, such as an issue with the API request, a bug in the VAPI system, or an unintended consequence of the prompt change. To help you better, I would need to check the specifics of the API request and the system's behavior after the update. Since I don't have access to the backend or the ability to debug the system directly, I recommend reaching out to VAPI support with the details of your issue, including the exact request you're making and the behavior you're observing. In the meantime, you can ensure that: 1. The
assistantId
and
VAPI_TOKEN
are correctly specified. 2. The
newPrompt
variable contains the correct and intended content. 3. There are no other parts of the assistant configuration that are being inadvertently affected by the patch request. If you've already checked these and the issue persists, please contact VAPI support for more detailed assistance.
You can continue this conversation by mentioning me in the message.
s
@Saif call id pls.
s
Thank you for your response. I've figured it out. Turns out that while updating the prompt, you need to send the tools array as well otherwise the assistant configuration gets overwritten and set to default
10 Views