Replies: 3 comments 15 replies
-
Can you provide more details about the polyfill you are using and the backend that sends the response? Is the error reproducible on web when using the polyfill only? |
Beta Was this translation helpful? Give feedback.
-
Trying to understand this whole issue better. When you say "For mobile, I had to polyfill TransformStream", what do you mean exactly? what are you targeting and what are the library versions? we have seen people do this successful on Expo for mobile so this is confusing to us, we want to learn what's different |
Beta Was this translation helpful? Give feedback.
-
Any updates on this? Not sure my problem is exactly the same, but I'm also using the SDK with an expo-52 project. Everything was working great until I upgraded my version to This led me to this error:
I tried the solution from here. I put that on my
Which makes me think I need to add polyfills to the client to support this. I'm not sure which ones to add though. Happy to clarify anything that could help |
Beta Was this translation helpful? Give feedback.
-
The problem
I have streaming working on mobile using the new expo/fetch api (without using the vercel/ai library, just calling endpoints directly)
Then, I implemented my streaming using the vercel/ai library - and this works completely fine in the web context.
For mobile, I had to polyfill TransformStream, since this was marked as missing. But after this, it seemed to almost be working, except I get the error "AI_APICallError: Failed to process successful response".
Debug info
Using the docs, I casted the error to the APICallError type, and printed out some info.
url: http://192.168.1.50:11434/api/chat
requestBodyValues: {"format": undefined, "messages": [{"content": "Hello, how are you?", "role": "user"}], "model": "llama3.2:latest", "options": {"temperature": 0}, "tools": undefined}
statusCode: 200
responseBody: undefined
data: undefined
I've been banging my head against the wall on this issue for a few days - does anyone have any input that might help?
Been testing out combinations of various solutions suggested in existing discussions but no luck: #655 (comment)
Would love to use the vercel/ai library in my React Native project - and I'll make the solution available for anyone to clone.
Thank you SO much in advance - I appreciate any help on this topic
Beta Was this translation helpful? Give feedback.
All reactions