An unofficial Python wrapper for OpenAI's ChatGPT API
An unofficial Python wrapper for OpenAI's ChatGPT API
I stopped maintaining this project as ChatGPT now has an official API. See OpenAI API for more details. Feel free to fork this project if you want to continue development.
An unofficial Python wrapper for OpenAI's ChatGPT API
undetected_chromedriverSince version 0.3.0, this library is using only the
undetected_chromedriverto bypass Cloudflare's anti-bot protection.requestsmodule is no longer used due to the complexity of the protection. Please make sure you have Google Chrome / Chromium before using this wrapper.
pip install -U pyChatGPT
F12.__Secure-next-auth.session-token cookie in Application > Storage > Cookies > https://chat.openai.com.Cookie Value field.python3 -m pyChatGPT
…
# install chromium & X virtual framebuffer
sudo apt install chromium-browser xvfb
# start your script
python3 your_script.py
It is normal for the seession to crash when installing dependencies. Just ignore the error and run your script.
# install dependencies
!apt install chromium-browser xvfb
!pip install -U selenium_profiles pyChatGPT
# install chromedriver
from selenium_profiles.utils.installer import install_chromedriver
install_chromedriver()
# start your script as normal
!python3 -m pyChatGPT
This project is inspired by
This project is not affiliated with OpenAI in any way. Use at your own risk. I am not responsible for any damage caused by this project. Please read the OpenAI Terms of Service before using this project.
This project is licensed under the GPLv3 License - see the LICENSE file for details.
No open issues yet, or sync has not completed.