Doc-Bot is an interactive document chatbot built using the Streamlit framework and the OpenAI API. Its main purpose is to help users understand their documents by summarizing them and allowing them to ask questions about their content.
To run Doc-Bot, you need to have Python 3 installed on your machine, as well as the following packages:
- streamlit
- datetime
- streamlit_chat
- llama_index
You can install these packages using the following command:
pip install -r requirements.txt
To use Doc-Bot, you need to run the doc_bot.py file in your terminal or IDE. This will start a Streamlit web application that you can access in your browser at http://localhost:8501.
Once the app is running, you can upload a document in the supported formats (.docx, .doc, or .pdf) by clicking on the "Upload your doc" button. Doc-Bot will then summarize the document and index its content using the GPTSimpleVectorIndex algorithm from the llama_index package.
You can then type a question or query in the input text box and click on the "Send" button to get a response from Doc-Bot. The bot will use the OpenAI API to generate a response based on the indexed content of the document.
Doc-Bot will also display a chat log of all the messages exchanged between the user and the bot, including the time and date of each message.
Doc-Bot was built by Shashank Vats as a demo project using the Streamlit framework, the OpenAI API, and the llama_index package.