Skip to content

kevyourdev/GPT-4-Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

GPT-4 Chatbot

A simple command line chatbot with GPT-4.

Setup

You need to create a virtual env and install the packages listed in requirements.txt. You can then run Jupyter Notebooks in VS Code.

Follow these steps: How to Work with Python Virtual Environments, Jupyter Notebooks and VS Code.

You need to create a .env file with your OPENAI_API_KEY.

Usage

To run the CLI:

cd 02-gpt-4-chatbot
python3 chatbot.py

You can define the personality of your chatbot, it is friendly and helpful by default:

python3 chatbot.py --personality "funny"

You can quit by typing ctrl + C (Mac) or cmd + C (Windows).

Features

  • writing the basic chatbot structure.
  • persisting messages accross requests.
  • adding optional personalities.
  • colorizing the chatbot output.

Based on Mastering OpenAI Python APIs: Unleash the Power of GPT4 by Colt Steele (2023).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages