You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# "Planning with the Gemini API" - a Firebase AI sample app
2
2
3
-
Welcome to the _Make It So_ sample app, an AI-powered web app for to-do lists!
4
-
It's an [Angular](https://angular.io/) app built using the Gemini API and Firebase.
3
+
Welcome to the _Planning with the Gemini API_ sample app, an AI-powered web app
4
+
for to-do lists! It's an [Angular](https://angular.io/) app built using the
5
+
Gemini API and Firebase.
5
6
6
7
The [Gemini API](https://ai.google.dev/gemini-api) gives you access to Google's latest
7
-
generative AI models – the Gemini family of multimodal models. This _Make It So_ web app
8
-
calls the Gemini API to generate a task list from either text or an image provided by
9
-
the end user.
8
+
generative AI models – the Gemini family of multimodal models.
9
+
This _Planning with the Gemini API_ web app calls the Gemini API to generate a task list
10
+
from either text or an image provided by the end user.
10
11
11
-
The backend of _Make It So_ is powered by [Firebase](https://firebase.google.com/),
12
-
which is Google's platform for building fullstack multi-platform apps. This app uses
12
+
The backend of _Planning with the Gemini API_ is powered by
13
+
[Firebase](https://firebase.google.com/), which is Google's platform for
14
+
building fullstack multi-platform apps. This app uses
13
15
[Firebase Authentication](https://firebase.google.com/products/auth) for signing-in
14
16
and authorizing end users. It also uses
15
17
[Firestore](https://firebase.google.com/products/firestore) – a NoSQL realtime database –
16
18
to store the to-do list items.
17
19
18
-
> [!CAUTION]
19
-
> **In its default state, this sample app is for _experimentation and prototyping only_.**
20
+
> [!CAUTION] > **In its DEFAULT state, this sample app is for _EXPERIMENTATION and PROTOTYPING ONLY_.**
20
21
> It uses the [Google AI SDK for JavaScript](https://ai.google.dev/gemini-api/docs/quickstart?lang=web)
21
22
> directly from the client-side which means that you risk potentially exposing your
22
23
> Gemini API key to malicious actors if you deploy this app.
23
-
>
24
+
>
24
25
> If you want to deploy this sample app or use it as a base for a production app,
25
26
> **we strongly recommend that you
26
27
> [migrate to use the Vertex AI in Firebase SDK](https://github.com/FirebaseExtended/make-it-so-angular/main/README.md#migrate-to-use-vertex-ai-in-firebase),
27
28
> which offers security options against unauthorized clients.**
28
29
29
30
## Explore the app's codebase
30
31
31
-
* In `src/environments/environments.ts`, you can find important configuration values:
32
+
- In `src/environments/environments.ts`, you can find important configuration values:
32
33
33
-
* Within `firebase`, find the values needed to connect your app to Firebase
34
+
- Within `firebase`, find the values needed to connect your app to Firebase
34
35
(most importantly `apiKey`, `projectId`, and `appId`).
35
-
* Find your Gemini API key (`gemini_api_key`).
36
+
- Find your Gemini API key (`gemini_api_key`).
36
37
37
38
Note that if you
38
39
[run the sample app in IDX](https://github.com/FirebaseExtended/make-it-so-angular/main/README.md#set-up-and-run-the-app),
39
40
then these config values will be automatically populated into the file for you.
40
41
41
-
* In `src/app/services/task.service.ts`, you can explore how to make a basic call to
42
+
- In `src/app/services/task.service.ts`, you can explore how to make a basic call to
42
43
the Gemini API, including:
43
44
44
-
* Importing the Google AI package: `google/generative-ai`.
45
-
* Initializing the Google AI service and the generative model.
46
-
* Calling `generateContent` to send the request to Gemini with the provided prompt
45
+
- Importing the Google AI package: `google/generative-ai`.
46
+
- Initializing the Google AI service and the generative model.
47
+
- Calling `generateContent` to send the request to Gemini with the provided prompt
47
48
(and image, if provided).
48
49
49
-
* In `src/app/app.config.ts` and `src/app/services/task.service.ts`, you can explore
50
+
- In `src/app/app.config.ts` and `src/app/services/task.service.ts`, you can explore
0 commit comments