acheong08 / ChatGPT

Reverse engineered ChatGPT API
GNU General Public License v2.0
28.01k stars 4.48k forks source link

[Bug]: OpenAI: {"detail":"Our systems have detected unusual activity from your system. Please try again later."} (code: 403) #1419

Closed Erol444 closed 1 year ago

Erol444 commented 1 year ago

Is there an existing issue for this?

What happened?

When trying to execute a prompt with V1, OpenAI's servers throw an 406 error. Full error traceback can be found below.

 OpenAI: {"detail":"Our systems have detected unusual activity from your system. Please try again later."} (code: 403)

Steps to reproduce the problem

Try to run ask() with V1 API.

What should have happened?

Is should work:)

Version where the problem happens

Tried both 6.2 (latest) and 6.0.2.

What Python version are you running this with?

3.9

What is your operating system ?

Windows

Command Line Arguments

/

Console logs

C:\Python39\lib\site-packages\revChatGPT\__init__.py:29: UserWarning: The current Python is not a recommended version, 3.10+ is recommended
  __import__("warnings").warn(
Traceback (most recent call last):
  File "C:\Python39\lib\site-packages\revChatGPT\V1.py", line 673, in __check_response
    response.raise_for_status()
  File "C:\Python39\lib\site-packages\requests\models.py", line 953, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://bypass.churchless.tech/conversation

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\Erik\Documents\Work\gpt4-openai-api\test\test_browsing.py", line 10, in <module>
    response = llm('What is the age difference between Dua Lipa and her boyfriend?')
  File "C:\Python39\lib\site-packages\langchain\llms\base.py", line 281, in __call__
    self.generate([prompt], stop=stop, callbacks=callbacks)
  File "C:\Python39\lib\site-packages\langchain\llms\base.py", line 176, in generate
    raise e
  File "C:\Python39\lib\site-packages\langchain\llms\base.py", line 170, in generate
    self._generate(prompts, stop=stop, run_manager=run_manager)
  File "C:\Python39\lib\site-packages\langchain\llms\base.py", line 379, in _generate
    else self._call(prompt, stop=stop)
  File "c:\users\erik\documents\work\gpt4-openai-api\gpt4_openai\__init__.py", line 36, in _call
    for data in self.chatbot.ask(prompt=prompt,
  File "C:\Python39\lib\site-packages\revChatGPT\V1.py", line 559, in ask
    yield from self.post_messages(
  File "C:\Python39\lib\site-packages\revChatGPT\V1.py", line 512, in post_messages
    yield from self.__send_request(
  File "C:\Python39\lib\site-packages\revChatGPT\V1.py", line 348, in __send_request
    self.__check_response(response)
  File "C:\Python39\lib\site-packages\revChatGPT\V1.py", line 61, in wrapper
    out = func(*args, **kwargs)
  File "C:\Python39\lib\site-packages\revChatGPT\V1.py", line 680, in __check_response
    raise error from ex
revChatGPT.typings.Error: OpenAI: {"detail":"Our systems have detected unusual activity from your system. Please try again later."} (code: 403)


### Additional information

_No response_
acheong08 commented 1 year ago

Check https://github.com/acheong08/ChatGPT/releases/tag/6.2.2 and see if it works

acheong08 commented 1 year ago

I got success on my end

Erol444 commented 1 year ago

Yep, works now, thanks!

Daedra22 commented 1 year ago

Yep, works now, thanks!

I updated the version to 6.2.2 changed removed all cached files, restarted router to get a new ip and I still get the same error. How it that possible?

Daedra22 commented 1 year ago

Yep, works now, thanks!

You checked it with GPT4 aswell?

Erol444 commented 1 year ago

@Daedra22 yes. Note that on bot.ask() / bot.prompt() you need to re-specify which model you are using, so request will send over additional data, example here: https://github.com/Erol444/gpt4-openai-api/commit/0e0f2362cd0832df68f19876abda4e3aed227899#diff-1c0caa9facf9a04ddbc362ab73a5707d09e6ff923a7ecae9178ddf6d4cb78d41R37

Daedra22 commented 1 year ago

@Daedra22 yes. Note that on bot.ask() / bot.prompt() you need to re-specify which model you are using, so request will send over additional data, example here: Erol444/gpt4-openai-api@0e0f236#diff-1c0caa9facf9a04ddbc362ab73a5707d09e6ff923a7ecae9178ddf6d4cb78d41R37

Ok I got now the error, passing the model to the bot.ask prompt helped, but the errors still occurs if you got a very large prompt, where the continue generate button appears, this seem to make it crash.

Daedra22 commented 1 year ago

@acheong08 so the bug still occurs on large prompts with auto_continue button. Can you see it?

acheong08 commented 1 year ago

Yup. I'll fix

acheong08 commented 1 year ago

https://github.com/acheong08/ChatGPT/releases/tag/6.2.4

Daedra22 commented 1 year ago

https://github.com/acheong08/ChatGPT/releases/tag/6.2.4

You are the best, now it works. Super fast fixed, great job!