Commit Graph

32 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 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
Enrico Ros 429d3d69d5 Cleanup settings while adding a toggle for Markdown (on by default) 2023-04-02 23:07:26 -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 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 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
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 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 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 e7c2a0e592 Improve Executive 2023-03-29 17:26:07 -07:00
Enrico Ros 2288186b8f Advanced Settings 2023-03-29 16:32:53 -07:00
Enrico Ros 2a11d1854f Cleanup Chat, ChatMessage (vs Message), ChatMessageList (vs Conversation) 2023-03-29 15:26:37 -07:00
Enrico Ros e256f1e2ec Purpose Selector 2023-03-29 14:28:15 -07:00
Enrico Ros b03ed4f17a Allow Free Scrolling 2023-03-29 05:08:30 -07:00
Enrico Ros 2405f0ddd1 Application Bar: Hamburger Menu
Will be the home of the chat switcher, now disabled. Good for
experimentation of UX and data structures.
2023-03-29 04:35:06 -07:00
Enrico Ros b5b709b3cd Wide Mode support 2023-03-29 03:14:58 -07:00
Enrico Ros 385ea77f93 Update Model/Purpose from the title bar
Remove it from Settings too
2023-03-29 01:51:25 -07:00
Enrico Ros 24a0213397 Move systemPurposeId/chatModelId per-chat 2023-03-28 23:32:23 -07:00
Enrico Ros df512f57b1 ChatStore: persisted multi-conversation store 2023-03-28 05:20:18 -07:00
Enrico Ros 2332fdde71 Conversations State
Lay down the foundation for switchable chats
that are automatically persisted
2023-03-28 02:48:28 -07:00
Enrico Ros 9fd9db5d7a Pedantic 2023-03-27 22:26:42 -07:00
Enrico Ros 90b267a93b Config cleanup 2023-03-27 01:07:51 -07:00
Enrico Ros 5c6e1e9c8d Moving forward we'll use /lib 2023-03-26 22:58:59 -07:00