Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 1.95 KB

File metadata and controls

52 lines (38 loc) · 1.95 KB

Firebase AI Quickstart

This sample demonstrates how to make calls to the Gemini API via Firebase directly from your app, rather than server-side, using the Vertex AI for Firebase SDK.

Getting Started

Clone and open the sample project

  1. Clone this repo.
  2. Change into the firebaseai directory.
  3. Open FirebaseAIExample.xcodeproj using Xcode.
    git clone https://github.com/firebase/quickstart-ios.git
    cd quickstart-ios/firebaseai
    open FirebaseAIExample.xcodeproj
  4. Select the FirebaseAIExample (iOS) scheme in Xcode to build the app using the Swift Package Manager distribution.

Connect the sample to your Firebase project

To have a functional application, you will need to connect the Firebase AI sample app to your Firebase project (or create a new project):

  1. Follow the instructions in Set up a Firebase project and connect your app to Firebase.
  2. Add an iOS+ app to your project. Make sure the Bundle Identifier you set matches the one in the sample.
    • The default bundle ID is com.google.firebase.quickstart.FirebaseAIExample
  3. Download the GoogleService-Info.plist for the app when prompted and save it to the firebaseai directory.

You should now be able to build and run the sample!

Request logging

The -FIRDebugEnabled option is set as a command line argument in the build scheme to log server requests to the console. Remove the option to turn off the logging.

Documentation

To learn more about the Firebase AI SDK, check out the documentation.

Support