This repository serves the purpose of creating a personalized bot for a company based on the provided documentation.
To set up the project, the following steps should be followed:
-
Repository Cloning
- Begin by cloning the repository to your local machine by executing the following command:
git clone <repository_url>
- Begin by cloning the repository to your local machine by executing the following command:
-
Document Preparation
- The necessary documents should be placed within the
data/rawdirectory inside the repository. Supported file formats include TXT, HTML, and MD.
- The necessary documents should be placed within the
-
Global Line Regex Configuration
- If your documents are extensive, the regex pattern utilized for paragraph segmentation in the global configuration file can be modified. However, for shorter files where processing as a whole is preferred, set the
always_get_full_filesparameter in the global configuration to 'True'.
- If your documents are extensive, the regex pattern utilized for paragraph segmentation in the global configuration file can be modified. However, for shorter files where processing as a whole is preferred, set the
-
Prompt Customization
- Adjust the prompt within
config/chatgpt_configto align with your specific requirements. A sample configuration is provided for a fictional company. Furthermore, ensure to set your API Key for Open AI.
- Adjust the prompt within
-
API or Telegram Bot Integration Selection
- In the
config/global_configfile, set theenable_apiandenable_telegramparameters in accordance with your needs.
- In the
-
Telegram Bot Configuration
In the
telegram_configfile, there are several parameters available for customization:- token: Your token for the Telegram bot
- bot_username: The name of your bot on Telegram
- allow_only_whitelist: Only individuals on the whitelist will be permitted to interact with the bot
- send_source_text_as_file: The bot sends files containing the part of the documentation from which the answer was derived
- whitelist: Two lists containing IDs that the bot will accept
-
Docker Container Building
- Generate the Docker containers using the subsequent command:
docker-compose build
- Generate the Docker containers using the subsequent command:
-
Application Launch
- Start the application by running Docker Compose:
docker-compose up
- Start the application by running Docker Compose:
The project is now configured and ready for utilization.