Commit Graph

88 Commits

Author SHA1 Message Date
Enrico Ros 1e0f11d064 Llms: move the server side proximally closer 2023-09-22 20:57:32 -07:00
Enrico Ros 4f3f7963d0 Llms: cleanup routers 2023-09-22 19:15:38 -07:00
Enrico Ros 4d2209ca8d Anthropic: rename wiretypes 2023-09-22 19:14:41 -07:00
Enrico Ros a905a0d6e4 Augmented Chat (was ".. & Follow-Up") - first augmentation: Diagrams
Also fix function calling when with a mandatory function name,
even in case it doesn't hit.
2023-09-19 23:24:56 -07:00
Enrico Ros 98d791810a MPEG Streaming support in the ElevenLabs API
With this patch, the edge function begins streaming the content right away.
This leads to some minor optimization for the non-streaming use case, as there
is no large audio file kept on the server before transferring.
But this mainly creates a large optimization for the "streaming" use case,
as as the data trickles in, it is sent to the client in pass-through fashion.
2023-08-17 23:54:57 -07:00
Kevin 783f5499b5 Update stream content-type 2023-08-01 17:50:48 -07:00
Enrico Ros 9666e58399 Anthropic: full support (stream and immediate calls) 2023-07-23 03:19:59 -07:00
Enrico Ros 09d58e26ed LocalAI support - works in Stream and Function mode 2023-07-21 02:12:18 -07:00
Enrico Ros fcdc3266af Improve showing errors 2023-07-10 21:58:03 -07:00
Enrico Ros 367dc9c662 More defensive coding around the flakey OpenAI API 2023-07-05 01:35:34 -07:00
Enrico Ros 490f8bdac3 Move file 2023-06-28 20:24:53 -07:00
Enrico Ros 675474127c Rework stream-chat into a backpressure-driven TransformStream - allows for real cancellations
This implementation has been largely inspired by the Vercel AI (stream) SDK,
available at https://github.com/vercel-labs/ai/, and in particular by the work
of @jridgewell on https://github.com/vercel-labs/ai/issues/90 and related
issues.

As soon as some pending changes land in edge-runtime and nextjs, we'll have
full stream cancellation and tokens saving #57
2023-06-28 20:18:19 -07:00
Enrico Ros e56bfcb600 Edge runtimes 2023-06-28 19:51:58 -07:00
Enrico Ros 2d4c0e9c64 CallChatWithFunctions - functions support, incl. OpenAI Implementation
May be rough on the edges, but should not create issues.
The implementation is defensive, excessively validates the
return types as the OpenAI API is brittle and can easily misbehave
2023-06-28 03:00:25 -07:00
Enrico Ros e0b0f8f764 Improve error reporting 2023-06-19 08:48:09 -07:00
Enrico Ros 4916ffd2d0 Support OpenAI upstream errors in the streaming API 2023-06-19 08:44:22 -07:00
Enrico Ros 1f4e6dfd34 Move Publish to tRPC 2023-06-14 19:48:59 -07:00
Enrico Ros 4b170a09dc OpenAI: Improve namespacing, ahead of functions support 2023-06-13 21:44:01 -07:00
Enrico Ros b2faa48f52 Lints 2023-06-13 16:24:02 -07:00
Enrico Ros da93630544 tRPC: PARTIAL port of ElevenLabs 2023-05-21 23:11:52 -07:00
Enrico Ros 65a55af804 Prodia -> tRPC 2023-05-20 02:16:52 -07:00
Enrico Ros ef296e6336 Google Search -> tRPC 2023-05-20 01:27:18 -07:00
Enrico Ros 8349704ec6 Remove the OpenAI module 2023-05-19 22:28:02 -07:00
Enrico Ros 9c51f71d7d Move the Streaming function to the new model 2023-05-19 22:25:11 -07:00
Enrico Ros cb66af6438 Rename to GoogleSearchStore 2023-05-18 20:27:41 -07:00
Enrico Ros 64c5ac444d Buildfix 2023-05-15 03:14:43 -07:00
Enrico Ros 3b0ca67441 trpc: migrate to Edge functions(!) - improve query/async API distinction 2023-05-15 00:42:04 -07:00
Enrico Ros 706f5feb9c trpc: use for openai/chat (non-streaming) 2023-05-14 03:58:38 -07:00
Enrico Ros 0376ab918a trpc: OAI models enumeration is working 2023-05-12 23:56:42 -07:00
Enrico Ros 2a209ffb1a trpc: wiring & example 2023-05-12 20:56:22 -07:00
Enrico Ros 1bff4dd0bd Fix Lints 2023-05-12 20:01:04 -07:00
Enrico Ros 54b2d289e2 ~/modules 2023-05-12 19:44:07 -07:00
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