Skip to content

[FEATURE] Support large videos (>20 MB) for Gemini #426

@altxtech

Description

@altxtech

Scope check

  • This is core LLM communication (not application logic)
  • This benefits most users (not just my use case)
  • This can't be solved in application code with current RubyLLM
  • I read the Contributing Guide

Due diligence

  • I searched existing issues
  • I checked the documentation

What problem does this solve?

Support large videos (>20MB) for Gemini

Proposed solution

If a video attachment is larger than 20MB, do a request to the Files API to get a file url, then use a "file_data" part instead of "inline_data" part.

https://ai.google.dev/gemini-api/docs/video-understanding

Plan to work on this myself in the next two weeks. But won't hold anyone back from implementing this until a have time.

Why this belongs in RubyLLM

Improvement of plumbing required to add attachments to requests, which is within the scope of what ruby_llm handles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions