Skip to content

Create a custom RAG chatbot using Google Gemini and ChromaDB! Workshop created for CSEED x Dubhacks 2024

Notifications You must be signed in to change notification settings

EliasBelz/dubhacks24-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSEED x DUBHACKS 2024 Workshop

Make a custom chatbot with Streamlit, Gemini, and ChromaDB! Slides linked here!
Alt text

Setup

To set up the project, follow these steps:

  1. Create a Virtual Environment:

     python3 -m venv venv
     # for window
     .\venv\Scripts\activate
     # for mac/linux
     source venv/bin/activate
    
     pip install -r requirements.txt
  2. Create google API key and add it to the .env file:

  • Create a new project in the Google https://ai.google.dev/gemini-api/docs/api-key
  • Click the get a gemini api key button
    Alt text
  • Click create a new api key button
    Alt text
  • Create a new api project if needed or select an existing one
    Alt text
  • This will generate a API key, copy this key
  • Create a new file named .env in the root of the project and add the following line:
    API_KEY=<YOUR_API_KEY>
  1. Start Streamlit:

    streamlit run chat.py
  2. Customize the chatbot!:

    • Select a dataset from /data and copy the file path to the FILE_PATH variable in load_data.py. Then run python3 load_data.py to load the data into chromadb.
    • Uncomment the chromadb lines at the top of chat.py to link the database.
    • Modify the chat.py file to customize the chatbot and make it your own! Use the query_db function to query the database and return results to the llm.

Ideas!

  • Ski shop chatbot
  • Beanie baby personality test
  • CSE course recommender

Resources

About

Create a custom RAG chatbot using Google Gemini and ChromaDB! Workshop created for CSEED x Dubhacks 2024

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages