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

Sandersaarond/tweaks #29

Closed
wants to merge 4 commits into from
Closed

Sandersaarond/tweaks #29

wants to merge 4 commits into from

Conversation

SandersAaronD
Copy link
Contributor

Contains breaking changes so definitely leaving it as a draft until we figure out versioning, but also, it isn't done. Biggest breaking change is switching the front-end API utils to take a 'messages' array instead of 'system prompt' and 'user prompt'. This allows statefulness, preserving history, etc for actual chat use. In principle putting all the history into the system prompt (or the user prompt!) might work, but OAI probably 'expects' responses to use the messages array as recommended.

If needed we can give those different function names since the signature has changed, but probably marking it as a breaking change should be fine. Broadly, putting into this PR stuff that seems needed for functionality in flight and/or that people already seem to be making odd, hacky, or duplicative workarounds for on the frontend.

TODO:

  • Add temperature option
  • React hook for easily detecting end of messages (going to steal it mostly from llm-examples-app)
  • Hook for stateful chat which handles logic for just adding one new user message at a time.

Copy link
Collaborator

@csmarchbanks csmarchbanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we actually use these anymore or should we clean them up in favor of what is in https://github.com/grafana/grafana-experimental?

@sd2k
Copy link
Contributor

sd2k commented Sep 6, 2023

Hmm yeah these aren't meant to be used any more, they've been superseded by the APIs in grafana-experimental, so we should remove them. Whoops. Sorry about that!

@SandersAaronD it'd be great to see the hook in the grafana-experimental package though if you can contribute it there?

@SandersAaronD
Copy link
Contributor Author

I'll bump work over to @grafana/experimental

@SandersAaronD SandersAaronD deleted the sandersaarond/tweaks branch September 25, 2023 15:38
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.

3 participants