-
Notifications
You must be signed in to change notification settings - Fork 682
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
Support field fileData
(direct file URL) for Gemini models
#1136
base: main
Are you sure you want to change the base?
Support field fileData
(direct file URL) for Gemini models
#1136
Conversation
PR Change SummaryAdded support for the
Modified Files
How can I customize these reviews?Check out the Hyperlint AI Reviewer docs for more information on how to customize the review. If you just want to ignore it on this PR, you can add the Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add |
fileData
(direct file URL) for Gemini models on Vertex AIfileData
(direct file URL) for Gemini models
Also allowed |
Thanks a lot for making this PR, it worked for me. Would love to see it get merged. Couple suggestions:
|
Thanks for the interest! Did you try this with both GLA and Vertex providers? because PDF URLs seem to work with Vertex. I agree that with GLA only youtub URLs seem to work though. |
Ah I see, yeah I've only tried GLA. I want this PR for youtube links support specifically anyway. |
@Kludex in case you had time to give this a quick look: regarding the comments above, do you think it would be better to add a youtube link in the docs instead of a PDF url? Also, unsure if this approach is correct: maybe it's better to be able to set this via |
Can you just add both youtube and PDF examples? My second point, making media type optional, is probably more material: right now Gemini seems to ignore it and you can just pass whatever, but no way to know if google will change that behavior in the future. |
@ioga added, let me know what you think. Still need to increase test coverage and maybe for the Vertex provider the mime type should be inferred when possible, because it is required for that provider. |
works for me on |
This PR addresses the feature request described in issue #1134
The implementation proposed here is straightforward: add a
FileUrl
class that can be used in user prompts in the same way thatDocumentUrl
and similar are used.The main downside I see with this approach is that this is only supported by Gemini models on Vertex AI and, in minor measure, by GLA-Gemini models, while the
FileUrl
can in principle be used with any model (and would lead to aRuntimeError
exceptions being raised in some models).