8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'd like to integrate my tRPC serverless backend (made in Next.js) with Vercel AI SDK.
As I can see there is a pretty straightforward to integrate Next.js API Route handler with this SDK, so I wonder if we can just replace it with tRPC?
Seems like it only requires appropriate response to be returned, but is it possible to do it with tRPC, as it transforms all the outputs?
We can use tRPC streaming together with the ai package, but then there is no possibility to use it together with hooks like useChat or useCompletion
ai
useChat
useCompletion
No response
The text was updated successfully, but these errors were encountered:
You can do this with async generators https://trpc.io/docs/client/links/httpBatchStreamLink#generators
On the client-side this can be consumed with useQuery an array.
Sorry, something went wrong.
You can do this with async generators https://trpc.io/docs/client/links/httpBatchStreamLink#generators On the client-side this can be consumed with useQuery an array.
Yes, but can I plug it into Vercel AI SDK hooks somehow? Or I'm limited to Tanstack Query API?
No branches or pull requests
Describe the feature you'd like to request
I'd like to integrate my tRPC serverless backend (made in Next.js) with Vercel AI SDK.
Describe the solution you'd like to see
As I can see there is a pretty straightforward to integrate Next.js API Route handler with this SDK, so I wonder if we can just replace it with tRPC?
Seems like it only requires appropriate response to be returned, but is it possible to do it with tRPC, as it transforms all the outputs?
Describe alternate solutions
We can use tRPC streaming together with the
ai
package, but then there is no possibility to use it together with hooks likeuseChat
oruseCompletion
Additional information
No response
👨👧👦 Contributing
Funding
The text was updated successfully, but these errors were encountered: