Sign inSign up
Product Solutions Open Source Pricing
acheong08/ChatGPT Public Sponsor Notifications Fork 3.9k Star 24.4k
Code Issues 8 Pull requests 1 Discussions Actions Projects 1 Wiki Security Insights
main Go to file Code
2 branches 223 tags
acheong08 4.2.4 9e00941Apr 18, 2023 1,455 commits
.devcontainer Create devcontainer.json January 26, 2023 13:24
.github github actions stuff ﴾#1343﴿ April 17, 2023 19:06
.vscode version warnings April 1, 2023 11:00
docs github actions stuff ﴾#1343﴿ April 17, 2023 19:06
src/revChatGPT swap endpoint April 18, 2023 10:34
tests format April 15, 2023 22:16
.gitignore version warnings April 1, 2023 11:00
.pre‐commit‐config.yaml pre‐commit January 31, 2023 15:08
LICENSE Create LICENSE December 4, 2022 10:39
Makefile format April 8, 2023 11:08
config.json.example remove accept_language ﴾#890﴿ February 25, 2023 18:40
logo.png logo April 1, 2023 21:47
requirements.txt format March 18, 2023 12:41
setup.cfg pre‐commit test December 6, 2022 23:56
setup.py 4.2.4 April 18, 2023 10:35
README.md
ChatGPT
English ‐ 中文
pypi v4.2.4 python 3.9 | 3.10 | 3.11 downloads 341k
Reverse Engineered ChatGPT API by OpenAI. Extensible for chatbots etc.
Support my work
Make a pull request and fix my bad code.
Discord Server: https://discord.gg/9K2BvbXEHT
Installation
python ‐m pip install ‐‐upgrade revChatGPT
Suport Python Version
Minimum ‐ Python3.9
Recommend ‐ Python3.11+
V1 Standard ChatGPT
Due to recent tightening of OpenAI's security, the default endpoint has been swapped over to one provided by @pengzhile. It is not open source
and privacy is not guarenteed. Use it at your own risk. I am working on an open source implementation with the latest changes but that could take
a while.
V3 Official Chat API
Recently released by OpenAI
Paid
Get API key from https://platform.openai.com/account/api‐keys
Command line
python3 ‐m revChatGPT.V3 ‐‐api_key <api_key>
$ python3 ‐m revChatGPT.V3 ‐‐help
ChatGPT ‐ Official ChatGPT API
Repo: github.com/acheong08/ChatGPT
Type '!help' to show a full list of commands
Press Esc followed by Enter or Alt+Enter to send a message.
usage: V3.py [‐h] ‐‐api_key API_KEY [‐‐temperature TEMPERATURE] [‐‐no_stream] [‐‐base_prompt BASE_PROMPT]
[‐‐proxy PROXY] [‐‐top_p TOP_P] [‐‐reply_count REPLY_COUNT] [‐‐enable_internet]
[‐‐config CONFIG] [‐‐submit_key SUBMIT_KEY] [‐‐model {gpt‐3.5‐turbo,gpt‐4,gpt‐4‐32k}]
[‐‐truncate_limit TRUNCATE_LIMIT]
options:
‐h, ‐‐help show this help message and exit
‐‐api_key API_KEY OpenAI API key
‐‐temperature TEMPERATURE
Temperature for response
‐‐no_stream Disable streaming
‐‐base_prompt BASE_PROMPT
Base prompt for chatbot
‐‐proxy PROXY Proxy address
‐‐top_p TOP_P Top p for response
‐‐reply_count REPLY_COUNT
Number of replies for each prompt
‐‐enable_internet Allow ChatGPT to search the internet
‐‐config CONFIG Path to V3 config json file
‐‐submit_key SUBMIT_KEY
Custom submit key for chatbot. For more information on keys, see README
‐‐model {gpt‐3.5‐turbo,gpt‐4,gpt‐4‐32k}
‐‐truncate_limit TRUNCATE_LIMIT
Developer API
Basic example
from revChatGPT.V3 import Chatbot
chatbot = Chatbot(api_key="<api_key>")
chatbot.ask("Hello world")
Streaming example
from revChatGPT.V3 import Chatbot
chatbot = Chatbot(api_key="<api_key>")
for data in chatbot.ask_stream("Hello world"):
print(data, end="", flush=True)
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.
Contributors
This project exists thanks to all the people who contribute.
Additional credits
Coding while listening to this amazing song by virtualharby
About
Reverse engineered ChatGPT API
cli library pypi‐package chatgpt gptchat revchatgpt gpt‐35‐turbo
Readme
GPL‐2.0 license
Code of conduct
Security policy
24.4k stars
256 watching
3.9k forks
Report repository
Releases 216
4.2.4 Endpoint swap Latest
Apr 18, 2023
+ 215 releases
Sponsor this project
https://github.com/acheong08/ChatGPT/compare
https://github.com/acheong08/ChatGPT/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated‐desc+label%3A%22help+wanted%22
Packages
No packages published
Used by
@akirataguchi115/ akirataguchi115
Contributors 118
+ 107 contributors
Languages
Python99.4% Other0.6%
© 2023 GitHub, Inc. Terms Privacy Security Status Docs Contact GitHub Pricing API Training Blog About