Erol444 / gpt4-openai-api

Python package that provides (unofficial) API access to the GPT-4 through chat.openai.com. Works with langchain. Supports browsing, DALL-E 3, plugins, continuing generation.
165 stars 38 forks source link

OpenAI: Our systems have detected unusual activity from your system. Please try again later. #14

Closed Nadeus closed 1 year ago

Nadeus commented 1 year ago

Hey,

I'm having this error.

I know it's related to a tool you use, but is there a way for me to fix this?

 File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/langchain/llms/base.py", line 297, in __call__
    self.generate([prompt], stop=stop, callbacks=callbacks)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/langchain/llms/base.py", line 191, in generate
    raise e
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/langchain/llms/base.py", line 185, in generate
    self._generate(prompts, stop=stop, run_manager=run_manager)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/langchain/llms/base.py", line 438, in _generate
    else self._call(prompt, stop=stop)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/gpt4_openai/__init__.py", line 36, in _call
    for data in self.chatbot.ask(prompt=prompt,
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/revChatGPT/V1.py", line 552, in ask
    yield from self.post_messages(
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/revChatGPT/V1.py", line 505, in post_messages
    yield from self.__send_request(
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/revChatGPT/V1.py", line 346, in __send_request
    self.__check_response(response)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/revChatGPT/V1.py", line 62, in wrapper
    out = func(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/revChatGPT/V1.py", line 673, 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)
Please check that the input is correct, or you can resolve this issue by filing an issue
Project URL: https://github.com/acheong08/ChatGPT
Erol444 commented 1 year ago

Reported here: https://github.com/acheong08/ChatGPT/issues/1419

Nadeus commented 1 year ago

Thanks! 🥶

Nadeus commented 1 year ago

Just adding something: the issue only appears when using a GPT-4 model (if you don't put any model, it'll use GPT-3.5 and work).

Yesterday, the line "PUID" was added to the tool and in the doc.

{
  "conversation_id": "UUID...",
  "parent_id": "UUID...",
  "proxy": "...",
  "model": "gpt-4", // gpt-4-browsing, text-davinci-002-render-sha, gpt-4, gpt-4-plugins
  "plugin_ids" : ["plugin-d1d6eb04-3375-40aa-940a-c2fc57ce0f51"], // Wolfram Alpha example
  "disable_history": true,
  "PUID": "<_puid cookie for plus accounts>" // Only if you have a plus account and use GPT-4
}

Do you think we should just add the puid cookie for the tool to work?

acheong08 commented 1 year ago

I should have fixed it in latest version.

Erol444 commented 1 year ago

@Nadeus could you try updating the library to newest version?

python -mpip install gpt4-openai-api -U
Nadeus commented 1 year ago

@Erol444 it works fine now!!!!

Thanks a lot :)