Package: revChatGPT-ucafe
ChatGPTReverse Engineered ChatGPT API by OpenAI. Extensible for chatbots etc.Support my workMake a pull request and fix my bad code.Discord community:https://discord.gg/WMNtbDUjUvV1 Standard ChatGPTUpdate 2023/02/14 9:00 PM GMT+8: It is working. Use this.Installationpip3 install revChatGPTConfigurationCreate account onOpenAI's ChatGPTSave your email and passwordAuthentication method: (Choose 1)Email/PasswordNot supported for Google/Microsoft accounts{"email":"email","password":"your password"}Session tokenComes from cookies on chat.openai.com as "__Secure-next-auth.session-token"{"session_token":"..."}Access tokenhttps://chat.openai.com/api/auth/session{"access_token":"<access_token>"}Optional configuration:{"conversation_id":"UUID...","parent_id":"UUID...","proxy":"...","paid":false}Save this as$HOME/.config/revChatGPT/config.jsonIf you are using Windows, you will need to create an environment variable namedHOMEand set it to your home profile for the script to be able to locate the config.json file.UsageCommand linepython3 -m revChatGPT.V1!help - Show this message
!reset - Forget the current conversation
!config - Show the current configuration
!rollback x - Rollback the conversation (x being the number of messages to rollback)
!exit - Exit this programDeveloper APIBasic example (streamed):fromrevChatGPT.V1importChatbotchatbot=Chatbot(config={"email":"<your email>","password":"<your password>"})print("Chatbot: ")prev_text=""fordatainchatbot.ask("Hello world",):message=data["message"][len(prev_text):]print(message,end="",flush=True)prev_text=data["message"]print()Basic example (single result):fromrevChatGPT.V1importChatbotchatbot=Chatbot(config={"email":"<your email>","password":"<your password>"})prompt="how many beaches does portugal have?"response=""fordatainchatbot.ask(prompt):response=data["message"]print(response)All API methodsRefer to thewikifor advanced developer usage.V2 Fast ChatGPT APIUnder maintenanceUsing cloudflare bypass server (no browser on server either). Check out the server source code:https://github.com/acheong08/ChatGPT-Proxy-V2NoticesIt seems I wasn't clear enough in my explanations and lead to some misunderstandings:Your email and password are not sent to me. Authentication is done locally withhttps://github.com/acheong08/OpenAIAuthUnless you use--insecure-auth. This is meant for users who are blocked from accessing OpenAI websitesThe server is open source:https://github.com/acheong08/ChatGPT-Proxy-V2but with aconfig.jsonmissing to avoid OpenAI detection.Rate limits: 180 requests per minute (IP based)I am running the server right nowIMPORTANTYou must either define--paidin command line orpaid=Truein code if you have a plus subscription.Usagepip3 install --upgrade revChatGPT$ python3 -m revChatGPT.V2 -h

        ChatGPT - A command-line interface to OpenAI's ChatGPT (https://chat.openai.com/chat)
        Repo: github.com/acheong08/ChatGPT

usage: V2.py [-h] [-e EMAIL] [-p PASSWORD] [--paid] [--proxy PROXY] [--insecure-auth]
             [--session_token SESSION_TOKEN]

options:
  -h, --help            show this help message and exit
  -e EMAIL, --email EMAIL
                        Your OpenAI email address
  -p PASSWORD, --password PASSWORD
                        Your OpenAI password
  --paid                Use the paid API
  --proxy PROXY         Use a proxy
  --insecure-auth       (Deprecated)
  --session_token SESSION_TOKEN Alternative to email and password authentication. Use this if you have Google/Microsoft account.DevelopersWiki:https://github.com/acheong08/ChatGPT/wiki/V2Example code:fromrevChatGPT.V2importChatbotasyncdefmain():chatbot=Chatbot(email="...",password="...")asyncforlineinchatbot.ask("Hello"):print(line["choices"][0]["text"].replace("
",""),end="",flush=True)print()if__name__=="__main__":importasyncioasyncio.run(main())Awesome ChatGPTMy listIf you have a cool project you want added to the list, open an issue.DisclaimersThis is not an official OpenAI product. This is a personal project and is not affiliated with OpenAI in any way. Don't sue meCreditsvirtualharby- Memes for emotional supportAll contributors- Pull requests