-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(ai): Live API #15309
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?
feat(ai): Live API #15309
Conversation
Generated by 🚫 Danger |
@daymxn Please resolve conflicts to enable CI to run |
} | ||
} | ||
|
||
struct BidiAudioTranscriptionConfig: Encodable {} |
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 is the purpose of this struct? It doesn't have an implementation.
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 is for enabling transcriptions. On the backend, it's an empty struct, but they note that they intend to add configurations in the future (and there are currently pending internal ones too). But from the public API standpoint, it's an empty config. But sending the config implicitly enabled transcripts.
The public API mapping for this is AudioTranscriptionConfig
, see the docs on that struct as well (as it mentions this).
|
||
/// Sent in response to a `BidiGenerateContentSetup` message from the client. | ||
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *) | ||
struct BidiGenerateContentSetupComplete: Decodable, Sendable {} |
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 is the purpose of this struct? It doesn't have an implementation.
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.
It's a message the backend sends when setup is complete. It's an empty struct, but maps to setupComplete
on BidiGenerateContentServerMessage
.
Adds support for the Live API through a new
LiveSession
struct, which is facilitated through a newliveModel
method onFirebaseAI
. This included support for the realtime api, as well as the incremental api.This PR also adds support for the
id
field inFunctionCallPart
.