nat / openplayground

An LLM playground you can run on your laptop
MIT License
6.22k stars 483 forks source link

Add chat tab #75

Open csaroff opened 1 year ago

csaroff commented 1 year ago
image

I've been wanting to see a chat interface in nat.dev for a while and decided to try to push this over the line. Big thanks to @max for the excellent scaffolding.

This adds a chat tab to open-playground integrated with AI completions. It also integrates with the history sidebar so that you can refer back to old conversations.

I'm not a frontend expert so the css might be a bit rough around the edges. I also didn't fully flush out the typescript typings that max had started. I figured a minimally working chat tab was better than none, but let me know if there's anything you'd like to see added/changed as a part of this PR.

In the future it might be cool to add:

  1. A "new chat" button in the history sidebar(for now, just refresh the page).
  2. A button to show/hide the chat history.
  3. The ability to edit a previous message and rerun the completion on an old prompt.
  4. Logos/Avatars for the AI models and the user.
  5. Syntax Highlighting for markdown rendered code.
  6. Threads to allow multiple models to answer the same question.
  7. Some type of recursive summarization in case the conversation goes on past the context window.
csaroff commented 1 year ago

@max would love your feedback and blessing if you get a chance to take a look

AlexanderLourenco commented 1 year ago

@csaroff Would you mind coming on Discord?