ChatGPT is a reverse engineering of OpenAI's ChatGPT API
Project description
ChatGPT
Reverse Engineered ChatGPT by OpenAI. Extensible for chatbots etc.
Note: This is a proof of concept. The goal here is to be able to write bots using the API.
Features
- Scientific knowledge
- Has memory. It remembers the chat history and context
- No moderation
- Programmable
Setup
Install
pip3 install revChatGPT
Get your Bearer token
Go to https://chat.openai.com/chat and log in or sign up
- Open console with
F12
- Go to Network tab in console
- Find session request (Might need refresh)
- Copy accessToken value to config.json.example as Authorization
- Save as config.json (In current active directory)
Running
python3 -m revChatGPT
Remember to press enter twice to send the message. This allows for multi-line input.
Arguments
You can pass the output through a processor using command line arguments.
Example:
Use python3 -m revChatGPT say
to make a Mac speak the output
Development:
pip3 install revChatGPT
from revChatGPT.revChatGPT import Chatbot
import json
# Get your config in JSON
config = {
"Authorization": "<Your Bearer Token Here>"
}
chatbot = Chatbot(config, conversation_id=None)
prompt = "<Some prompt>"
response = chatbot.get_chat_response(prompt)
print(response["message"])
print(response["conversation_id"])
print(response["parent_id"])
This can be imported to projects for bots and much more. You can have multiple independent conversations by keeping track of the conversation_id.
Known issues
- Access token expires in one hour
Star History
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for revChatGPT-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a608a61df0f06fff2e7c7f09e4f25a254820f7b63db297d949c5145a0c9f6437 |
|
MD5 | 85038d7042cc93f4396cf508e64da7cd |
|
BLAKE2b-256 | ce1a9bbed4a6e3b79134b22d9224a9bbb03215a27df9bd5fb19e54b8bf61c2d7 |