This chatbot contains 2 parts, the index and the chat model. For the index, SentenceTransformers from HuggingFace have been used.
To install all the requirements, run the following command in the terminal:
pip install -r requirements.txtFor text files (.txt, .rtf), use indexing.py.
For PDFs, use pdf_loading.ipynb
Both of them use SentenceTransformers to create the embeddings, which are free and do not require an API key.
All code for the chatbot is in main.py. Google's Gemini model is used, which is free up to 60 queries per minute. However, an API key is needed and can be acquired from Google AI Studio