-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Vertex AI Gemini generateContent w/ audio input doesn't work #14745
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
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Hi @BoyuanLong, thank you for the detailed report. This does look like a backend issue that we should handle in the SDKs until they fix it. Do you happen to have an MP3 file that you could share that frequently results in this issue? If not, I'll try some of my own. |
Thank you for the quick response. Re: mp3 file We can try to find some in https://file-examples.com/index.php/sample-audio-files/sample-mp3-download/. |
Hi. The issue still persist. I'm using the latest package 11.12.0. However I can still see that response json missing tokenCount field.
Error message:
|
Description
Hi,
I'm using the Vertex AI generateContent API to call Gemini (2.0 flash/flash-lite etc) with audio input, and sometimes it doesn't work. It throws
internalError
that is hard to fix with application code.My code is something like this:
And it will throw something like this most of the time:
I believe there's some issue in how the server counts audio tokens, and this field will be missing some of the time. So the
tokenCount
in audio modality will be missing, and thus the error.Thank you for taking a look, and please let me know if there's anything we could do as a short term fix :)
Reproducing the issue
No response
Firebase SDK Version
11.11
Xcode Version
16.3
Installation Method
Swift Package Manager
Firebase Product(s)
VertexAI
Targeted Platforms
iOS
Relevant Log Output
If using Swift Package Manager, the project's Package.resolved
Expand
Package.resolved
snippetReplace this line with the contents of your Package.resolved.
If using CocoaPods, the project's Podfile.lock
Expand
Podfile.lock
snippetReplace this line with the contents of your Podfile.lock!
The text was updated successfully, but these errors were encountered: