Python wrapper for OpenAI's ChatGPT API
Top 30.4% on sourcepulse
This project provides an unofficial Python wrapper for OpenAI's ChatGPT API, designed for developers and researchers needing programmatic access to ChatGPT. It aims to bypass Cloudflare's anti-bot protection and supports various authentication methods, including session tokens and direct login with Google, Microsoft, or OpenAI accounts, with options for captcha solving.
How It Works
The library leverages undetected_chromedriver
to circumvent Cloudflare's anti-bot measures, a significant advantage over simpler request-based wrappers. It supports direct login via Google, Microsoft, or OpenAI credentials, with experimental features for captcha solving using services like 2Captcha or PyPasser. The architecture allows for proxy usage, custom Chrome arguments, and session token management for authentication.
Quick Start & Requirements
pip install -U pyChatGPT
__Secure-next-auth.session-token
cookie from the ChatGPT web interface or using login credentials. Running on headless Linux requires xvfb
and chromium-browser
.Highlighted Details
undetected_chromedriver
.Maintenance & Community
The project's original author has stopped maintenance, recommending users switch to the official OpenAI API. The repository is open for forking and continued development.
Licensing & Compatibility
Limitations & Caveats
The project is explicitly marked as unmaintained by its original author, who directs users to the official OpenAI API. The experimental login methods and captcha solvers may be unstable or break with API changes.
1 year ago
1 day