-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(ai): Use location in websocket endpoint #15373
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
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. |
FirebaseAI/Sources/Types/Internal/Live/LiveSessionService.swift
Outdated
Show resolved
Hide resolved
This reverts commit 3098853.
This reverts commit 147aa33.
FirebaseAI/Sources/Types/Internal/Live/LiveSessionService.swift
Outdated
Show resolved
Hide resolved
FirebaseAI/Sources/Types/Internal/Live/LiveSessionService.swift
Outdated
Show resolved
Hide resolved
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.
Code Review
This pull request effectively refactors how the location
is handled by moving it into the APIConfig
struct. This makes the configuration more cohesive and allows the websocket endpoint to correctly use the user-configured location instead of a hardcoded value. The changes are consistently applied across the codebase, including initializers, instance management, and tests. The code quality is high, and I only have a couple of minor suggestions for cleanup.
I checked in the |
Per b/448722577,
This adjusts the websocket url to use the user configured location, instead of hardcoding to
us-central1
. Whileus-central1
is currently the only supported location, we should still use the user configured location; as down stream consumers may have location constraints. So instead of override the location, we allow the model to surface an error to consumers about their location being unsupported.To help propagate the location down to the
LiveSessionService
, I opted to move thelocation
variable to live under theAPIConfig
struct, instead of being a hanging property onFirebaseAI
.#no-changelog