This is an AI Chatbot which you can put in your website. It uses JSON arrays to handle user requests and displays its answers in a custom chatbot container. It has no memory nor the chats are saved.
Simple. Just prompt a question and the chatbot will check if it has that answer. If so, he will respond. Else it will display an "I do not understand " message.
You must have the following packages installed so that the project can serve and work properly:
gcc
gcc-12
g++
build-essential
libasio-dev
nlohmann-json3-dev
cmake
Crow
and all of the recommended packages from the ones above. Crow must be installed through git as shown below in the installation section.
-
Clone this git repo
git clone https://github.com/E9cipher/ai_chatbot.gitor download the ZIP folder
-
Install dependences Ubuntu/Debian
apt update && apt install gcc gcc-12 g++ build-essential libasio-dev nlohmann-json3-dev cmakeArch Linux
pacman -S gcc gcc-12 g++ build-essential libasio-dev nlohmann-json3-dev cmakeFedora
dnf install gcc gcc-12 build-essential libasio-dev nlohmann-json3-dev cmake -
Clone Crow repo
git clone https://github.com/CrowCpp/Crow.git cd Crow mkdir build && cd build cmake .. && make make installYou must make sure you have the requirements shown above. Else, the project won't serve properly. Even though it seems strange, you must remove the
builddirectory and create it again. Exit process with Ctrl C. Note:makeusually takes time if it's your first installation. To speed this process, instead of running simplymakerunmake -j$(nproc), which speeds up the process by taking all CPU cores avaliable but it will freeze your system. -
Open a browser and navigate to
http://localhost:8080/.
For a fast file modifying, I recommend to modify the files while the server is running. If you want to modify server.cpp you will have to compile everything again
This project has an Apache 2.0 LICENSE.