This project is a chatbot application that allows the user to choose between two language learning models (LLMs): OpenAI and Gemini. The chatbot uses a database of documents to provide responses to user queries. The database can be rebuilt if necessary.
To set up the project, follow these steps:
- Clone the repository to your local machine.
- Install the necessary dependencies. This project requires the
openai
,google-generativeai
,gradio
,chromadb
, andllama_index
packages. You can install these with pip:pip install openai google-generativeai gradio chromadb llama_index
- Set up your environment variables. You will need to provide your OpenAI API key and Gemini API key.
To use the project, run the chatbot_gui.py
script in the /GUI
directory. This will launch a Gradio interface where you can input your message and choose your LLM.
/backend/rag_function.py
: Contains functions for checking if the database exists, rebuilding the database, and querying the engine./docs/placeholder doc.txt
: A placeholder for the project documentation./GUI/chatbot_gui.py
: Contains the main chatbot interface./llms/openai_chat.py
: Contains the function for chatting with the OpenAI model./llms/gemini_chat.py
: Contains the function for chatting with the Gemini model.
Contributions are welcome. Please submit a pull request.
This project is licensed under the terms of the MIT license.