Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

[Bug]: Error querying GPT 4 #1457

Closed
1 task done
TalKatz1 opened this issue Jul 7, 2023 · 7 comments
Closed
1 task done

[Bug]: Error querying GPT 4 #1457

TalKatz1 opened this issue Jul 7, 2023 · 7 comments

Comments

@TalKatz1
Copy link

TalKatz1 commented Jul 7, 2023

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

Thanks for your package, it is awesome :)

I have an error when trying to communicate with ChatGPT (GPT4), it started today.

  File "/usr/local/lib/python3.10/dist-packages/revChatGPT/V1.py", line 717, in ask
    yield from self.post_messages(
  File "/usr/local/lib/python3.10/dist-packages/revChatGPT/V1.py", line 670, in post_messages
    yield from self.__send_request(
  File "/usr/local/lib/python3.10/dist-packages/revChatGPT/V1.py", line 492, in __send_request
    raise e
  File "/usr/local/lib/python3.10/dist-packages/revChatGPT/V1.py", line 486, in __send_request
    data["arkose_token"] = get_arkose_token(
  File "/usr/local/lib/python3.10/dist-packages/revChatGPT/V1.py", line 178, in get_arkose_token
    raise Exception(resp_json.get("error", "Unknown error"))
Exception: unable to log requests

Steps to reproduce the problem

    chatbot = Chatbot(
        config={
        "access_token": gpt_token,
        "model": "gpt-4", # gpt-4-browsing, text-davinci-002-render-sha, gpt-4, gpt-4-plugins
        "disable_history": False,
        })
prompt = gpt_query_base.format(subject=subject)
    for data in chatbot.ask(prompt, auto_continue=True):
        response = data["message"]

Step 3 returns that error above

What should have happened?

Query GPT 4 and receive response

Version where the problem happens

Name: revChatGPT
Version: 6.7.6
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: /usr/local/lib/python3.10/dist-packages
Requires: async-tio, curl-cffi, httpx, openai, OpenAIAuth, prompt-toolkit, requests, rich, tiktoken
Required-by: 

What Python version are you running this with?

Python 3.10.6

What is your operating system ?

Linux

Command Line Arguments

No

Console logs

File "/usr/local/lib/python3.10/dist-packages/revChatGPT/V1.py", line 717, in ask
    yield from self.post_messages(
  File "/usr/local/lib/python3.10/dist-packages/revChatGPT/V1.py", line 670, in post_messages
    yield from self.__send_request(
  File "/usr/local/lib/python3.10/dist-packages/revChatGPT/V1.py", line 492, in __send_request
    raise e
  File "/usr/local/lib/python3.10/dist-packages/revChatGPT/V1.py", line 486, in __send_request
    data["arkose_token"] = get_arkose_token(
  File "/usr/local/lib/python3.10/dist-packages/revChatGPT/V1.py", line 178, in get_arkose_token
    raise Exception(resp_json.get("error", "Unknown error"))
Exception: unable to log requests

Additional information

No response

@TalKatz1 TalKatz1 changed the title [Bug]: Error [Bug]: Error querying GPT 4 Jul 7, 2023
@acheong08
Copy link
Owner

@TalKatz1
Copy link
Author

TalKatz1 commented Jul 7, 2023

Thanks @acheong08 !

It fixed it for few prompts but I got this error now, after few successful prompts with 6.7.7:

  File "/usr/local/lib/python3.10/dist-packages/revChatGPT/V1.py", line 718, in ask
    yield from self.post_messages(
  File "/usr/local/lib/python3.10/dist-packages/revChatGPT/V1.py", line 671, in post_messages
    yield from self.__send_request(
  File "/usr/local/lib/python3.10/dist-packages/revChatGPT/V1.py", line 493, in __send_request
    raise e
  File "/usr/local/lib/python3.10/dist-packages/revChatGPT/V1.py", line 487, in __send_request
    data["arkose_token"] = get_arkose_token(
  File "/usr/local/lib/python3.10/dist-packages/revChatGPT/V1.py", line 175, in get_arkose_token
    resp_json: dict = resp.json()
  File "/usr/local/lib/python3.10/dist-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@acheong08
Copy link
Owner

revert back to previous release

@acheong08 acheong08 reopened this Jul 7, 2023
@acheong08
Copy link
Owner

i fixed up my server a bit. should allow you to solve captcha client side

@TalKatz1
Copy link
Author

TalKatz1 commented Jul 7, 2023

With 6.7.6 it's working again, thanks a lot :)

@TalKatz1 TalKatz1 closed this as completed Jul 8, 2023
@egeres
Copy link

egeres commented Jul 8, 2023

Just got this error with version 6.7.6 when querying GPT-4, but for now 6.7.7 seems to be working!

@acheong08
Copy link
Owner

Both versions should work now

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants