This is a simple chatbot for Open AI GPT4, written in Python.
This chatbot is developed in Python3, using several external libraries. Here's how you can get it set up on Ubuntu 22.04 LTS.
Firstly, install Python3 and pip if you haven't already done so:
sudo apt update
sudo apt install python3
sudo apt install python3-pipOnce the Python3 and pip are installed, you will need to install the following Python packages:
openaitkinterpython-dotenv
You can install these dependencies using pip:
pip3 install openai
sudo apt-get install python3-tk
pip3 install python-dotenvYou won't need to separately install the os, json, or time modules as they come pre-installed with Python3.
Next, clone this repository:
git clone git@github.com:Rufilla/AI-Chatbot-Python.gitRename the dotenv_template file to .env:
mv dotenv_template .envOpen the .env file with any text editor, and provide your Open AI key. It should look something like this:
OPENAI_KEY=your-key-goes-hereReplace "your-key-goes-here" with your actual Open AI key.
Now you're ready to run the program! Just use the python3 command followed by the script name:
python3 chat.pyAnd that's it - the chatbot should now be up and running.
Feel free to fork this project and make your contribution.
This project is licensed under the MIT License.
This is a basic chatbot for OpenAI and does not include any sophisticated error handling or complex features. Please use at your own discretion.
For any suggestions or feedback or if you would like to report any bugs, please contact me at: joe@rufilla.com
