-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[Vertex AI] DecodingError when Citation.uri
is not included in response
#13518
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Thank you very much for the detailed prompt and full response, @rfarrow1010! We hadn't yet seen a case where the citation had a |
Citation.uri
is not included in response
@rfarrow1010 This fix is now merged in the |
Thanks @andrewheard! Any idea when the next release will be available? |
@rfarrow1010 The next release should be available in approximately 3 weeks. |
Description
I wanted to pass an image along with a text prompt into VertexAI.vertexAI().generativeModel().generateContent() to generate a response. The call itself actually appeared to work fine; I have a log with the response formatted the way I wanted, along with citation metadata. But it appears the citations are causing issues for the SDK. In the logs below, see the first log with the successful response and the citations that do not all follow the same schema. Two of the citations have "startIndex", "endIndex", and "uri", but one of them has no "uri" and instead has a field called "title".
Judging from the second log, it looks like the SDK expects "uri" here, doesn't find it, and crashes before I can retrieve my response. Maybe the decoding can be made more flexible to prevent this?
Reproducing the issue
Firebase SDK Version
10.26.0
Xcode Version
15.4
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
snippetIf 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: