This is a basic web app that calls the callVertexWithRC function. The
function uses values stored in Remote Config server templates with
the Firebase Admin SDK to change Vertex AI Gemini API parameters on the
fly. Access is controlled using Firebase App Check.
- Read more about Remote Config for servers.
- Read more about App Check.
- Read more about the Vertex AI Node.js Client library.
Important: Vertex AI and Cloud Functions require a billing account. Review Vertex AI pricing and Firebase pricing before running this function. If you're new to Firebase and Google Cloud, check to see if you're eligible for a $300 credit and a Free Trial Cloud Billing account.
- Create a Firebase project and register a web app.
- Create a ReCAPTCHA Enterprise key in the same project.
- Enable App Check in the Firebase console with the ReCAPTCHA Enterprise site key you created.
- Copy your Firebase project config and your ReCAPTCHA Enterprise site key
into the appropriate places in
config.tsin this directory. - In this directory, run
npm install. - Set up the function as described in ../README.md.
- In this directory, run
npm run devto run the client.
We recommend running and testing functions locally before deploying to Google
Cloud. To run this app against the callVertexWithRC function running in an
emulator, set testMode to true.
© Google, 2024. Licensed under an Apache-2 license.