Skip to content
/ ChatGPT Public
forked from acheong08/ChatGPT

Lightweight package for interacting with ChatGPT's API by OpenAI. Uses reverse engineered official API.

License

Notifications You must be signed in to change notification settings

OB42/ChatGPT

This branch is 1015 commits behind acheong08/ChatGPT:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5108fb3 · Jan 15, 2023
Jan 9, 2023
Dec 26, 2022
Jan 14, 2023
Jan 5, 2023
Dec 9, 2022
Dec 7, 2022
Dec 5, 2022
Dec 4, 2022
Jan 13, 2023
Dec 9, 2022
Dec 14, 2022
Dec 11, 2022
Dec 7, 2022
Jan 13, 2023

Repository files navigation

ChatGPT

PyPi PyPi

Reverse Engineered ChatGPT API by OpenAI. Extensible for chatbots etc.

Connect with me on Linkedin to support this project. (Not open for commercial opportunities yet. Too busy)

You can also follow me on Twitter to stay up to date.

Related works

These are separate works and not part of this library

Usage

Installation

pip3 install --upgrade revChatGPT

Configuration

Refer to the setup guide for more information.

Usage

python3 -m revApiGPT

HTTP POST request:

{
  "session_token": "eyJhbGciOiJkaXIiL...",
  "prompt": "Your prompt here"
}

Optional:

{
  "session_token": "eyJhbGciOiJkaXIiL...",
  "prompt": "Your prompt here",
  "conversation_id": "UUID...",
  "parent_id": "UUID..."
}
  • Rate limiting is enabled by default to prevent simultaneous requests

python3 -m revChatGPT

from revChatGPT.ChatGPT import Chatbot

chatbot = Chatbot({
  "session_token": "<YOUR_TOKEN>"
}, conversation_id=None, parent_id=None) # You can start a custom conversation

response = chatbot.ask("Prompt", conversation_id=None, parent_id=None) # You can specify custom conversation and parent ids. Otherwise it uses the saved conversation (yes. conversations are automatically saved)

print(response)
# {
#   "message": message,
#   "conversation_id": self.conversation_id,
#   "parent_id": self.parent_id,
# }

Awesome ChatGPT

My list

If you have a cool project you want added to the list, open an issue.

Disclaimers

This is not an official OpenAI product. This is a personal project and is not affiliated with OpenAI in any way. Don't sue me

Credits

About

Lightweight package for interacting with ChatGPT's API by OpenAI. Uses reverse engineered official API.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%