-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Firebase AI] Replace LiveServerMessage struct/enum with protocol #15365
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
base: main
Are you sure you want to change the base?
Conversation
This reverts commit f0f9e4d.
Co-authored-by: Nick Cooke <[email protected]>
Co-authored-by: Andrew Heard <[email protected]>
…ntContent.swift Co-authored-by: Andrew Heard <[email protected]>
…ntMessage.swift Co-authored-by: Andrew Heard <[email protected]>
…ntMessage.swift Co-authored-by: Andrew Heard <[email protected]>
Co-authored-by: Andrew Heard <[email protected]>
Co-authored-by: Andrew Heard <[email protected]>
Co-authored-by: Andrew Heard <[email protected]>
Co-authored-by: Andrew Heard <[email protected]>
Co-authored-by: Nick Cooke <[email protected]>
…e-ios-sdk into dlr/firebaseai-live-api
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 refactors LiveServerMessage
from a struct with an enum to a protocol. This is an excellent change that improves the extensibility of the API, allowing for new message types to be added without causing breaking changes. The implementation is solid and consistently applied across all relevant files. The related changes, such as improving error handling during session setup and adding a new API test, are also valuable. I have a couple of minor suggestions to improve code style consistency and make the new test more robust. Overall, great work on this refactoring!
Replaced the
LiveServerMessage
struct containing theMessageType
enum with a protocol. This avoids potential breaking changes if new message types need to be added.#no-changelog