Skip to main content

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

Metadata

Release files for gptx-py 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gptx-py 1.0.0
File Size Uploaded
gptx-py-1.0.0.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gptx-py 1.0.0
File Interpreter ABI Platform
gptx_py-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.5 kB

Release files / gptx-py-1.0.0.tar.gz

Download URL gptx-py-1.0.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0d4e8bf3b1d1c3b94cd8317037393867188d0c7aef6f978e78439910d7c93227
BLAKE2b-256 checksum
How to use checksums
10dddeb95a817ee11a30a0ccea6fc2cf90d628db6e7b08ee2c9089b031f07d21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.6

Release files / gptx_py-1.0.0-py3-none-any.whl

Download URL gptx_py-1.0.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77905c3aef192cf1615874c25074c48d0f9a7ac3f41063508d7877d2a0b44037
BLAKE2b-256 checksum
How to use checksums
37fc142615b7c66fa40b79f5235fa5fff123f10c9921c053d8e73d9b6f60a5c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.6

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page