A Python Client to interact with OpenAI's ChatGPT(GPT-3) model without authentication
Project description
Anonymous ChatGPT Client
- Access basic ChatGPT model without authentication
OpenAI recently made the ChatGPT model accessible anonymously. You can access it without authentication. Read more about it in the official docs
Installation
- Install the package/cli
pip install anonymous-chatgpt
Usage
CLI
chatgpt --prompt "hello world"
CLI Demonstration
Package
from anonymous_chatgpt import chat
message = chat(prompt="hello world")
print(message)
Process of creating a authentication-less client
- Send the first request to the ChatGPT API i.e.
chat.openai.com
- The response of that request has cookies for authentication(not user just user-agent and csrf tokens)
- Those cookies are carried in all the upcoming requests
- Send the second request to the Sential API i.e.
/backend-anon/sentinel/chat-requirements
- This request gives us the
sentinel-token
which is the token used for authentication and authorization of the requests (not users). - We use this token in all the subsequent requests
- The third request is the actual request to the Anonymous Conversation endpoint i.e.
/backend-anon/conversation
- This is a streamed request which returns the response in the form of chunks
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.