A web based chat box by using ChatGPT API.
The web framework uses Volt Dashboard Flask. Please check source code on flask-volt-dashboard.
Chat box html template and css style is borrowed from studygyaan.com by H Sayyed.
- 👉 For using
text-davinci-003
, check chatGptDavinci.py - 👉 For using
gpt-3.5-turbo
, check chatGptTurbo.py - 👉 Using this app needs user log in. To enable new user register, comment out "register" block in file login.html
- 👉 When debugging on frontend/backend connetivity and other UI related stuff, set
FAKE_CHAT = True
in chatGptDavinci.py or chatGptTurbo.py, this will gernerate some ramdon string as response instead of using ChatGPT API, to save API calling charged by OpenAI.
Check host.and.docker.dual.mode.md
$ docker-compose up --build (first time running)
Or
$ docker-compose up
(first activate python virturalenv)
$ flask run -p port_num -h host_ip