Backend repository for Vara.
- Vara Chatbot
- Clone the repository:
git clone https://github.com/VaraEco/Vara-BE.git
- Navigate to the project directory:
cd Vara-BE - Install dependencies:
pip install -r requirements.txt
- Configure environment variables:
PINECONE_API_KEY='' AWS_ACCESS_KEY_ID='' AWS_SECRET_ACCESS_KEY=''
- Run:
python app.py
The backend currently only supports the chatbot functionality. The chatbot can be used to query the data inside the Green House Gas (GHG) Protocol document. We use the Pinecone vector database to house the chunks of the GHG protocol document. We used AWS Bedrock to provision the Large Language Model (LLM). When the user enters their query on the frontend, the query is redirected to this backend. We currently support chat history upto 6 previous conversations. The new query is transformed (if needed) considering the history. The transformed query is then used to retrieve the 4 most similar chunks from the GHG protocol document. This reetireved context along with the query is then passed to our LLM to generate a response which is then sent back to the frontend.