Skip to content

Conversation

mbleigh
Copy link
Collaborator

@mbleigh mbleigh commented Aug 3, 2024

There is a new Gemini Files API which allows uploading large files for use with Gemini, but Genkit wasn't compatible because we proactively download https:// URLs.

This PR fixes that by:

  1. Adding a filter option to downloadRequestMedia middleware and filtering out File API URLs.
  2. Updating toGemini logic to properly pass through non-data URLs.

Checklist (if applicable):

  • Tested (manually, unit tested, etc.)
  • Docs updated

Copy link
Contributor

@xavidop xavidop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGM

@mbleigh mbleigh merged commit 19a6223 into main Aug 7, 2024
@mbleigh mbleigh deleted the gemini-files branch August 7, 2024 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants