acheong08 / ChatGPT

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

[Bug]: open.ai 403 error #1064

Closed Triso1l closed 1 year ago

Triso1l commented 1 year ago

Is there an existing issue for this?

What happened?

Using revChatGPT V1, and can not get answer now. Stuck in error 403.

Steps to reproduce the problem

just like the demo in README.md, can not get answer

What should have happened?

get the answer

Version where the problem happens

3.1.5

What Python version are you running this with?

No response

What is your operating system ?

No response

Command Line Arguments

python3 main.py

Console logs

Traceback (most recent call last):
  File "/Users/trisoil/Desktop/Codes/Python/ChatGPT_Bot/main.py", line 10, in <module>
    for data in chatbot_1.ask(question):
  File "/Users/trisoil/Desktop/Codes/AI_Trisoil/venv/lib/python3.9/site-packages/revChatGPT/V1.py", line 360, in ask
    self.__check_response(response)
  File "/Users/trisoil/Desktop/Codes/AI_Trisoil/venv/lib/python3.9/site-packages/revChatGPT/V1.py", line 45, in wrapper
    out = func(*args, **kwargs)
  File "/Users/trisoil/Desktop/Codes/AI_Trisoil/venv/lib/python3.9/site-packages/revChatGPT/V1.py", line 436, in __check_response
    raise Error("OpenAI", response.status_code, response.text)
revChatGPT.V1.Error: ('OpenAI', 403, '<!DOCTYPE html>\n<html lang="en-US">\n   <head>\n      <title>Access denied</title>\n      <meta http-equiv="X-UA-Compatible" content="IE=Edge" />\n      <meta name="robots" content="noindex, nofollow" />\n      <meta name="viewport" content="width=device-width,initial-scale=1" />\n      <link rel="stylesheet" href="/cdn-cgi/styles/errors.css" media="screen" />\n      <script>\n(function(){if(document.addEventListener&&window.XMLHttpRequest&&JSON&&JSON.stringify){var e=function(a){var c=document.getElementById("error-feedback-survey"),d=document.getElementById("error-feedback-success"),b=new XMLHttpRequest;a={event:"feedback clicked",properties:{errorCode:1020,helpful:a,version:5}};b.open("POST","https://sparrow.cloudflare.com/api/v1/event");b.setRequestHeader("Content-Type","application/json");b.setRequestHeader("Sparrow-Source-Key","c771f0e4b54944bebf4261d44bd79a1e");\nb.send(JSON.stringify(a));c.classList.add("feedback-hidden");d.classList.remove("feedback-hidden")};document.addEventListener("DOMContentLoaded",function(){var a=document.getElementById("error-feedback"),c=document.getElementById("feedback-button-yes"),d=document.getElementById("feedback-button-no");"classList"in a&&(a.classList.remove("feedback-hidden"),c.addEventListener("click",function(){e(!0)}),d.addEventListener("click",function(){e(!1)}))})}})();\n</script>\n\n      <script>\n      (function(){function d(c){var b=document.getElementById("copy-label"),a=document.getElementById("cf-details-wrapper-expandable");c.target.checked?a.classList.add("expanded"):(a.classList.remove("expanded"),b.innerText="Click to copy")}if(document.addEventListener){var e=function(){var c=document.getElementById("copy-label");var b=document.getElementById("error-details").textContent;if(navigator.clipboard)navigator.clipboard.writeText(b);else{var a=document.createElement("textarea");a.value=b;a.style.top="0";a.style.left="0";a.style.position="fixed";document.body.appendChild(a);a.focus();a.select();document.execCommand("copy");document.body.removeChild(a)}c.innerText="Copied text to clipboard"};document.addEventListener("DOMContentLoaded",function(){var c=document.getElementById("error-details-checkbox"),b=document.getElementById("click-to-copy-btn");document.getElementById("copy-label").classList.remove("hidden");c.addEventListener("change",d);b.addEventListener("click",e)})}})();\n      </script>\n      <script defer src="https://performance.radar.cloudflare.com/beacon.js"></script>\n   </head>\n   <body>\n   <div class="cf-main-wrapper" role="main">\n      <div class="cf-header cf-section">\n         <div class="cf-error-title">\n            <h1>Access denied</h1>\n            <span class="cf-code-label">Error code <span>1020</span></span>\n         </div>\n         <div class="cf-error-description">\n            <p>You do not have access to chatgpt.duti.tech.</p><p>The site owner may have set restrictions that prevent you from accessing the site.</p>\n         </div>\n      </div>\n   </div>\n\n   <div class="cf-details-wrapper">\n      <div class="cf-section" role="region">\n         <div class="cf-expandable" id="cf-details-wrapper-expandable">\n            <label for="error-details-checkbox" title="Error details" class="cf-expandable-btn">\n               <p class="cf-dropdown-title">Error details</p>\n               <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAElBMVEUAAAAwMDAxMTEyMjIwMDAxMTF+89HTAAAABXRSTlMAf2CAMKS61bwAAABTSURBVCjPzcq7DcAgFENR5zMATfo06TNCViAS+6+CeFi6gglw4eLqaPVtaQpXnkApaQT/k0dw70EAUhCA1AnABGACMAGYAEwAkCOAydv+I5xaZhXWbQrD80TkkQAAAABJRU5ErkJggg=="\n               class="cf-caret-icon" id="caret-icon" alt="Caret icon" />\n            </label>\n\n            <input id="error-details-checkbox" class="hidden" type="checkbox">\n\n            <div class="cf-expandable-error-info hidden">\n               <p class="cf-error-copy-description">Provide the site owner this information.</p>\n               <button class="cf-click-to-copy-btn" id="click-to-copy-btn" title="Click to copy" type="button">\n<div class="cf-error-wrapper" id="error-details"><p class="cf-error-details-endpoint">I got an error when visiting chatgpt.duti.tech/api/conversation.</p>\n\n<p>Error code: 1020</p>\n<p>Ray ID: 7a3f2a7dafd804f2</p>\n<p>Country: HK</p>\n<p>Data center: hkg09</p>\n<p>IP: 178.173.225.155</p>\n<p>Timestamp: 2023-03-07 01:46:39 UTC</p>\n</div>\n                  <p class="cf-copy-label hidden" id="copy-label">Click to copy</p>\n               </button>\n            </div>\n         </div>\n      </div>\n\n      <div class="clearfix cf-footer cf-section" role="contentinfo">\n      <div class="cf-column">\n           <div class="feedback-hidden py-8 text-center" id="error-feedback">\n    <div id="error-feedback-survey" class="footer-line-wrapper">\n        Was this page helpful?\n        <button class="border border-solid bg-white cf-button cursor-pointer ml-4 px-4 py-2 rounded" id="feedback-button-yes" type="button">Yes</button>\n        <button class="border border-solid bg-white cf-button cursor-pointer ml-4 px-4 py-2 rounded" id="feedback-button-no" type="button">No</button>\n    </div>\n    <div class="feedback-success feedback-hidden" id="error-feedback-success">\n        Thank you for your feedback!\n    </div>\n</div>\n\n      </div>\n         <div class="cf-column cf-footer-line-wrapper text-center">\n            <p>\n               Performance &amp; security by <a rel="noopener noreferrer" href="https://www.cloudflare.com?utm_source=1020_error" target="_blank">Cloudflare <img class="external-link" title="Opens in new tab" src="/cdn-cgi/images/external.png" alt="External link"></a>\n            </p>\n         </div>\n      </div>\n   </div>\n<script defer src="https://static.cloudflareinsights.com/beacon.min.js/vaafb692b2aea4879b33c060e79fe94621666317369993" integrity="sha512-0ahDYl866UMhKuYcW078ScMalXqtFJggm7TmlUtp0UlD4eQk0Ixfnm5ykXKvGJNFjLMoortdseTfsRT8oCfgGA==" data-cf-beacon=\'{"rayId":"7a3f2a7dafd804f2","version":"2023.2.0","r":1,"token":"b03bb9f1bc4449dc8acd4ae196519534","si":100}\' crossorigin="anonymous"></script>\n</body>\n</html>\n')

Additional information

No response

sihai2933 commented 1 year ago

me too

acheong08 commented 1 year ago

Upgrade to latest version of revChatGPT

Triso1l commented 1 year ago

Upgrade works!!!!