Comments (51)
btw I found the error. Fixing now
from chatgpt.
@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'])
from chatgpt.
Do python3 -m revChatGPT --text
. If that works, it means there is an error with streaming
from chatgpt.
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 email
& password
from chatgpt.
It shouldn't. This could mean wrong email/password
from chatgpt.
I've confirmed of using this email+password to re-login OpenAI right now, and it's correct.
from chatgpt.
What version? pip3 show revChatGPT
?
from chatgpt.
>>> 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: [email protected]
License: GNU General Public License v2.0
Location: /opt/homebrew/lib/python3.9/site-packages
Requires: bs4, lxml, requests, tls-client
Required-by:
from chatgpt.
While running it, try !config
and see if the tokens show up
from chatgpt.
You:
!config
{
"email": "xxx",
"password": "xxx,
"Authorization": "",
"session_token": null
}
from chatgpt.
It's not logging in properly. Could be due to captcha. I am unsure.
from chatgpt.
Try !refresh
and see if any errors show
from chatgpt.
Logging in...
You:
!refresh
Error refreshing session
{}
Session refreshed.
I've also tried of removing all OpenAI's cookie on Chrome, still not working.
from chatgpt.
Error refreshing session
Hmm. Can you clone the repository and try adding some debug code? For example, print out the full responses of session refresh
from chatgpt.
I can't replicate
from chatgpt.
OK, I'll try and put on more information.
from chatgpt.
The request is blocked.
Maybe block by waf, or other bot manager ?
from chatgpt.
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>"
}
from chatgpt.
@yumusb Update please. pip3 install revChatGPT
--upgrade
from chatgpt.
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>" }
I forgot to update the example
from chatgpt.
Fixed. Please test @mazzzystar
pip3 install --upgrade revChatGPT
from chatgpt.
well ,it seems that !config doesnt work in my CLI
from chatgpt.
@zjrwtx It seems you haven't updated. pip3 install --upgrade revChatGPT
!config doesn't require API
from chatgpt.
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:
/home/alber/Desktop/ChatGPTApp/chatgpt_venv/lib/python3.10/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(
Traceback (most recent call last):
File "/home/alber/Desktop/ChatGPTApp/chatgpt_venv/lib/python3.10/site-packages/revChatGPT/revChatGPT.py", line 74, in get_chat_text
response = response.text.splitlines()[-4]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/alber/Desktop/ChatGPTApp/test.py", line 14, in <module>
chatbot.get_chat_response(prompt, output="text")
File "/home/alber/Desktop/ChatGPTApp/chatgpt_venv/lib/python3.10/site-packages/revChatGPT/revChatGPT.py", line 109, in get_chat_response
return self.get_chat_text(data)
File "/home/alber/Desktop/ChatGPTApp/chatgpt_venv/lib/python3.10/site-packages/revChatGPT/revChatGPT.py", line 87, in get_chat_text
raise ValueError("Response is not in the correct format", error_desp)
ValueError: ('Response is not in the correct format', 'Incorrect API key provided: Bearer. You can find your API key at https://beta.openai.com.')
I am using the latest release of revChatGPT
pip3 show revChatGPT
Name: revChatGPT
Version: 0.0.27
Summary: ChatGPT is a reverse engineering of OpenAI's ChatGPT API
Home-page: https://github.com/acheong08/ChatGPT
Author: Antonio Cheong
Author-email: [email protected]
License: GNU General Public License v2.0
Location: /home/alber/Desktop/ChatGPTApp/chatgpt_venv/lib/python3.10/site-packages
Requires: bs4, lxml, requests, tls-client
Required-by:
from chatgpt.
I've upgraded to 0.0.27
, however, it still doesn't work.
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.')
from chatgpt.
It's not logging in.
This is the normal output:
$ python3 -m revChatGPT
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...
You:
If it isn't I'm guessing there's something wrong with your config. Do !config and show the censored output
from chatgpt.
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:
from chatgpt.
Token issue. Looking into it
from chatgpt.
@mazzzystar
Please show censored output of !config
.
from chatgpt.
Logging in...
Error refreshing session:
'OpenAIAuth' object has no attribute 'session_token'
You:
!config
{
"email": "xxx",
"password": "xxx",
"Authorization": null
}
from chatgpt.
Probably incorrect email/password. That is the only reason session_token would not exist
from chatgpt.
However, just now I logged out OpenAI, and use the email/password below to login, it succeeded.
!config
{
"email": "xxx",
"password": "xxx",
"Authorization": null
}
from chatgpt.
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
from chatgpt.
Can you figure out this issue when I run python3 -m revChatGPT --text
?
'OpenAIAuth' object has no attribute 'session_token'
from chatgpt.
Can you figure out this issue when I run
python3 -m revChatGPT --text
?'OpenAIAuth' object has no attribute 'session_token'
With --text
and without does the exact same thing with auth. Should work now if it works without --text
from chatgpt.
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.
from chatgpt.
@yumusb @acheong08
I will try to print some logs
from chatgpt.
@yumusb
I get that error if I enter the wrong password. I am currently looking through the error handlers to spot where it is going wrong
from chatgpt.
<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 ?
This is my response, not found some error about "wrong password". I think it 's waf return.
from chatgpt.
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.
from chatgpt.
@yumusb Chould you show the output of pip3 show revChatGPT
?
from chatgpt.
This happens when user agent isn't set or if you're in China.
I have to use a VPN to use ChatGPT
from chatgpt.
from chatgpt.
@yumusb Chould you show the output of
pip3 show revChatGPT
?
pip3 show revChatGPT
Name: revChatGPT
Version: 0.0.27
Summary: ChatGPT is a reverse engineering of OpenAI's ChatGPT API
Home-page: https://github.com/acheong08/ChatGPT
Author: Antonio Cheong
Author-email: [email protected]
License: GNU General Public License v2.0
Location: /usr/local/lib/python3.9/site-packages
Requires: bs4, lxml, requests, tls-client
Required-by:
from chatgpt.
Since it's updated, I think you're correct that it's a waf or geographical blocking
from chatgpt.
This happens when user agent isn't set or if you're in China.
I have to use a VPN to use ChatGPT
Me too. And the proxy works in Chrome.
from chatgpt.
My proxy IP address is Korea. And I can use chatgpt normally with my browser.
from chatgpt.
You can write a code to judge return html does have "Wrong email or password" to judge the wrong password.
Do you mind writing this? I can't figure it out and my brain is burnt out.
from chatgpt.
I am trying to write the code, but found that I can use it properly. But I haven't changed config.json ...
from chatgpt.
Nevermind. I got it
from chatgpt.
@yumusb Latest release can detect invalid credentials but in the process of testing:
Can you help me test (Don't attempt too many times)
from chatgpt.
Related Issues (20)
- The Functions HOT 1
- [Feature Request]: Additions to Awesome ChatGPT HOT 1
- [Bug]: ValueError: PUID is required HOT 1
- [Bug]: Error querying GPT 4 HOT 7
- [Bug]: access_denied: Your version of the ChatGPT app is out of date. Please update to the newest build of the app. HOT 12
- [Bug]: Field missing. Details: {'conversation_id': 'abf665f2-3c8f-4725-8263-5893bb5847ff', 'message_id': 'b8fe1067-2610-4bea-b33b-93b099b3803b', 'is_completion': False, 'moderation_response': {'flagged': False, 'blocked': False, 'moderation_id': 'modr-7eEtljxtdnGEn9sCjBEKoPBeuGh7M'}} HOT 13
- ValueError: Field missing. Details: {'conversation_id': '289a9ec4-cf13-45f5-bc3f-f96046e487c7', 'message_id': 'a5be1cb9-610f-4c53-a019-73abfd2b68ab', 'is_completion': False, 'moderation_response': {'flagged': False, 'blocked': False, 'moderation_id': 'modr-7eJ0uKhi6TSRvHoiBzCxVBTu7GA2v'}} HOT 4
- [Bug]: 应该是chat.openai新更新的json返回的格式,导致了现在只有message_id,没message这个字段了 HOT 3
- [Bug]: Support for 32bit and Arm processors
- Email/Password storing the Access token HOT 3
- [Bug]: Exception(resp_json.get("error", "Unknown error")) Exception: unable to log requests HOT 2
- [Bug]: https://bypass.churchless.tech/conversation HOT 1
- I registered on https://nat.dev verified by email however I am not getting verification code on mobile and that bug is not letting me login[Bug]:
- It asks to manually input captcha HOT 8
- [Feature Request]: personal advice HOT 2
- A timeout occurred Error code 524
- [Bug]:
- revChatGPT.typings.Error: OpenAI: {"error":"Post \"https://tcr9i.chat.openai.com/fc/gt2/public_key/35536E1E-65B4-4D96-9D97-6ADB7EFF8147\": http2: server sent GOAWAY and closed the connection; LastStreamID=1, ErrCode=ENHANCE_YOUR_CALM, debug=\"\""} (code: 500) HOT 1
- [Bug]: Please check that the input is correct, or you can resolve this issue by filing an issue HOT 2
- [Bug]: access token is expired in a minute! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatgpt.