Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Automatic Handling of Files Larger Than 20MB for Gemini API #7338

Open
icefox57 opened this issue Dec 21, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@icefox57
Copy link

The Feature

#7307

Based on our previous discussion, I now understand the actual requirement: when the input file URL is larger than 20MB, converting it to Base64 and sending it to Gemini will result in a request failure. I hope the process can automatically switch to using the Google file upload workflow in such cases.

Motivation, pitch

The primary motivation for this feature request is to address a specific issue when working with the Gemini API. Currently, when files larger than 20MB are passed as URLs, the system automatically converts them to base64 format. This conversion results in a payload size exceeding the 20MB limit imposed by Gemini, causing a failure in processing.

This issue becomes significant when handling large video files or high-resolution images, which are common in workflows requiring AI processing. Manually identifying and switching to an alternate method (e.g., Google file upload) introduces inefficiencies and potential errors.

By introducing an automatic fallback mechanism for files exceeding 20MB, the system could seamlessly switch to the Google file upload process without user intervention. This would improve reliability and streamline workflows.

Pitch

The feature will:
• Automatically detect when a file exceeds the 20MB limit during URL input processing.
• Switch to the appropriate Google file upload flow for large files.
• Provide transparent and seamless handling without user intervention.
• Eliminate the need for manual pre-checks or custom fallback implementations, enhancing productivity and reducing errors.

This feature would make the Gemini API more robust and user-friendly, accommodating diverse use cases involving large media files.

Are you a ML Ops Team?

No

Twitter / LinkedIn details

No response

@icefox57 icefox57 added the enhancement New feature or request label Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant