-
Notifications
You must be signed in to change notification settings - Fork 105
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
Fix specifying media uris for google vertex #242
Conversation
Thanks @mattmatters! I haven't looked into this but I'd love some more information. My guess is that the file data could be Base64 encoded (so the file is uploaded directly), or it could support the If so, I'm hesitant to break a potentially working solution for some people. |
Oh sorry I should have supplied more details, I can check on inline data but even just having the data key set at all results in the vertex api returning a 400 error saying that an unknown key I did leave the inline data field alone though above it as I haven't been working with inline data and didn't want to mess with that for folks. |
Just to follow up here I tested with setting inline data to the image_url type and it also does not work. I don't believe this codepath has ever worked for vertex ai. |
Thanks @mattmatters for checking on that. I'd be happy to merge this in. Can you add any relevant documentation and tests for the fix? |
Ok sorry for the late tests @brainlid but fixed. I did notice some oddities when comparing ChatVertexAI with ChatGoogleAI content part serialization. You can specify an atom for an image type here that gets expanded out (there's also a bug when supplying your own mime type where it always just sets I've abused this with ChatVertexAI for the |
Sidenote, Vertex AI uses camelcase for content part serialization while the project's implementation of content part serialization is snake case. We should probably check on if that's deliberate or if Google wants folks to use camelcase for their gemini version and they are just maintaining snake case arguments for compatibility. It would greatly simplify both of these implementations if we could just share code between them. |
Thanks @mattmatters! If snake case is supported, I'd prefer to use that as well. The VertexAI module is primarily managed by contribution. If you want to verify that and change it, I'd love to merge it! |
Thanks! Merged! |
Happy to take that on! It's a really weird situation Google has done with splitting these up. |
Changes
data
=>fileUri
.