evyatar9 / GptHidra

GptHidra is a Ghidra plugin that uses the OpenAI Chat GPT to explain functions. With GptHidra, you can easily understand the purpose and behavior of functions in your codebase. Now with GPT4 Support!
305 stars 22 forks source link

urllib2.HTTPError: HTTP Error 429: Too Many Requests #5

Closed BinaryBobcat closed 1 year ago

BinaryBobcat commented 1 year ago

I have been attempting to use this tool for months. I deleted and created new keys but still get this error.

Traceback (most recent call last):
  File "/home/deadbeef/ghidra_scripts/GptHidra.py", line 84, in <module>
    explanation = explainFunction(c_code)
  File "/home/deadbeef/ghidra_scripts/GptHidra.py", line 84, in <module>
    explanation = explainFunction(c_code)
  File "/home/deadbeef/ghidra_scripts/GptHidra.py", line 43, in explainFunction
    response = json.loads(urllib2.urlopen(req).read())
  File "/opt/ghidra_10.2.2_PUBLIC/Ghidra/Features/Python/data/jython-2.7.3/Lib/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/opt/ghidra_10.2.2_PUBLIC/Ghidra/Features/Python/data/jython-2.7.3/Lib/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/opt/ghidra_10.2.2_PUBLIC/Ghidra/Features/Python/data/jython-2.7.3/Lib/urllib2.py", line 547, in http_response
    response = self.parent.error(
  File "/opt/ghidra_10.2.2_PUBLIC/Ghidra/Features/Python/data/jython-2.7.3/Lib/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/opt/ghidra_10.2.2_PUBLIC/Ghidra/Features/Python/data/jython-2.7.3/Lib/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/opt/ghidra_10.2.2_PUBLIC/Ghidra/Features/Python/data/jython-2.7.3/Lib/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 429: Too Many Requests

Any ideas?

evyatar9 commented 1 year ago

Hi @BinaryBobcat,

If you are unable to access the API (429), it may be because your free trial period has ended (3 months). In that case, you can create a new account to continue using the service.

Based on the thread https://community.openai.com/t/error-429-too-many-requests/31418/53, it appears that the free version of ChatGPT does not include API access. API usage is a separate service that requires a subscription. To access the ChatGPT API, you will need to sign up for an API subscription. Pricing details for the ChatGPT API can be found on the OpenAI Pricing page 3.

Thank you for bringing this issue to our attention.