Skip to main content

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

Project description

TurboGpt

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

Thank you for:
Sublime's custom image
Downloads!

TurboGpt Tutorial

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. TurboGpt 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 turbogpt

Getting the PUID & ACCESS_TOKEN

REMEMBER YOU NEED TO HAVE CHAT GPT PLUS SUBSCRIPTION TO USE THIS LIBRARY

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. Go to the network tab and click on Fetch/XHR
7. hit refresh and locate the models request
8. Copy the value of the Authorization header after berear (ey....). (this is the ACCESS_TOKEN)
9. Paste the values into the .env file like so:

ACCESS_TOKEN=AUTHORIZATION HEADER
PUID=_puid

Usage

Start a new session

from turbogpt import TurboGpt

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

image

Resume existing session

from turbogpt import TurboGpt

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

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

TurboGpt-CLI

Check out a TurboGpt 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

turbogpt-1.0.5.tar.gz (4.6 kB view details)

Uploaded Source

File details

Details for the file turbogpt-1.0.5.tar.gz.

File metadata

  • Download URL: turbogpt-1.0.5.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for turbogpt-1.0.5.tar.gz
Algorithm Hash digest
SHA256 20fd631b0a82cfddd33571acec1cea70773016afcc1d6e1e03e686de5062af88
MD5 ad61bfd1099e8ababa8154ae11b0b0c5
BLAKE2b-256 2c027ae6cdf63b3764ac02a41b0275739eb5b32e1beb693e5a60e6a9593d4821

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