Skip to content

vrcxz/ChatGPT-FLTK-Simple-Chatbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple-Chatbox-with-ChatGPT-API-FLTK

Chatbox GitHub top language Bitbucket open issues

A simple chatbox application that utilizes the OpenAI ChatGPT API, with cURL and JSON libraries for api communication and fltk for the GUI.

Snapshots

 Preview .  Preview  Preview

Running the program

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.


Dependencies

Installing C++

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

Installing curl

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

Installing nlohmann/json

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>

Installing FLTK

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

About

A simple chatbox that utilizes the OpenAI ChatGPT API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages