Closed hongyi-zhao closed 1 year ago
Automated: 👋 Thanks for reporting this issue. @acheong08 will review it shortly. In the meantime, please check to see if there are any similar issues already closed.
Getting this
Traceback (most recent call last):
File "/home/xxx/xxx/src/aclient.py", line 146, in send_start_prompt
response = f"{response}{await responses.unofficial_handle_response(prompt, self)}"
File "/home/xxx/xxx/src/responses.py", line 8, in unofficial_handle_response
async for response in client.chatbot.ask(message):
File "/home/xxx/xxx/env/lib/python3.10/site-packages/revChatGPT/V1.py", line 988, in ask
async for msg in self.post_messages(
File "/home/xxx/xxx/env/lib/python3.10/site-packages/revChatGPT/V1.py", line 941, in post_messages
async for msg in self.__send_request(
File "/home/xxx/xxx/env/lib/python3.10/site-packages/revChatGPT/V1.py", line 825, in __send_request
await self.__check_response(response)
File "/home/xxx/xxx/env/lib/python3.10/site-packages/revChatGPT/V1.py", line 1163, in __check_response
raise error from ex
revChatGPT.typings.Error: OpenAI: {"detail":{"message":"Could not parse your authentication token. Please try signing in again.","type":"invalid_request_error","param":null,"code":"invalid_jwt"}} (code: 401)
But, the access_token works for V1.
V3 also fails to access GPT-4:
$ python3 -m revChatGPT --V3 --api_key sk-xxx --truncate_limit $(( 32 * 1024 )) --proxy socks5h://127.0.0.1:18890 --model gpt-4-32k
ChatGPT - Official ChatGPT API
Repo: github.com/acheong08/ChatGPT
Version: 5.0.0
Type '!help' to show a full list of commands
Press Esc followed by Enter or Alt+Enter to send a message.
Traceback (most recent call last):
File "/home/werner/Public/repo/github.com/acheong08/ChatGPT.git/src/revChatGPT/__main__.py", line 52, in main
V3.main()
File "/home/werner/Public/repo/github.com/acheong08/ChatGPT.git/src/revChatGPT/V3.py", line 609, in main
chatbot = ChatbotCLI(
^^^^^^^^^^^
File "/home/werner/Public/repo/github.com/acheong08/ChatGPT.git/src/revChatGPT/V3.py", line 97, in __init__
if self.get_token_count("default") > self.max_tokens:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/werner/Public/repo/github.com/acheong08/ChatGPT.git/src/revChatGPT/V3.py", line 142, in get_token_count
encoding = tiktoken.encoding_for_model(self.engine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/werner/.pyenv/versions/datasci/lib/python3.11/site-packages/tiktoken/model.py", line 68, in encoding_for_model
raise KeyError(
KeyError: 'Could not automatically map gpt-4-32k to a tokeniser. Please use `tiktok.get_encoding` to explicitly get the tokeniser you expect.'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/werner/Public/repo/github.com/acheong08/ChatGPT.git/src/revChatGPT/__main__.py", line 65, in <module>
main()
File "/home/werner/Public/repo/github.com/acheong08/ChatGPT.git/src/revChatGPT/__main__.py", line 55, in main
raise error from exc
revChatGPT.typings.CLIError: Command line program unknown error
Please check that the input is correct, or you can resolve this issue by filing an issue
Project URL: https://github.com/acheong08/ChatGPT
KeyError: 'Could not automatically map gpt-4-32k to a tokeniser. Please use
tiktok.get_encoding
to explicitly get the tokeniser you expect.'
This model does not exist yet
And upgrade tiktoken
Tried but still fail:
werner@X10DAi:~$ revChatGPT 3
ChatGPT - Official ChatGPT API
Repo: github.com/acheong08/ChatGPT
Version: 5.0.0
Type '!help' to show a full list of commands
Press Esc followed by Enter or Alt+Enter to send a message.
User:
Hello.
ChatGPT:
Traceback (most recent call last):
File "/home/werner/.pyenv/versions/datasci/lib/python3.11/site-packages/revChatGPT/__main__.py", line 52, in main
V3.main()
File "/home/werner/.pyenv/versions/datasci/lib/python3.11/site-packages/revChatGPT/V3.py", line 695, in main
for query in chatbot.ask_stream(prompt):
File "/home/werner/.pyenv/versions/datasci/lib/python3.11/site-packages/revChatGPT/V3.py", line 203, in ask_stream
raise t.APIConnectionError(
revChatGPT.typings.APIConnectionError: 404 Not Found {
"error": {
"message": "The model: `gpt-4` does not exist",
"type": "invalid_request_error",
"param": null,
"code": "model_not_found"
}
}
Please check if there is a problem with your network connection
Please check that the input is correct, or you can resolve this issue by filing an issue
Project URL: https://github.com/acheong08/ChatGPT
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/werner/.pyenv/versions/datasci/lib/python3.11/site-packages/revChatGPT/__main__.py", line 65, in <module>
main()
File "/home/werner/.pyenv/versions/datasci/lib/python3.11/site-packages/revChatGPT/__main__.py", line 55, in main
raise error from exc
revChatGPT.typings.CLIError: Command line program unknown error
Please check that the input is correct, or you can resolve this issue by filing an issue
Project URL: https://github.com/acheong08/ChatGPT
I bought GPT-4 as shown below:
I set the usename and passwd in
config.json
as follows:Then I try to log in but failed as follows:
What should I do then?
Regards, Zhao