Replies: 1 comment
-
It appears the issue is likely due to API Gateway not supporting streaming. I tried to use a Lambda Function URL to get around this issue but didn't have any luck. If anyone has successfully implemented streaming with Lambda I would appreciate any insight or advice. Thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue Summary
I'm building a React Single Page Application (SPA) that communicates with a serverless backend using Node.js, AWS API Gateway, and Lambda.
I'm trying to get useChat to read the data stream being returned by streamText but the messages variable never gets updated with an assistant message.
AI SDK version: 3.4.33
Client-side
Server-side
The onChunk method is logging the streamed response from the model correctly. Here is what gets logged in the onResponse method of useChat:
There are no errors being logged in the onError method.
I do have a tool for streamText to call when needed, but I'm not using prompts that trigger the tool while testing this.
Beta Was this translation helpful? Give feedback.
All reactions