pyGPT
An (unofficial) ChatGPT API made by yoinking code from revChatGPT and adapting it to use tls-client.
Installation
pip install pyGPT_api
Getting started
An access token is required for this package to run correctly. You can get yours here or open the chat.openai.com webpage, access the developer console, and get the token from Application -> Cookies -> __Secure-next-auth.session-token.
Below is a basic example that will let you converse with ChatGPT as much as you'd like.
from pyGPT_api import AI
ai = AI("your_token_here")
while True:
message = ""
for data in ai.send_message(input(" > ")):
message = data["message"]
print("\nChatGPT:", message, "\n")
Metadata
Release files for pyGPT-api 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyGPT-api-0.1.3.tar.gz | 4.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyGPT_api-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.6 kB
Release files / pyGPT-api-0.1.3.tar.gz
| Download URL | pyGPT-api-0.1.3.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
113acf127579ba91f904bda5e46c68290df1a26bed90648d5e848baa910eb5b2
|
|
BLAKE2b-256 checksum How to use checksums |
8a9095bd9d340fe248d51fb6f6639e1544c8ec8e7b2902f6acb10dc5d71d919c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / pyGPT_api-0.1.3-py3-none-any.whl
| Download URL | pyGPT_api-0.1.3-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c6f2b550fa258eb54c8543fc84abaee12c49d1c6e9b4d5721d78f26f1aee13c
|
|
BLAKE2b-256 checksum How to use checksums |
4a33985590229ec1d7e6ed101517a05f86107784723194479ffaa16ca875d09f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|