Overwrote agent script when changing provider
# support
j
I've changed the Provider type from OpenAI to Vapi and it deleted the entire agent I had built. I've spent a lot of time on the script, tool calls, etc. It is currently unpublished and I have the published version as the one I want to restore it as. How can I get it back?
v
Hello jumpie, you can make a get request to the assistant and then copy what you want to save, or, make a post request to the create assistant endpoint to create a new assistant with that setup:
j
I need the system prompt that was put in for it. Is there any way to retrieve it?
The get request for it doesn't seem to be retrieving the system prompt
v
Hello Jumpie, if you hit that endpoint you can find it under the "model" object. It's the key value pair for "content"
j
It's only showing up with the latest, overwritten version. We're looking to get the value of the published version of the script from before as it was overwritten & deleted by changing the model we wanted to use.
v
Hey, can you share the assistant ID? I can try to pull the assistant prompt for you. Just letting you know that when you switch to VAPI model for workflows, we do show you a confirmation popup which says that your prompt will be overwritten. Make sure to back up or create a backup for your assistant prompt before switching to VAPI model from now on.
j
Assistant ID:
1bb1758b-f2ef-492d-bfb4-d74a44cbd7f4
, thanks. Also, when assigning the workflow to an agent from the Create Workflow flow it does not show (or at least did not show when I did it) the confirmation modal that the prompt will be overwritten. I didn't change it from inside the agent view. Just assigned it to an agent from the workflow side and it overwrote it without confirmation.
v
I will send you your assistant config or check your DM.