Bind com.google.firebase:firebase-ai
Description
| Firebase AI Logic | com.google.firebase:firebase-ai |
|---|
Firebase AI Logic com.google.firebase:firebase-ai
The com.google.firebase:firebase-ai package is the one currently used to integrate Firebase AI Logic (formerly Vertex AI in Firebase, previously available as com.google.firebase:firebase-vertexai) into native Android apps.
To integrate Gemini AI directly into a .NET MAUI/Native Android app, we need the com.google.firebase:firebase-ai package
@fsaffioti is this library using a local on-device model? Or is this using a Firebase cloud service?
Are the libraries being added here, useful instead:
- https://github.com/dotnet/android-libraries/pull/1243
This SDK integrates with Gemini models through Firebase cloud services, not purely on-device. com.google.firebase:firebase-ai is the successor to firebase-vertexai and is designed to call Gemini APIs via Firebase, while optionally supporting on-device models when configured.
It is therefore different from Google AI Edge LocalAgents or MediaPipe GenAI, which are focused on fully local inference.
It’s also part of the Firebase Android SDK. From that package, you’ve already created bindings for other components such as Xamarin.Firebase.Messaging, Xamarin.Firebase.Analytics, Xamarin.Firebase.Crashlytics, etc., but firebase-ai is currently missing. for reference https://firebase.google.com/support/release-notes/android
We’ve already tested some features in native iOS (for example, function calling) and now we would like to bring them into production in our .NET native Android/iOS app.
So, just to be clear these are all features that compete with Azure? Could you just use Azure OpenAI libraries instead? Those would work on more platforms than Android.
You might be better off creating your own binding for this, some docs on this here:
- https://github.com/dotnet/java-interop/wiki/Troubleshooting-Android-Bindings-Issues
@jonathanpeppers I would like to better understand the criteria you use to decide when to create a binding. For example, Firebase Messaging (push notification) can also be implemented with Azure, just like Analytics/Crashlytics, yet you still chose to create a binding for the Firebase libraries.
We could create our own binding or a slim binding, but I thought it might have been useful for the .NET community.
I would like to better understand the criteria you use to decide when to create a binding
Going forward, we would like to create as few as possible. We do not have enough manpower to maintain these unless the community helps.
We are still creating some important new ones, like related to on-device AI (LLM) usage:
- https://github.com/dotnet/android-libraries/pull/1243
https://www.nuget.org/packages/HolisticWare.Firebase.AI
https://www.nuget.org/packages?q=HolisticWare.Google.MediaPipe&includeComputedFrameworks=true&prerel=true&sortby=relevance
LocalAgents is WIP (I had issues with nuget account)
And there is much more for on-device/edge AI
https://www.nuget.org/packages/HolisticWare.AI.Generative.LM.Picovoice.PicoLLM