Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: migrate to @grafana/llm package for OpenAI functionality #1052

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sd2k
Copy link

@sd2k sd2k commented Oct 14, 2024

The @grafana/experimental package is being deprecated so development
of LLM-related functionality has been moved to a separate package.

The API is exactly the same so this should just work.

Fixes #1051.

@sd2k sd2k requested a review from a team as a code owner October 14, 2024 09:13
Copy link

github-actions bot commented Oct 14, 2024

Use the following command to run this PR with Docker at http://localhost:3000:

docker run --rm -p 3000:3000 grafana/plugin-builds:d2d6b9994687c7197d92f84f422d7eba5873d23apre

@adamyeats adamyeats force-pushed the use-grafana-llm-for-openai branch from 2ef0d07 to 8e51cb8 Compare October 31, 2024 13:25
@CLAassistant
Copy link

CLAassistant commented Oct 31, 2024

CLA assistant check
All committers have signed the CLA.

The @grafana/experimental package is being deprecated so development
of LLM-related functionality has been moved to a separate package.

The API is exactly the same so this _should_ just work.

I've had to fix the resolution of some Grafana packages which were
otherwise being duplicated because the @grafana/llm package has quite
a loose dependency range; without this, we had both version 10.4.1 and
11.3.0 of the various Grafana packages (and all of their
subdependencies) which was causing tests to fail.

Fixes #1051.
@sd2k sd2k force-pushed the use-grafana-llm-for-openai branch from 8e51cb8 to d9427ac Compare November 5, 2024 08:34
@sd2k
Copy link
Author

sd2k commented Nov 5, 2024

I've had to fix the resolution of some Grafana packages which were otherwise being duplicated because the @grafana/llm package has quite a loose dependency range; without this, we had both version 10.4.1 and 11.3.0 of the various Grafana packages (and all of their subdependencies) which was causing tests to fail.

@aangelisc
Copy link
Contributor

@sd2k, I'm not overly keen on adding in the resolutions. Can the dependencies for the LLM package be made stricter? Alternatively, we can look at updating the grafana/* dependencies in this package to 11+

@sd2k
Copy link
Author

sd2k commented Nov 5, 2024

Yeah I'm not really keen on it either, I was surprised that the relaxed restrictions caused the resolver to choose two separate versions rather than preferring a common version 😕

Upgrading to 11+ would probably do the trick and feels like the right call, especially given those packages are injected by Grafana anyway.

I think this is fine now that the correct versions are in the yarn.lock...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uncaught TypeError: self.crypto.randomUUID is not a function when trying to generate a query using openAI
3 participants