Commit Graph

21 Commits

Author SHA1 Message Date
Enrico Ros cfe32aa0a7 Central default for ChatModelId 2023-03-30 01:46:18 -07:00
Enrico Ros 3bcbf029b8 Cleanups
Thanks Harlan @harlanlewis
Input=password: inspired by https://github.com/enricoros/nextjs-chatgpt-app/commit/bc76a753ec4425986e4a1922ca0330ceaa668d22
Usage: https://github.com/enricoros/nextjs-chatgpt-app/commit/aefb2a4a850449f934176e170e7baa58915aa484
2023-03-30 01:39:48 -07:00
Enrico Ros 3532f4f9b6 Copy icons - closes #30
Icons show up when hovering. Tooltips galore.
2023-03-30 00:31:46 -07:00
Enrico Ros baedf00cfd Improve swapping purposes, and rendering 2023-03-29 22:49:08 -07:00
Enrico Ros 2eb4893727 Swappable Purpose, and cleanups 2023-03-29 18:07:31 -07:00
Enrico Ros 82da8e55e3 Double-click to Edit 2023-03-29 17:25:56 -07:00
Enrico Ros 2a11d1854f Cleanup Chat, ChatMessage (vs Message), ChatMessageList (vs Conversation) 2023-03-29 15:26:37 -07:00
Enrico Ros f16e744ef9 Smaller moves 2023-03-24 19:06:36 -07:00
Enrico Ros 2ea2de601a Cleanups 2023-03-24 03:31:43 -07:00
Enrico Ros ecdcdef749 Error message for Context size 2023-03-24 03:10:51 -07:00
Enrico Ros 65b8aab53e Markdown: syntax highlight in code blocks
Implements part of #11, where the markdown is in code blocks of this type:
```SomeName.md
# ...
```
2023-03-24 00:39:33 -07:00
Enrico Ros f2bb334778 Markdown: syntax highlight in code blocks
Implements part of #11, where the markdown is in code blocks of this type:
```markdown
# ...
```
2023-03-24 00:26:45 -07:00
Enrico Ros 2dafafdcf4 Improve running code. Can render basic HTML.
Fixes #19. Now it's showing the HTML in the Sandpack box.
2023-03-23 23:33:52 -07:00
Enrico Ros 49bc3192ec Explain model/system errors to the users
Closes #18 and closes #16. Interesting find: the "code":"model_not_found" shows
that the model is just not authorized for this API key. If the model is really
non-existing and can't be found, the error code will be "null", and the message
will be "The model 'XYZ' does not exist".
2023-03-21 22:52:57 -07:00
Enrico Ros ba8a281d80 Restart the conversation from any point
Also useful to try a few answers before moving forward. Good time saver.
2023-03-20 02:37:12 -07:00
Enrico Ros 2d0136c78f Display the API model (as tooltip)
Behind the scenes, we detect the model name from the OpenAI
streaming API (it's in all the chunks), and stream it back
to the UI as a serialized JSON object. This is more of a
workaround, required by virtue of the streaming API, and can
be cleaned up later.

Model names available when hovering 'gpt-4' / '3.5-turbo'.
2023-03-19 23:08:38 -07:00
Marc Khoury 3d72246d72 Added support for GPT3.5 Turbo model 2023-03-19 14:18:53 -04:00
Enrico Ros 1677db1df8 Error Handling
Show the user if Errors are raised from the OpenAI API, or by
our backend. Good messaging, red coloring.
2023-03-19 05:11:17 -07:00
Enrico Ros 010b1b17cf Run TS/JS/HTML blocks
Warning: this adds 203kb of JS to the app, more than 4x'ing
the size of the app. Will remove if not worth it. Uses Sandpack
from Codesandbox.io, which stands up full execution environments
for the code.
2023-03-19 00:59:30 -07:00
Enrico Ros cd60c6cc27 Highlight Code blocks
Using prismjs, we add coloring of source code blocks, which
translates in 12k of additional code. But the eyes and mind
are so happy.
2023-03-19 00:53:52 -07:00
Enrico Ros d2a7082564 Add Application
NextJS, React, JoyUI (like MUI), application for self-hosted
Chat-like GPT use cases. Includes streaming of responses from
the Vercel edge runtimes.
2023-03-19 00:42:23 -07:00