Commit Graph

56 Commits

Author SHA1 Message Date
Enrico Ros a6113bc407 Support stream ending for LocalAI 2023-05-09 00:06:02 -07:00
Enrico Ros b3a176db6c Improve compatibility of the streaming mode 2023-05-08 23:55:45 -07:00
Enrico Ros b50d14590f Improve API_HOST support: can use HTTP links & better TS support 2023-05-08 23:33:29 -07:00
Enrico Ros 8afc5227b5 Finish Elevenlabs modularization 2023-05-08 20:44:22 -07:00
Enrico Ros 6d64347cae Clarify server-side error messages 2023-05-07 02:15:31 -07:00
Enrico Ros d3d526423f Silence 2023-05-03 10:34:43 -07:00
Enrico Ros 11ba2d6dec Silence 429s from the OpenAI API 2023-05-03 10:07:18 -07:00
Enrico Ros f7857ee364 Added Prodia models 2023-04-29 23:49:54 -07:00
Enrico Ros 91bbcac6d7 Support multiLingual Voice Synthesis (Eleven Labs)
By switching the Language setting to something other than English, the better 'multilingual' ElevenLabs
model will be selected.
2023-04-29 21:16:32 -07:00
Enrico Ros fcaac07c37 Increase GCE results to 5 2023-04-28 00:05:22 -07:00
Enrico Ros 30faee7f09 Google: reliable, 2->4 results, lower tokens/data, #98 2023-04-27 23:42:34 -07:00
Enrico Ros 5e4c222d8d Merged Google Programmable Search
Using and Edge function for accessing the Google API and
return the search results (.items[]) to the client (browser).
Added all type definitions (browser<>edge, and edge<>google),
and honor environment variables. When both the new environment
variables are set at build time, the user won't be asked for
keys.

Basically this implements #98, via ReAct.
2023-04-27 03:44:37 -07:00
Fred Liu b287b79c56 Add Google search Tool to ReAct. 2023-04-27 01:38:43 -07:00
Enrico Ros ee60dbd53e 🔧 ReFactor
🤯
2023-04-26 01:52:17 -07:00
Enrico Ros bb5886aa02 Further moves 2023-04-25 23:41:32 -07:00
Enrico Ros 2d2fc134e7 Move OpenAI to its place 2023-04-25 23:29:16 -07:00
Enrico Ros e904bd9ca1 Begin modularization: Cleanup OpenAI usage (client, server) 2023-04-25 20:09:12 -07:00
Enrico Ros 6393e8fd93 Prodia: 4 additional settings, completing the API
Note: Steps is limited upstream to 50, so we set that as maximum. When the
seed is random, it's not returned by the API, so a good generated image won't
be reproducible, unless the seed was set to something random beforehand.
2023-04-25 00:35:13 -07:00
Enrico Ros c16aeb49a3 Reprioritize models for the public. 2023-04-24 22:18:34 -07:00
Enrico Ros eeced564af Remove debug 2023-04-22 23:10:56 -07:00
Enrico Ros 45bff6c2ae Prodia Model Selection 2023-04-22 23:09:30 -07:00
Enrico Ros 4e8cc43408 Image generation with Prodia 2023-04-22 05:35:00 -07:00
Enrico Ros b17e5edc44 Cleanup Structure 2023-04-18 00:43:25 -07:00
Enrico Ros 3edab10d22 ElevenLabs settings. Change Voice, speak automatically, user provided-Key.
With this change, tanstack/react-query is brought in, to simplify
non-streaming API calls to the edge functions going forward.
2023-04-17 00:59:04 -07:00
Enrico Ros 876cf93527 Support for ElevenLabs (disabled by default) 2023-04-12 22:50:11 -07:00
Enrico Ros 035ca8601a Merge stream option. Closes #81 2023-04-12 20:35:10 -07:00
shinkawk e2b4d00d8e Enabled stream option for Text decoding 2023-04-13 10:31:23 +09:00
Enrico Ros 0b4f6ca8ca Redo publish as edge runtime (Fixes crash after the edge-patch, closes #72) 2023-04-11 16:58:52 -07:00
Enrico Ros c041eb8d48 Merged the Cloudflare patch, and adapting to similar services 2023-04-11 16:38:49 -07:00
Dario Piotrowicz 34bb439c04 add missing config to api publish 2023-04-11 11:13:51 +01:00
Enrico Ros 961c663b93 Cleanups, but not much 2023-04-11 00:00:53 -07:00
Enrico Ros 7bbe284711 Auto-title conversations 2023-04-10 22:26:29 -07:00
Enrico Ros cc6eaaed22 Ready up the OpenAI APIs - better typing, responsibilities 2023-04-10 21:07:52 -07:00
Enrico Ros 19a299fcb2 Lint--; 2023-04-08 18:06:36 -07:00
Enrico Ros f587758d17 Begin abstracting the streaming API functions 2023-04-07 13:18:13 -07:00
Enrico Ros 84500796ef Support for Api Organization ID - #63 2023-04-07 08:05:50 -07:00
Enrico Ros 5937d09005 Add models call (unused yet) 2023-04-06 17:02:10 -07:00
Enrico Ros 1a165aad00 Cleanup Streaming Chat functions 2023-04-06 16:39:24 -07:00
Enrico Ros 04accadf96 Rename Export to Publish 2023-04-04 02:48:47 -07:00
Enrico Ros 0377512464 Move files around, for cleanup 2023-04-03 01:49:02 -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 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 3e0cd173af Fix 2023-03-29 15:32:12 -07:00
Enrico Ros 5008f111a7 Merged #22. Stop button in the UI
The UI side works well, including aborting the network
request to the api, and showing status and issues.
The API function (api/chat.ts) doesn't seem to work yet,
as the try/catch blocks are not triggered (both on the
'handler', and in the 'OpenAIStream').
In the meantime, having the Stop button on the UI is still
a net gain, despite tokens still running/being used from
the API call.
2023-03-26 04:25:23 -07:00
Enrico Ros 1b340deb31 Cleanup types 2023-03-26 02:22:03 -07:00
Enrico Ros f16e744ef9 Smaller moves 2023-03-24 19:06:36 -07:00
Enrico Ros 4ef48f0923 Lints 2023-03-24 18:22:13 -07:00
Enrico Ros a63c9123dd Improve the Api (/api/chat) payload 2023-03-24 01:39:51 -07:00
Fred Liu 0ca13e67e6 Stop Generation button initial implementation. 2023-03-23 00:44:17 -07:00
Enrico Ros 3e6bbd8fe8 Persisted State Store - enables better UX
Basic implementation using Zustand to store values. For now just the
ChatModel and the SystemPurpose that are currently active. This enables
app-wide synchronization and automated persistence. Meaning we can now
have settings (and in future conversations) which are persisted and
synchronized.

API keys have not been migrated yet, because we need to import them from
the existing localStorage key, for a smooth transition.
2023-03-22 00:29:51 -07:00