-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
('Response is not in the correct format', 'Incorrect API key provided: Bearer. You can find your API key at https://beta.openai.com.') #72
Comments
Do |
Logging in...
You:
Hi
Chatbot:
/Users/Library/Python/3.9/lib/python/site-packages/bs4/__init__.py:435: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.
warnings.warn(
Something went wrong!
('Response is not in the correct format', 'Incorrect API key provided: Bearer. You can find your API key at https://beta.openai.com.') It needs API Key, I thought it could be done with only |
It shouldn't. This could mean wrong email/password |
I've confirmed of using this email+password to re-login OpenAI right now, and it's correct. |
What version? |
>>> pip3 show revChatGPT
Name: revChatGPT
Version: 0.0.26.1
Summary: ChatGPT is a reverse engineering of OpenAI's ChatGPT API
Home-page: https://github.com/acheong08/ChatGPT
Author: Antonio Cheong
Author-email: acheong@student.dalat.org
License: GNU General Public License v2.0
Location: /opt/homebrew/lib/python3.9/site-packages
Requires: bs4, lxml, requests, tls-client
Required-by: |
While running it, try |
You:
!config
{
"email": "xxx",
"password": "xxx,
"Authorization": "",
"session_token": null
} |
It's not logging in properly. Could be due to captcha. I am unsure. |
Try |
Logging in...
You:
!refresh
Error refreshing session
{}
Session refreshed. I've also tried of removing all OpenAI's cookie on Chrome, still not working. |
Hmm. Can you clone the repository and try adding some debug code? For example, print out the full responses of session refresh |
I can't replicate |
OK, I'll try and put on more information. |
<style type='text/css'>body { font-family:Arial; margin-left:40px; }img { border:0 none; }#content { margin-left: auto; margin-right: auto }#message h2 { font-size: 20px; font-weight: normal; color: #000000; margin: 34px 0px 0px 0px }#message p { font-size: 13px; color: #000000; margin: 7px 0px 0px 0px }#errorref { font-size: 11px; color: #737373; margin-top: 41px }</style><title>Microsoft</title>The request is blocked.xxxxxx Maybe block by waf, or other bot manager ? |
BTW, It's confusing that your config.json.example shows {
"Authorization": "<API_KEY>",
"session_token": "<SESSION_TOKEN>"
} But the Setup was using {
"email": "<YOUR_EMAIL>",
"password": "<YOUR_PASSWORD>"
} |
@yumusb Update please. |
I forgot to update the example |
btw I found the error. Fixing now |
Fixed. Please test @mazzzystar |
@zjrwtx It seems you haven't updated. !config doesn't require API |
It works for me on the CLI but I get the same error when using the Python script from revChatGPT.revChatGPT import Chatbot
config = {
"email": "xxx",
"password": "xxx"#,
#"session_token": "<SESSION_TOKEN>", # Deprecated. Use only if you encounter captcha with email/password
#"proxy": "<HTTP/HTTPS_PROXY>"
}
chatbot = Chatbot(config, conversation_id=None)
prompt = "Javascript library for cropping images programatically"
chatbot.get_chat_response(prompt, output="text") Output:
I am using the latest release of revChatGPT
|
I've upgraded to python3 -m revChatGPT --text
ChatGPT - A command-line interface to OpenAI's ChatGPT (https://chat.openai.com/chat)
Repo: github.com/acheong08/ChatGPT
Type '!help' to show commands
Press enter twice to submit your question.
Error refreshing session
{}
You:
Hi
Chatbot:
Something went wrong!
('Response is not in the correct format', 'Incorrect API key provided: <API_KEY>. You can find your API key at https://beta.openai.com.') |
It's not logging in.
If it isn't I'm guessing there's something wrong with your config. Do !config and show the censored output |
Thanks for the quick reply. python3 -m revChatGPT --text
ChatGPT - A command-line interface to OpenAI's ChatGPT (https://chat.openai.com/chat)
Repo: github.com/acheong08/ChatGPT
Type '!help' to show commands
Press enter twice to submit your question.
Logging in...
Error refreshing session:
'OpenAIAuth' object has no attribute 'session_token'
You:
Hi
Chatbot:
/Users/Library/Python/3.9/lib/python/site-packages/bs4/__init__.py:435: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.
warnings.warn(
Something went wrong!
('Response is not in the correct format', 'Incorrect API key provided: Bearer. You can find your API key at https://beta.openai.com.')
You: |
Token issue. Looking into it |
@alberduris bad documentation sorry from revChatGPT.revChatGPT import Chatbot
config = {
"email": "xxx",
"password": "xxx"
}
chatbot = Chatbot(config, conversation_id=None)
chatbot.refresh_session()
prompt = "Javascript library for cropping images programatically"
print(chatbot.get_chat_response(prompt, output="text")['message']) |
@mazzzystar |
Logging in...
Error refreshing session:
'OpenAIAuth' object has no attribute 'session_token'
You:
!config
{
"email": "xxx",
"password": "xxx",
"Authorization": null
}
|
Probably incorrect email/password. That is the only reason session_token would not exist |
However, just now I logged out OpenAI, and use the email/password below to login, it succeeded. !config
{
"email": "xxx",
"password": "xxx",
"Authorization": null
} |
Replicated with wrong email and password $ python3 -m revChatGPT --text
ChatGPT - A command-line interface to OpenAI's ChatGPT (https://chat.openai.com/chat)
Repo: github.com/acheong08/ChatGPT
Type '!help' to show commands
Press enter twice to submit your question.
Logging in...
Error refreshing session:
'OpenAIAuth' object has no attribute 'session_token'
You: Adding better error output |
Can you figure out this issue when I run 'OpenAIAuth' object has no attribute 'session_token' |
With |
If there are a lot of people having that problem. Then you should not simply assume that it is an account password error. You should type specific log messages in the code to resolve the problem. |
@yumusb @acheong08 |
@yumusb |
<style type='text/css'>body { font-family:Arial; margin-left:40px; }img { border:0 none; }#content { margin-left: auto; margin-right: auto }#message h2 { font-size: 20px; font-weight: normal; color: #000000; margin: 34px 0px 0px 0px }#message p { font-size: 13px; color: #000000; margin: 7px 0px 0px 0px }#errorref { font-size: 11px; color: #737373; margin-top: 41px }</style><title>Microsoft</title> This is my response, not found some error about "wrong password". I think it 's waf return. |
This happens when user agent isn't set or if you're in China. User agent has been set since version 0.0.24. |
@yumusb Chould you show the output of |
I have to use a VPN to use ChatGPT |
pip3 show revChatGPT |
Since it's updated, I think you're correct that it's a waf or geographical blocking |
This comment was marked as duplicate.
This comment was marked as duplicate.
My proxy IP address is Korea. And I can use chatgpt normally with my browser. |
I am trying to write the code, but found that I can use it properly. But I haven't changed config.json ... |
Nevermind. I got it |
@yumusb Latest release can detect invalid credentials but in the process of testing: Can you help me test (Don't attempt too many times) |
Logging in... You: Hi Chatbot: Something went wrong! list index out of range
pip3 install revChatGPT --upgrade Requirement already satisfied: revChatGPT in /opt/homebrew/lib/python3.9/site-packages (0.0.26.1)
The text was updated successfully, but these errors were encountered: