Gemini_Discordbot icon indicating copy to clipboard operation
Gemini_Discordbot copied to clipboard

File attachment support (outside of images)

Open Spicytin opened this issue 1 year ago • 1 comments

Recently Google updated the Gemini API in AI studio to support files (e.g: PDFs) other than images. Is it possible to add this to your bot? since one time ago before the update was released, I tried to add pdf/txt support to your code with Bard/Gemini's help but it failed.

Spicytin avatar Feb 16 '24 04:02 Spicytin

I will be working on this this weekend along with the threads request I saw. I have had trouble with file upload so far

Echoshard avatar Feb 16 '24 13:02 Echoshard

Any updates? In my use case, users will likely upload very long text messages which automatically become .txt files on Discord. Although the bot recognizes and does in fact start typing, after some time, the typing just stops and there is no response. Would love if .txt and .pdf files would just work as smoothly as text and images do.

Appreciate the work, you helped me out so much with this!

simplifyme7 avatar Jun 28 '24 07:06 simplifyme7

Recently Google updated the Gemini API in AI studio to support files (e.g: PDFs) other than images. Is it possible to add this to your bot? since one time ago before the update was released, I tried to add pdf/txt support to your code with Bard/Gemini's help but it failed.

Looking at the supported file formats mentioned here: https://ai.google.dev/gemini-api/docs/prompting_with_media?lang=python. It seems that PDFs are not supported.

hihumanzone avatar Jul 01 '24 07:07 hihumanzone

Recently Google updated the Gemini API in AI studio to support files (e.g: PDFs) other than images. Is it possible to add this to your bot? since one time ago before the update was released, I tried to add pdf/txt support to your code with Bard/Gemini's help but it failed.

Looking at the supported file formats mentioned here: https://ai.google.dev/gemini-api/docs/prompting_with_media?lang=python. It seems that PDFs are not supported.

Cause it's discord I don't think I will actually use the file API. Instead I will just support PDF (Then just convert them to text) and text files.

I will be adding web scraping and you tube summary from the transcript.

Echoshard avatar Jul 01 '24 14:07 Echoshard

Looking at the supported file formats mentioned here: https://ai.google.dev/gemini-api/docs/prompting_with_media?lang=python. It seems that PDFs are not supported.

Cause it's discord I don't think I will actually use the file API. Instead I will just support PDF (Then just convert them to text) and text files.

I will be adding web scraping and you tube summary from the transcript.

Ohk, cool. that works too. Thank you!

hihumanzone avatar Jul 01 '24 19:07 hihumanzone

Cause it's discord I don't think I will actually use the file API. Instead I will just support PDF (Then just convert them to text) and text files.

I will be adding web scraping and you tube summary from the transcript.

Alright, that's perfect. Thanks a lot!

simplifyme7 avatar Jul 02 '24 07:07 simplifyme7

@SimplifyMe69 @hihumanzone @Spicytin I updated it so you should have everything you need!

Echoshard avatar Jul 08 '24 01:07 Echoshard