Skip to content

The app fails to run as expected #111

@dailystudio

Description

@dailystudio

I followed the steps outlined in the README.md:

  1. Cloned the repository
  2. Opened it in Android Studio
  3. Set up a Firebase project and downloaded the google-services.json file
  4. 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:

  1. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions