@@ -6,8 +6,8 @@ Introduction
6
6
7
7
This is a basic web app that calls the ` callVertexWithRC ` function. The
8
8
function uses values stored in Remote Config server templates with
9
- the Firebase Admin SDK to change Vertex AI Gemini API parameters on the
10
- fly . Access is controlled using Firebase App Check.
9
+ the Firebase Admin SDK to dynamically update Vertex AI Gemini API
10
+ parameters . Access is controlled using Firebase App Check.
11
11
12
12
- [ Read more about Remote Config for servers] ( https://firebase.google.com/docs/remote-config/server ) .
13
13
- [ Read more about App Check] ( https://firebase.google.com/docs/app-check ) .
@@ -32,12 +32,21 @@ Get started
32
32
4 . Copy your Firebase project config and your ReCAPTCHA Enterprise site key
33
33
into the appropriate places in ` config.ts ` in this directory.
34
34
5 . In this directory, run ` npm install ` .
35
- 6 . Set up the function as described in [ ../README.md] ( ../README.md ) .
35
+ 6 . Set up and deploy the function as described in [ ../README.md] ( ../README.md ) .
36
36
7 . In this directory, run ` npm run dev ` to run the client.
37
37
38
- We recommend running and testing functions locally before deploying to Google
39
- Cloud. To run this app against the ` callVertexWithRC ` function running in an
40
- emulator, set ` testMode ` to true.
38
+ To run this app against the ` callVertexWithRC ` function running in the Firebase
39
+ emulator, ensure that ` testMode ` in ` main.ts ` is set to ` true ` . Before testing
40
+ with a deployed (i.e., not emulated) function, set ` testMode ` to ` false ` .
41
+
42
+ TIP: You can build the client and deploy to Firebase Hosting by running
43
+ ` npm run build ` from the ` client ` directory. Hosting deliverables are
44
+ generated and saved in ` client/dist ` and you can then deploy to
45
+ the emulator or Firebase Hosting from the parent directory. We recommend
46
+ deploying to the emulator first--you can use the following command to
47
+ deploy the function and web client simultaneously:
48
+
49
+ firebase serve --only functions,hosting
41
50
42
51
Support
43
52
-------
0 commit comments