A simple chatbox application that utilizes the OpenAI ChatGPT API, with cURL and JSON libraries for api communication and fltk for the GUI.
g++ -o main main.cpp -lcurl -lfltk -lfltk_images
Notes: Before running, make sure to add your api key to the string variable apiKey at the top of the program. Otherwise, curl wouldn't be able to connect to chatGPT.
C++ is usually pre-installed in most Linux distributions. To check if you have C++ installed, open the terminal and run the following command:
g++ -v
If you do not have C++ installed, you can install it by running the following command:
sudo apt-get update
sudo apt-get install build-essential
Curl is a network transfer library used to retrieve data from web servers. You can install curl by running the following command:
sudo apt-get update
sudo apt-get install curl libcurl4-openssl-dev
nlohmann/json is a header-only library for JSON data format in C++. It is easy to use and does not require any additional installation. To use the library in your project, simply include the following line in your code:
#include <nlohmann/json.hpp>FLTK (Fast Light Toolkit) is a C++ graphical user interface library. You can install FLTK by running the following command:
sudo apt-get update
sudo apt-get install libfltk1.3-dev


