Open jtpio opened 3 weeks ago
We'll probably have to handle it a bit differently for other providers than MistralAI.
I looked a bit into openAi and Groq providers, for example, and it seems that the options (apiKey
, ...) are not updated after the initialization. We probably need to create a new instance every time a setting change.
In the long run we may want a dedicated settings panel that is validated on purpose, and not on every change.
For MistalAI, the API "client" is instantiated for each request, that's why the updated options are taken into account.
As a follow-up to https://github.com/jupyterlite/jupyterlab-codestral/pull/10 and to validate the approach, it would be interesting to add support for another provider, for example OpenAI.