vercel / ai

Build AI-powered applications with React, Svelte, Vue, and Solid
https://sdk.vercel.ai/docs
Other
10.03k stars 1.49k forks source link

Work with other file attachments instead of just images #1903

Closed Godrules500 closed 1 month ago

Godrules500 commented 5 months ago

Feature Description

Currently the SDK works with just image attachments. I would like for it to be able to handle other file types like pdfs, excel, word, and etc.

Use Case

Our users need the ability to upload documents and compare results, or summarize information.

Additional context

No response

NaucMeIT commented 5 months ago

This would be awesome feature. Especially as Gemini supports videos.

BleedingDev commented 5 months ago

I opened PR, it's first attempt, will need more work definitely.

https://github.com/vercel/ai/pull/1945

cjlryan commented 2 months ago

This would be awesome feature. Especially as Gemini supports videos.

👆 This. Would love to be able to use this instead of the VertexAI API 🤮

Godrules500 commented 2 months ago

This would be awesome feature. Especially as Gemini supports videos.

👆 This. Would love to be able to use this instead of the VertexAI API 🤮

So far, I've been able to work with the other attachments by passing the base64 URL into the image property, and it has been working praise the Lord!

jamiedavenport commented 2 months ago

+1 would also love the ability to work with videos and pdfs using the ai sdk

cjlryan commented 2 months ago

This would be awesome feature. Especially as Gemini supports videos.

👆 This. Would love to be able to use this instead of the VertexAI API 🤮

So far, I've been able to work with the other attachments by passing the base64 URL into the image property, and it has been working praise the Lord!

Are you using the latest version? This doesn't seem to work for me unfortunately - there seems to be checks for mime type

lgrammel commented 1 month ago

https://github.com/vercel/ai/pull/3137