16 Commits

Author SHA1 Message Date
9c15662cf6 Alerting: Add AI buttons in some alerting workflows (#107754)
* Add alerting ai buttons for cloud

* add tracking for ai buttons usage

* Empty commit to trigger GitHub Actions

* add FrontendOnly in ff

* update analytics folder

* prettier

* revert ff being frontend only

* review comments

* address some review comments

* refactor

* revert change and remove comment

* prettier

* update betterer

* remove unused property

* prettier

* address review comments

* prettier

* update test

* fix linter errors

* add translations

* prettier

* update workspace

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2025-07-16 18:42:42 +02:00
8988274912 Dashboards: update @grafana/llm to v0.13.2 and update usage (#101814)
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.
2025-03-12 10:53:20 +02:00
7c15d33304 Remove @grafana/experimental in the last various places (#99875)
* Remove @grafana/experimental in the last various places

* Remove experimental from yarn.lock

* Fix import order
2025-01-31 15:43:58 +02:00
d8b6a5bde2 DashGPT: Fixes issue with generation on Safari (#90337)
* DashGPT: Fixes issue with generation on Safari

* Fix infinite loop issue + more refactoring

* Solve linter

---------

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2024-09-04 18:56:20 +03:00
112c0e7a79 Dashboards: Auto-generate get stuck and quick feedback actions doesn't respond (#83879)
* 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>
2024-03-05 12:10:46 +01:00
572c182a81 Unify frontend monitoring (#80075)
* Unify frontend monitoring

* Add missing mock

* Add missing mock

* Keep source:sandbox

* Create separate logger for plugins/sql package

* chore: rename "logAlertingError" to "logError"

* Use internal Faro logging for debugging instead of redundant browser logging

* Post-merge fix

* Add more docs about debug levels

* Unify logger names

* Update packages/grafana-runtime/src/utils/logging.ts

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

* Update packages/grafana-runtime/src/utils/logging.ts

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2024-02-01 15:08:40 +01:00
f32f8a160e SaveDashboard: Reduce time to open drawer when many changes applied (#78283) 2023-11-17 10:02:53 +01:00
fcbc3fb879 Dashboard: Add ability to stop title/description generation (#77896) 2023-11-09 09:06:14 -06:00
8683323760 Auto-generate: Change dashboard save diff prompt, widen diff context (#76724)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2023-10-28 08:10:47 +03:00
eb62e02259 chore: use grafana/experimental for dashboard AI feature (#76948)
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>
2023-10-25 16:38:55 +01:00
2a2401e673 useOpenAIStream: Improve error handling (#76212)
* Simplify error message

* Add timeout

* Unsubscribe when unmount

---------

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2023-10-10 17:23:08 +03:00
6614eb0a6e Auto-generate: Be able to improve the result sending feedback (#75204)
* 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>
2023-10-05 16:25:35 +03:00
c88d5d7b40 Auto-generate: Hide the button when LLM plugin is not enabled (#75878)
* Auto-generate: Hide the button when LLM plugin is not enabled

* Performance: Reduce time to receive the first character of OpenAI
2023-10-03 23:36:45 +02:00
72c413025d Auto-generate: Error handling and monitoring (#75468)
* 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
2023-10-02 16:04:12 +02:00
9e78907233 OpenAI: Avoid two streams to overlap when doing multiple requests (#75504)
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2023-09-28 17:42:56 +03:00
e4e19f6ca2 DashGPT: Simplify auto-generate state management as a hook (#75236)
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2023-09-27 16:47:06 +02:00