Skip to main content

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"

OR 

chatgpt --chat

CLI Demonstration

Anonymous ChatGPT Demo

Package

from anonymous_chatgpt import chat_prompt, ChatGPT


message = chat_promt(prompt="hello world")
print(message)

# For chat

chatgpt = ChatGPT()

resp1 = chatgpt.chat(prompt="hello, my name is John")
resp2 = chatgpt.chat(prompt="what is my name?")

Process of creating a authentication-less client

  1. Send the first request to the ChatGPT API i.e. chat.openai.com
  2. The response of that request has cookies for authentication(not user just user-agent and csrf tokens)
  3. Those cookies are carried in all the upcoming requests
  4. Send the second request to the Sential API i.e. /backend-anon/sentinel/chat-requirements
  5. This request gives us the sentinel-token which is the token used for authentication and authorization of the requests (not users).
  6. We use this token in all the subsequent requests
  7. The third request is the actual request to the Anonymous Conversation endpoint i.e. /backend-anon/conversation
  8. 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.

Source Distribution

anonymous-chatgpt-0.0.4.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

anonymous_chatgpt-0.0.4-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file anonymous-chatgpt-0.0.4.tar.gz.

File metadata

  • Download URL: anonymous-chatgpt-0.0.4.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for anonymous-chatgpt-0.0.4.tar.gz
Algorithm Hash digest
SHA256 b86ecb6ca8eff54f6fa1e4458ce8166220cebd2c67a1899b212444521fc1dc51
MD5 2ebdb77ebb116a629fea88547c6e45dc
BLAKE2b-256 a8d6514ad0313ac004998445a239c157d8fea3ea1ce1cbb6312628f0abad6edd

See more details on using hashes here.

File details

Details for the file anonymous_chatgpt-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for anonymous_chatgpt-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5979b9c5abe0ad7f709261c0fa4007206ec1ffbbb863cbfa62604812004f4391
MD5 750f957e76adb24cd0d469b40dde69d8
BLAKE2b-256 a84a496e2f37542fb016f5585b758ddefbd2d16b7b11e820acde77299219fe2d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page