-
Notifications
You must be signed in to change notification settings - Fork 265
Description
I followed the steps outlined in the README.md:
- Cloned the repository
- Opened it in Android Studio
- Set up a Firebase project and downloaded the
google-services.jsonfile - Enabled the Vertex AI API
At this point, the app compiled successfully. However, when I tried to run it, I encountered the following error:
com.google.firebase.ai.type.ServerException: Firebase AI Logic is missing a configured Gemini Developer API key.
Upon inspecting FirebaseAiDataSource.kt at line 253, I found the following code:
val model = Firebase.ai(backend = GenerativeBackend.googleAI()).generativeModel(
modelName = remoteConfigDataSource.getImageGenerationEditsModelName(),
generationConfig = generationConfig {
responseModalities = listOf(
ResponseModality.TEXT,
ResponseModality.IMAGE,
)
},
)Since this uses the Google Developer API, I updated it to use the vertexAI() backend instead. Unfortunately, the error persisted. As a next step, I enabled the Gemini Developer API in the Firebase console:
- Enabled the Gemini Developer API in the Firebase project
After doing so, I attempted to run the app again, but it failed with a different error message:
com.google.firebase.ai.type.ServerException: models/androidify is not found for API version v1main, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.
I suspect this is due to the fact that the models/androidify model is not available in my Vertex AI model registry.
Could you help me determine what additional steps are required to run the app successfully?