bidah / react-native-vercel-ai

🤖 ⚛️ Run Vercel AI package on React Native and Expo universal native apps (Mobile and web)
MIT License
241 stars 13 forks source link

Support for Vercel AI SDK v3 / Generative UI #12

Open allenchuang opened 7 months ago

allenchuang commented 7 months ago

Hi there, wondering if this package would be able to upgrade to SDK v3 to support generative UI with react native?

bidah commented 6 months ago

that's a good one and we are getting behind. will bring an update tops next week.

cureau commented 6 months ago

Fyi, since this is about making compatibility current, I'll mention that this may or may not be compatible with Expo SDK 50.

I get ReferenceError: Property 'document' doesn't exist when I:

  1. add the metro config config.resolver.unstable_enablePackageExports = true; and then npx expo prebuild --clean + npx expo ios
  2. add "browser": { "ai/react": "./node_modules/ai/react" }, to package.json
  3. replace ai/react with react-native-vercel-ai

Reverting these changes resolves the error. But my setup is so convoluted, I'll refrain from filing a bug. Just wanted to post this here since you're updating the library.

versions

(Thanks for this library!)

johannbuscail commented 3 days ago

Any update ?