terry3041 / pyChatGPT

An unofficial Python wrapper for OpenAI's ChatGPT API
GNU General Public License v3.0
1.35k stars 252 forks source link

403 error, I suspect OpenAI have implemented some barrier? #13

Closed floraldo closed 1 year ago

floraldo commented 1 year ago

My code used to run just fine, but now I'm getting a 403 error all the time. What could be the issue?

def chatGPT_response(prompt):

session_token = "valide token" api = ChatGPT(session_token) print(prompt)

resp = api.send_message(prompt) response = resp['message']

print(response) return response

terry3041 commented 1 year ago

My code used to run just fine, but now I'm getting a 403 error all the time. What could be the issue?

What is your library version? OpenAI has implemented Cloudflare's anti-bot protection yesterday and the library cannot be used if you don't update.