Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Use
generative-ai-swift
tests in Vertex AI #12585Use
generative-ai-swift
tests in Vertex AI #12585Changes from all commits
97c2d61
799c430
e9a332c
2d65245
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can Vertex have an invalid API key? Shouldn't there be a message about a GoogleService-Info.plist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would only happen if the API key in the
GoogleService-Info.plist
is invalid (e.g., if the key was revoked after the app was shipped). The message/code/status checked here are the ones returned by the backend. I don't think we have specific error cases for revoked/invalid API keys in our other SDKs (everything would be broken in that scenario), which was why I removed the case that was in https://github.com/google/generative-ai-swift/blob/48a0c2f11935a17132492583d4aad51c5a407bcb/Sources/GoogleAI/GenerateContentError.swift#L32-L33 but we could bring it back.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's preventing them from being added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll just need to check those parameters (and
requestOptions
) when determining if it's the same instance inVertexAIComponent
:firebase-ios-sdk/FirebaseVertexAI/Sources/VertexAIComponent.swift
Lines 65 to 79 in aa474f5
Note: Those parameters are currently all structs so I can't use them with
@objc
in their current form (might be able to use the[String:Any]
trick that Morgan mentioned).