This project I show how to integrate GPT-4 in a python project as a chatbot. I'll be implementing upload and files generations by prompt in the chatbot.
- Interactive ChatGPT-based chatbot.
- Compatible with the latest update of ChatGPT (Update Date: [date of update]).
- Option to upgrade to ChatGPT-4 model for enhanced performance.
- Python 3.x
- OpenAI API key
- Clone the repository or download the source code.
- Install OpenAI Python library:
pip install openai
Run the script:
python my-chatbot.py
To use chatgpt 4 instead 3.5 you need to change this part of code:
model="gpt-4-vision-preview", # Updated to ChatGPT-4 model
To use chatgpt 4 instead 3.5 you need to change this part of code:
model="gpt-3.5-turbo", # Updated to ChatGPT-3.5 model