How to modify stream responses? #653
Replies: 3 comments 3 replies
-
Hi @ElasticBottle! I'm Dosu and I’m helping the orpc team. The Content-Type for stream responses in orpc is hard-coded as If you need to support this use case, you’ll have to patch the library or propose a feature to make the Content-Type for streams configurable. Let me know if you want pointers on where exactly to patch or how to approach a workaround. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
We can do that by returning a But why do you need the AI SDK on the client side? What is it that oRPC can't do? Let's see what we can improve. |
Beta Was this translation helpful? Give feedback.
-
Super helpful! I'm using the Current workaround is to see if the path is the chat path, create and use a server side caller, then manually return a response. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Trying to integrate with the vercel ai SDK and cannot seem to message the stream into the expected response. In particular, I've noticed that the
Content-Type
returned istext/event-stream
byorpc
but vercel expectstext/plain
. I've tried using theResponsePlugin
to no avail.Not sure if that's the only difference, but appreciate any direction here
Beta Was this translation helpful? Give feedback.
All reactions