- Notifications
You must be signed in to change notification settings - Fork16
License
NotificationsYou must be signed in to change notification settings
google-gemini/angular-docs-rag-sample
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Developer sample written in Angular demonstrating how developers might ingest developer docs and make the content accessible to Gemini via RAG (Retrieval Augmented Generation). The ingested content is accessible in the sample through an Angular chatbot.

chat-demo.mov
This project was generated withAngular CLI and usesDocsAgent, to impliment RAG (Retrieval Augmented Generation) with Gemini and create a domain-specific expertise chatbot. This sample uses Googles Semantic Revtriever API and Generative Language APIs as well as an AQA (Attributed Questions and Answer) model with Gemini Pro.
For more information on Angular, visitangular.dev.
- Create a personal fork of the project on GitHub, then clone the fork on your local machine.
- Run
npm run ito install the dependencies required to run the server. - [IMPORTANT!!] This demo needs a Gemini API to run. Go toGoogle AI Studio to get an API key then add it to the Firebase Function in
functions/.env. This demo simulates how you might store and protect a private Gemini API key in a real world app. - [IMPORTANT!!] This demo relies on a
CORPUS_NAMEfrom Docs Agent, then authenticates with aservice_account_key.json. SeeDocsAgent Set Up guide to set up your own corpus and authentication. You'll need to replacefunctions/service_account_key.jsonwith the one provided to you by Google Cloud, and then make sure to march theCORPUS_NAMEinfunctions/to your uploaded corpus id. - Run
ng run angular-chatbot:serveto run the server. Since we're using Firebase Functions, you'll need to run our functions and the app in a Firebase Emulator, this command does this automatically! - Open a browser tab tohttp://localhost:4200. The app will automatically reload if you change any of the source files.
About
No description, website, or topics provided.
Resources
License
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.