This version of the package deprecates the `openai` object in
favour of the vendor-agnostic `llm` object, so this PR also
updates the usage of the package to use the new object and
take advantage of the vendor-agnostic APIs.
* Update the component only when the response is fully generated
* Fix quick feedback action doesn't respond
* Fix history not displaying after the second click
* Fix the history that moves when regenerating
---------
Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
The 'llms' module of @grafana/experimental was vendored into the
GenAI components at some point in the past to speed up iteration, so
that dashboard feature development didn't have to wait for a new
release of the experimental package for every change. Now that we
think this has stabilized, we can remove the vendored module from
the Grafana codebase and use the version from @grafana/experimental
instead.
This requires a couple of minor changes, mostly around health check
results which are slightly different in @grafana/experimental now,
but otherwise the changes are mechanical.
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
* After the first auto-generate, the button changes to improve
* When clicking "improve" a toggletip appears with different ways to interact with the model to refine the result
* Analytics: Add analytics to history
---------
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
* Error handling for the hook to expose `error` as part of the state
* Monitor errors at the hook level to catch common OpenAI issues
* Allow retry when the request fails
* Optimize onGenerate number of calls
* Re-enable component tests