Caching when updating Bots they dont Update?
# support
a
Watch my video. I have noticed that when i update prompts and then call them back, its like they dont change and things are cached. Do i need to log out and back in often or use incognito browser when making changes. Here is a video of me showing that the system is even caching when using the new AI prompt tool. I think its all the same issue. https://www.awesomescreenshot.com/video/37603728?key=934ca6abf98d3de83a08e5a4a0e3ce4d
v
Hi there! Yes, caching issues when updating prompts in Vapi are a known problem that several users have experienced. 🔍 Based on what I've found in our documentation, clearing your browser cache can definitely help with this issue. So your instinct about logging out/in or using incognito mode is on the right track! Here are some recommended steps to ensure your prompt updates are applied without caching issues: 1. Clear your browser cache and cookies - This can help remove stored data that might be preventing your changes from reflecting correctly [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333836884685754480) 2. Verify your API request format - When updating AI prompts via API, make sure you're using the correct endpoint and HTTP method (usually PATCH or PUT) [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1328923059905630238) 3. Check for console errors - If possible, use your browser console to check for any errors when accessing the Vapi Assistant [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333836884685754480) 4. Be careful with PATCH requests - Users have reported issues where nested properties get overwritten. Make sure to include both updated and previous properties in your requests [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333880245681393752) I've also found that some users have reported the assistant "remembering" previous sessions, suggesting that caching behavior might be affecting your experience [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342338583721414677). Let me know if these steps help resolve your issue! 👍 Sources: - [Discord Thread about Caching Issues](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333836884685754480)
Hi there! 👋 I understand your frustration with prompt updates not reflecting immediately due to caching issues. While Vapi doesn't officially implement traditional caching, users do experience caching-like effects due to how the AI retains context from previous conversations. This can make it seem like your prompt updates aren't being applied. Here are some recommended methods to ensure your prompt updates are applied immediately: 1. Use the Add Message API to dynamically update prompts during a conversation:
Copy code
javascript
const message = {
  type: 'add-message',
  message: {
    role: 'system',
    content: 'Your updated prompt here',
  },
  triggerResponseEnabled: false
};
Setting
triggerResponseEnabled: false
allows updates without generating additional responses [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1343457322072145950). 2. Implement variable substitution within your system prompts:
Copy code
javascript
const assistant = {
  model: {
    messages: [
      {
        role: 'system',
        content: 'Your prompt with {{variable}}'
      }
    ]
  }
};
This allows for seamless updates during interactions [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1343457322072145950). 3. Ensure correct API usage by verifying that fields like
first_message
and
system_prompt
are present in your API requests [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1328923059905630238). While there aren't specific settings to disable caching, these approaches should help mitigate the issues you're experiencing. Regarding logging out or using incognito mode - I couldn't find specific information about this in the documentation, but these approaches might help reset client-side caching in your browser. Sources:
v
Message marked as helpful by @amurgio! 🎉