Skip to main content

An unofficial API allowing free interaction with ChatGPT in Python

Project description

pyGPT

Tag Downloads

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")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyGPT-api-0.1.3.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyGPT_api-0.1.3-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file pyGPT-api-0.1.3.tar.gz.

File metadata

  • Download URL: pyGPT-api-0.1.3.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for pyGPT-api-0.1.3.tar.gz
Algorithm Hash digest
SHA256 113acf127579ba91f904bda5e46c68290df1a26bed90648d5e848baa910eb5b2
MD5 0682057e56c5f77823b53bbd79a95d8c
BLAKE2b-256 8a9095bd9d340fe248d51fb6f6639e1544c8ec8e7b2902f6acb10dc5d71d919c

See more details on using hashes here.

File details

Details for the file pyGPT_api-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pyGPT_api-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for pyGPT_api-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6c6f2b550fa258eb54c8543fc84abaee12c49d1c6e9b4d5721d78f26f1aee13c
MD5 e9a74613e4b28ea2467905257b79b278
BLAKE2b-256 4a33985590229ec1d7e6ed101517a05f86107784723194479ffaa16ca875d09f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page