Skip to main content

A python based wrapper for GPT-4 & GPT-3.5 PLUS.

Project description

GPTX

A python based wrapper for GPT-4 & GPT-3.5 PLUS.

Benefits and why.

There is currently no way to use GPT-4 outside the online chat.openai.com interface. This wrapper allows you to use GPT-4 in your own projects.
the current API is extremely slow and even if you have premium it does not speed up the response time. GPTX does not use the API and instead uses the same interfaces as the chat.openai.com website. This means that you can use GPT-4 and GPT-3.5 PLUS in your own projects without having to wait 20+ seconds for a response.

Install

To use GPT-4 you need to have a GPT PLUS subscription. If you don't, you can get one here.

pip install GPTXPy

Getting the PUID & ACCESS_TOKEN

1. Head over to https://chat.openai.com/chat
2. Open the developer console (F12)
3. Go to the application tab
4. Go to local cookies
5. Copy the value of the _puid cookie
6. Copy the value of the __Secure-next-auth.session-token cookie
7. Paste the values into the .env file like so:

ACCESS_TOKEN=__Secure-next-auth.session-token cookie
PUID=_puid

Usage

from gptx import GPTX

gptx = GPTX(model="gpt-4")  # or "text-davinci-002-render-sha" (default)(AKA GPT-3.5)
session = gptx.start_session()
q = gptx.send_message(input(">>> "), session)
print(q['message']['content']['parts'][0])

image

Info

✅ - cloudflare bypassed
✅ - automatic refresh of _puid
✅ - GPT-4 Support
✅ - GPT-3.5 PLUS Support
✅ - GPT-3.5 Support (Free)
✅ - Fast
✅ - Easy to use
✅ - No API
✅ - No rate limits
✅ - No waiting
✅ - Back and forth conversation support

GPTX-CLI

Check out a GPTX based CLI here

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

gptx-py-1.0.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

gptx_py-1.0.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file gptx-py-1.0.0.tar.gz.

File metadata

  • Download URL: gptx-py-1.0.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for gptx-py-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0d4e8bf3b1d1c3b94cd8317037393867188d0c7aef6f978e78439910d7c93227
MD5 244bf9282982e4fed1f4a9f8f0f9fa34
BLAKE2b-256 10dddeb95a817ee11a30a0ccea6fc2cf90d628db6e7b08ee2c9089b031f07d21

See more details on using hashes here.

File details

Details for the file gptx_py-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: gptx_py-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for gptx_py-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 77905c3aef192cf1615874c25074c48d0f9a7ac3f41063508d7877d2a0b44037
MD5 b2457c73b2056f0526c0df9cbaefc158
BLAKE2b-256 37fc142615b7c66fa40b79f5235fa5fff123f10c9921c053d8e73d9b6f60a5c0

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