Harnessing the power of the Google Gemini API, HistoryVerse-Chatbot brings you a versatile and customizable AI assistant.
- Chat with Your Data: Interact directly with your own documents and files.
- Chat with Images: Ask questions about images you provide.
- Voice Recognition: Speak your questions and receive spoken responses.
- Generate Answers from the Internet: Get answers to your questions by tapping into the vast knowledge of the web.
- Customization: Modify the prompt used for internet searches to tailor the type of responses you receive. Control the scope and style of the answers by providing specific instructions.
- Chat with Memory: The chatbot can remember past interactions, making conversations more natural and engaging.
-
Clone the Repository: Use git to clone the repository:
git clone https://github.com/PHD-Team/HistoryVerse-Chatbot.git -
Virtual Environment: Create and activate a new virtual environment with Python 3.10.0 (or a compatible version).
-
Install Dependencies: Install all required packages using pip:
python -m pip install -r requirements.txt -
Google API Key:
- Obtain your Google API key from [https://ai.google.dev/].
- Store the key in a
.envfile within the project directory.
-
OpenAI API Key (for Voice Recognition):
- Obtain your OpenAI API key from [https://platform.openai.com/account/api-keys].
- Store the key in a
constants.pyfile within the project directory. - Inside
constants.py, replacingput your openai api keywith your actual key.
-
Data Ingestion:
- Place your data files (documents, text, etc.) in the
SOURCE_DOCUMENTSfolder. - You can organize multiple folders within
SOURCE_DOCUMENTS, and the code will recursively read all files. - To ingest your data, run the command:
python ingest.py
- Place your data files (documents, text, etc.) in the
-
Chatting with Your Data: To interact with your uploaded data only, run:
python gemini_data_chat.py -
Chatting with the Internet (with Customization):
- To use the internet for answers and customize the type of questions it can handle, run:
python gemini.py - Customization: The prompt used to query the internet can be adjusted in the
gemini.pyfile. - By modifying the
promptstring, you can provide context, instructions, or limitations to the AI, ensuring it answers questions within your desired scope.
- To use the internet for answers and customize the type of questions it can handle, run: