Closed
Description
Behavior
The application throws an error when the generative AI model is switched. For example, if I am presently using Gemini to power my Webview and I decide to switch to Groq instead. The application throws an error because by design, these LLMS are operating on 2 different web views with different WebViewId
NB: This only happens for ChatManager. For Actions, this seems to work perfectly
Expected Behavior
Should handle this error gracefully and not throw an error to the user.
Possible solutions
- The application should be aware of the change in web view Id and retry by resending the prompt to the LLM when it detects this error, instead of throwing an error
- Get the chatHistory and clear it, update the current GenAI and APIkeys