T
tRPC

How to return a stream? like open ai api

How to return a stream? like open ai api

IAAI am a Dev9/30/2023
I want that my api can have stream responses like open ai https://github.com/openai/openai-node#streaming-responses how can i do it? Thanks
Nnlucas9/30/2023
🎏-rfc-streaming there’s an RFC around thisYou could try subscriptions in the meantime though
IAAI am a Dev9/30/2023
Thanks, I will check it. Meantime, how can I make each subscription return a different value for each request? for example, each chat completion request must be different for each user, and only each user can listen the response. Thanks

Looking for more? Join the community!

T
tRPC

How to return a stream? like open ai api

Join Server
Recommended Posts
was wondering if anyone got a chance to use Ajv as input/output validator?I have been trying to use Ajv https://ajv.js.org/ with tRPC, but I wasn't able to get the types workstate change does not refetch the query and the app freezeshttps://github.com/trpc/trpc/discussions/4856 I am not sure if linking is allowed but I opened a diI have an api with trpc, how can I consume it from dart/flutter?https://flutter.dev/ https://dart.dev/ Thankstrpc subscription with react-queryTRPCClientError: Subscriptions should use wsLink having error when use subscription with react-querUnable to get mutation to trigger subscription because EventEmitter not being sharedHey folks, Been struggling with this for a few hours now hopelessly and trying random things - readIs there a guide of how to test?I'm usually use vitest but in frontend of shared packages. I'm frontend trying to create my first aModify the payload before mutatingI have a specific mutation hook that is used all throughout my app, and inside of the hook I want tois there a simple boilerplate that has everything ready to deploy?For example nodemon, reading the port for .env, etc. (I don't know if that's how it is haha) I use Context is not fully globally accessed? [ probably newbie question ]I create a context in the based procedure, but It's undefined in the procedure based on it. ~~Also Using tRPC for server to server requestsHey everyone! The start up I’m at recently deployed a server separate from our main server. Our main