Commit Graph

139 Commits

Author SHA1 Message Date
Enrico Ros 89f5802e8d Large improvement to (model-dependent) token utilization
And update README.md
2023-04-03 04:03:12 -07:00
Enrico Ros 23a3185696 Load PDFs on drag/drop, min-worker, dynamic import
Cleaned up the code a bit (thx gpt4), with:
 - dynamic module load: JS is chunked up and deferred to PDF loading,
   which improves all the sessions where PDFs are not loaded
 - unified path for drag/drop and 'load file' (shall call it "magic drop"
   so PDFs are text'ified upon drag/dop as well
 - fixed "not being able to load the same doc twice" (thx gpt4)
 - using minified worker, as it's loaded dynamically, we save ~50% bandwidth
2023-04-03 02:57:02 -07:00
Enrico Ros 0377512464 Move files around, for cleanup 2023-04-03 01:49:02 -07:00
Enrico Ros b3a43b3266 Merge branch 'fredliubojin-main' 2023-04-02 23:59:06 -07:00
Enrico Ros 7574fea434 Resolved merge conflict. 2023-04-02 23:58:32 -07:00
fredliubojin 421e06e617 Using pdfjs-dist to parse and load pdf contents. 2023-04-02 23:37:23 -07:00
Enrico Ros ee0efdea1f Markdown rendering. Closes #46. See #11.
Will be soon turned on by default, when the CSS and rendering is
of higher quality (right now making it default will make
non-Markdown chats look quite different).

Thanks. Great stuff Nils (@nilshulth)
2023-04-02 23:36:34 -07:00
fredliubojin f1c734d1b4 Merge pull request #3 from enricoros/main
rebase
2023-04-02 23:10:51 -07:00
Enrico Ros 429d3d69d5 Cleanup settings while adding a toggle for Markdown (on by default) 2023-04-02 23:07:26 -07:00
Enrico Ros dc64da7d18 Restore min height. Not a part of the merge, and broken on mobile. 2023-04-02 23:06:25 -07:00
Enrico Ros 9121b9c5c9 Merge branch 'nilshulth-markdown_formatting' 2023-04-02 20:39:07 -07:00
Nils Hulth 1b6ee6aede Fixed error with double click prop 2023-04-02 22:33:21 +02:00
Nils Hulth df595eb36b Merge to main smaller input window 2023-04-02 22:23:27 +02:00
Nils Hulth 2a7a2950a7 Added support for Markdown formatting in the chatmessages 2023-04-02 21:54:05 +02:00
Nils Hulth e8a661399e Made the default height of the input box 2 instead of 5 to use less space, especially on mobile 2023-04-02 21:31:57 +02:00
Enrico Ros 9a7169a80c Cleanup 2023-04-02 04:34:26 -07:00
Enrico Ros c307a1cd76 Cleanup fonts. Closes #44. Thx Typpo. 2023-04-02 01:15:49 -07:00
Enrico Ros 4a0c083d78 Update README 2023-04-02 00:45:07 -07:00
Enrico Ros ebddffa14b Fix Mic on mobile/desktop 2023-04-01 18:38:52 -07:00
Enrico Ros e2eac30155 Cleanup token estimation
Move the function to a separate file for better encapsulation
2023-04-01 18:21:57 -07:00
Enrico Ros d6215d021e Composer: show estimated tokens
Note: this feature uses @dqbd/tiktoken which in turns uses WebAssembly
to perform re-tokenization for every single character typed (there's
no reusing/smart caching of blocks). This may be super heavy while being
super useful - we'll see what people say.

Note the usage of Async webAssembly is enabled in the 'webpack' config
within next.config.js.
2023-04-01 18:03:44 -07:00
Enrico Ros c74675f9ef Refix 2023-04-01 05:48:19 -07:00
Enrico Ros 70a3336b01 Update purpose screenshot 2023-04-01 05:47:20 -07:00
Enrico Ros 181e78bd2d Manifest 2023-04-01 05:43:47 -07:00
Enrico Ros dd9d76172a Fix URLs 2023-04-01 05:40:43 -07:00
Enrico Ros eef67f3b68 Show the new features! 2023-04-01 05:38:13 -07:00
Enrico Ros 1e6880df6a Merge remote-tracking branch 'origin/main' 2023-04-01 04:39:11 -07:00
Enrico Ros 064de8dc1e Export chats. Closes #25
Chats are exported to paste.gg, are unlisted by default, and expire
in 30 days by default. The user is also provided with the deletion
key which will be only shown at the time of creation, and it's needed
to take down the paste.

Rendering looks quite great, including code and turns.
2023-04-01 04:38:53 -07:00
Enrico Ros 1166210f1f Merge pull request #42 from jondwillis/feature/inline-custom-system-message
Improved UX for Custom prompt
2023-03-31 13:04:16 -07:00
Jon Willis 2a74924ba7 Use Textarea to gather Custom system message instead of alert modal. 2023-03-31 09:38:25 -07:00
Enrico Ros a20e596773 Ready for 4/1 2023-03-31 04:19:22 -07:00
Enrico Ros c07aee01e0 State Optimizations and Cleanup 2023-03-31 03:35:05 -07:00
fredliubojin bf75540d79 Merge pull request #2 from enricoros/main
rebase
2023-03-30 22:00:01 -07:00
Enrico Ros e3014a2622 Update readme 2023-03-30 20:26:17 -07:00
Enrico Ros b0e2d59a53 Style cleanups 2023-03-30 20:01:19 -07:00
Enrico Ros 7154db7f72 Configurable API Host
Closes #32. Enable Users / Deployments to change the host where
OpenAI API calls are directed to. This enables project like
[Helicone](https://www.helicone.ai/) (Observability of LLM ops)
for tracking prompt/responses quality in real-time.

Configuration:
- User: App > Settings > Advanced > API host (e.g. "oai.hconeai.com")
- Deployment: set the 'API_API_HOST=...' environment variable

User takes precedence over deployment over api.openai.com. Realtime
switching in chat apps works well.

Note: the Helicone team is fixing dashboard reporting for 'streaming'
over the /v1/chat/completions endpoint.
2023-03-30 20:00:40 -07:00
Enrico Ros 03fb926d73 Update screenshot 2023-03-30 19:39:04 -07:00
Enrico Ros d63ba35581 Freshen up README.md 2023-03-30 19:24:45 -07:00
Enrico Ros 2dee6a87d3 Merge pull request #34 from harlanlewis/upstream-code-disable-ligatures
Very efficient fix: disable ligatured in Code blocks
2023-03-30 14:25:39 -07:00
Harlan Lewis d15e8955e9 disable ligatures inside code blocks
don't render `!=`, `==`, etc as ligatured glyphs
2023-03-30 14:12:23 -07:00
Enrico Ros fe0255597b Roll packages 2023-03-30 05:56:54 -07:00
Enrico Ros f678a0d463 Remove Sandpack (code execution)
The package makes the App slower to load, and I am not
aware of people using the Code
Execution feature

If someone still wants it, we can quickly revert
this commit and add it back (or you can use an older
official/preview build on Vercel)
2023-03-30 05:54:14 -07:00
Enrico Ros 2efa6de1f0 Tone colors down 2023-03-30 04:18:59 -07:00
Enrico Ros 9bacd6eb4f Typing indication 2023-03-30 04:13:27 -07:00
Enrico Ros 6ef04bf22f Rename DMessage fields
Note: some older chats will lost the name of the model
but they'll regain it fast. And now the system purpose
that originated the message is captured, as well as
the typing indication
2023-03-30 04:07:39 -07:00
Enrico Ros a1d6552ed7 Adjust colors 2023-03-30 02:37:53 -07:00
Enrico Ros 797d21ed96 Update README.md 2023-03-30 01:59:48 -07:00
Enrico Ros b8212f7162 Disable showing system messages by default 2023-03-30 01:58:58 -07:00
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