Python SDK for OpenAI's ChatGPT
Top 60.7% on sourcepulse
This Python SDK provides an unofficial interface to OpenAI's ChatGPT, enabling developers to easily integrate conversational AI into their applications. It supports both a command-line interface (CLI) and a programmatic SDK, offering features like conversation context management and streaming responses.
How It Works
The SDK interacts with ChatGPT by leveraging user credentials (email and password) for authentication. It manages conversation history and allows for streaming responses, which is recommended for a better user experience. The library also includes error handling for various API and connection issues.
Quick Start & Requirements
pip install -U chatgpt
config.json
file with email
and password
. Proxies and other parameters like timeout
and cache_file_path
are optional.CHATGPT_HOME
can set the default configuration directory.Highlighted Details
INVALID_ACCESS_TOKEN
, LOGIN_ERROR
).Maintenance & Community
No specific contributors, sponsorships, or community links (Discord/Slack) are mentioned in the README.
Licensing & Compatibility
The README does not specify a license.
Limitations & Caveats
This is an unofficial SDK, meaning it is not supported by OpenAI and may break if OpenAI changes its API or authentication methods. The reliance on email/password authentication might be less secure than official API keys.
2 years ago
1 day