Comments (3)
Relevant example docs:
https://github.com/google-gemini/generative-ai-js/blob/main/samples/node/file-upload.js
https://github.com/google-gemini/cookbook/blob/main/quickstarts/file-api/sample.js
This method was just introduced to the Google Generative AI npm package recently, so was not possible before.
The bot should auto detect what the mime_type
is, it should support image files and utf-8 encoded text files. It should also potentially support other file types such as .pdf, and maybe videos eventually.
from taurus.
This commit adds file viewing support. However the file is not uploaded directly and is instead made into a string. This issue will stay open until Image/Files are uploaded properly
from taurus.
Relevant example docs: https://github.com/google-gemini/generative-ai-js/blob/main/samples/node/file-upload.js https://github.com/google-gemini/cookbook/blob/main/quickstarts/file-api/sample.js
This method was just introduced to the Google Generative AI npm package recently, so was not possible before. The bot should auto detect what the
mime_type
is, it should support image files and utf-8 encoded text files. It should also potentially support other file types such as .pdf, and maybe videos eventually.
When this feature is added to the GoogleGenerativeAI package work on this will begin.
This is due to the package relying on a local file parameter at the moment, however discord returns a file link to be utilised. In the case that this file URL option is not added to the package a workaround to this will be made by temporarily storing the file locally.
Update: Due to there being no definitive date when the feature will come to the API the update will most likely include downloading all of the users files locally and uploading them to the FileAPI.
For history - Function modification needed to fetch mime type from file and upload it, and pass an array of file ids to the handleGeminiResponse function.
For running - With the file ids and mime types to go in the inline data along with any that may be from history it can be passed into the model for the request, after the request has been sent the files should be deleted as the FileAPI has a 20GB limit that is cleared every 48 hours.
Additional notes:
Should, in the rare case that the users files amount to more than 20GB or there has been a failure with uploading their files the model should be passed a message along with the system instruction or users message saying โThe user tried to upload a file, unfortunately the 20GB file limit was reached or uploading failed, please take this into account when replyingโ
from taurus.
Related Issues (20)
- [BUG] Context Menu - blocked due to ping
- [FEATURE] Music Generation! HOT 1
- [ENHANCEMENT] History for context menu commands
- [BUG] Loading dots/timer broken
- [ENHANCEMENT] Clickable Commands in /help
- [BUG] Getting an error when running HOT 7
- [BUG] Slash commands not added | Bot replying wrong HOT 32
- [BUG] Bot replying wrong HOT 1
- [BUG] Server Commands Broken HOT 1
- [ENHANCEMENT] Retry request if token limit reached
- [BUG] Adding custom commands HOT 9
- [ENHANCEMENT] Move utils file
- [FEATURE] Image Upscaling
- [BUG] Bot not replying when link embed
- [FEATURE] Music | TTS | Video Gen
- [BUG] getting error when using /taurusai command HOT 2
- [FEATURE] Settings Panel | V4
- [BUG] ERR_DLOPEN_FAILED
- [FEATURE] Proper Docker Support
- [FEATURE] Chat Safety Disabling/Enabling
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from taurus.