From 7458961b156356940a98f70d0aaf1703300a8e35 Mon Sep 17 00:00:00 2001 From: F33RNI Date: Mon, 13 Mar 2023 00:35:24 +0300 Subject: [PATCH] Test API type 1 and update revChatGPT to 3.3.4 --- README.md | 14 +++++++------- main.py | 2 +- requirements.txt | 2 +- settings.json | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index f0c46308..29542254 100644 --- a/README.md +++ b/README.md @@ -53,16 +53,16 @@ Support the project by buying and listening to my music 🎵 1. Set `chatgpt_api_type` to `3` in `modules` in `settings.json` file 2. Generate API Key https://platform.openai.com/account/api-keys and paste it into `api_key` in `chatgpt_auth` in `settings.json` file 3. Configure proxy if needed in `proxy` in `settings.json` file -5. For **API type 0** (revChatGPT API V0, Official API, more "stupid" model, uses credits): - 1. Set `chatgpt_api_type` to `0` in `modules` in `settings.json` file - 2. Generate API Key https://platform.openai.com/account/api-keys and paste it into `api_key` in `chatgpt_auth` in `settings.json` file - 3. Configure proxy if needed in `proxy` in `settings.json` file -6. For **API type 1** (revChatGPT API V1, free, uses same model as official website): +5. For **API type 1** (revChatGPT API V1, free, uses same model as official website): 1. Set `chatgpt_api_type` to `1` in `modules` in `settings.json` file 2. Make sure you have access to https://chat.openai.com/ 3. Open https://chat.openai.com/api/auth/session 4. Copy value of `accessToken` into `access_token` in `chatgpt_auth` in `chatgpt_api_1` in `settings.json` file 5. Configure proxy if needed in `proxy` in `settings.json` file +6. For **API type 0** (revChatGPT API V0, Official API, more "stupid" model, uses credits): + 1. Set `chatgpt_api_type` to `0` in `modules` in `settings.json` file + 2. Generate API Key https://platform.openai.com/account/api-keys and paste it into `api_key` in `chatgpt_auth` in `settings.json` file + 3. Configure proxy if needed in `proxy` in `settings.json` file 7. For DALL-E, generate API Key https://platform.openai.com/account/api-keys 8. Type Generated OpenAI API Key into `open_ai_api_key` in `dalle` in `settings.json` file 9. Create bot at https://t.me/BotFather @@ -74,7 +74,7 @@ Example `settings.json`: { "modules": { "chatgpt": true, - "chatgpt_api_type": 3, + "chatgpt_api_type": 1, "dalle": true }, @@ -86,7 +86,7 @@ Example `settings.json`: "email": "", "password": "", "session_token": "", - "access_token": "", + "access_token": "XXxXxXx........XxxXXx", "base_url": "" }, diff --git a/main.py b/main.py index 8a1c9ef9..3f1492cd 100644 --- a/main.py +++ b/main.py @@ -29,7 +29,7 @@ import BotHandler from JSONReaderWriter import load_json -TELEGRAMUS_VERSION = 'beta_2.0.0' +TELEGRAMUS_VERSION = 'beta_2.0.1' # Logging level (INFO for debug, WARN for release) LOGGING_LEVEL = logging.INFO diff --git a/requirements.txt b/requirements.txt index 4ff6124f..3175c87c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ psutil>=5.9.1 telegram~=0.0.1 python-telegram-bot~=20.1 -revChatGPT==3.3.1 +revChatGPT==3.3.4 openai>=0.26.4 tiktoken>=0.2.0 OpenAIAuth>=0.3.2 \ No newline at end of file diff --git a/settings.json b/settings.json index 5e202134..9057aafe 100644 --- a/settings.json +++ b/settings.json @@ -1,7 +1,7 @@ { "__comment01__": "SPECIFY WHAT MODULES WILL BE INCLUDED IN TELEGRAM BOT AND revChatGPT API TYPE", "__comment02__": "0 - OFFICIAL CHATGPT API. MORE STUPID MODEL. AUTHORIZATION VIA OPENAI API KEY", - "__comment03__": "1 - (NOT TESTED) SAME AS OFFICIAL WEBSITE. FREE BUT LIMITED NUMBER OF REQUESTS. AUTHORIZATION VIA ACCESS_TOKEN, SESSION_TOKEN (NOT TESTED) OR EMAIL/PASS (NOT TESTED)", + "__comment03__": "1 - SAME AS OFFICIAL WEBSITE. FREE BUT LIMITED NUMBER OF REQUESTS. AUTHORIZATION VIA ACCESS_TOKEN, SESSION_TOKEN (NOT TESTED) OR EMAIL/PASS (NOT TESTED)", "__comment04__": "2 - (MAY NOT WORK) FREE API FOR CHATGPT. AUTHORIZATION VIA OPENAI API KEY", "__comment05__": "3 - (RECOMMENDED) OFFICIAL CHATGPT API. AUTHORIZATION VIA OPENAI API KEY", "modules": {