JusticeRage / Gepetto

IDA plugin which queries uses language models to speed up reverse-engineering
GNU General Public License v3.0
2.87k stars 263 forks source link

I can't connect to open.ai #27

Closed apol3t closed 1 year ago

apol3t commented 1 year ago

I am getting the error mentioned in the code below, what do you think I can do?

---------------------------------------------------------------------------------------
Python 3.8.7 (tags/v3.8.7:6503f05, Dec 21 2020, 17:59:51) [MSC v.1928 64 bit (AMD64)] 
IDAPython v7.4.0 final (serial 0) (c) The IDAPython Team <idapython@googlegroups.com>
---------------------------------------------------------------------------------------
Request to gpt-3.5-turbo sent...
WARNING:urllib3.connectionpool:Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000002D7A874AB20>: Failed to establish a new connection: [WinError 10061] Hedef makine etkin olarak reddettiğinden bağlantı kurulamadı')': /v1/chat/completions
WARNING:urllib3.connectionpool:Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000002D7A8733190>: Failed to establish a new connection: [WinError 10061] Hedef makine etkin olarak reddettiğinden bağlantı kurulamadı')': /v1/chat/completions
gpt-3.5-turbo could not complete the request: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by ProxyError('Unable to connect to proxy', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000002D7A8733310>: Failed to establish a new connection: [WinError 10061] Hedef makine etkin olarak reddettiğinden bağlantı kurulamadı')))
Request to gpt-3.5-turbo sent...
WARNING:urllib3.connectionpool:Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000002D7A8733E50>: Failed to establish a new connection: [WinError 10061] Hedef makine etkin olarak reddettiğinden bağlantı kurulamadı')': /v1/chat/completions
WARNING:urllib3.connectionpool:Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000002D7A8737100>: Failed to establish a new connection: [WinError 10061] Hedef makine etkin olarak reddettiğinden bağlantı kurulamadı')': /v1/chat/completions
gpt-3.5-turbo could not complete the request: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by ProxyError('Unable to connect to proxy', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000002D7A8737220>: Failed to establish a new connection: [WinError 10061] Hedef makine etkin olarak reddettiğinden bağlantı kurulamadı')))

some titles are in Turkish sorry for this

JusticeRage commented 1 year ago

This seems to be the key: Hedef makine etkin olarak reddettiğinden bağlantı kurulamadı Most likely, the error is within your network here and not the plugin. Verify that you can manually connect to api.openai.com.

apol3t commented 1 year ago

The Gepetto version in this link is working, so I can connect to api.openai.com properly. https://plugins.hex-rays.com/gepetto I think I'm doing the proxy settings wrong. What should the proxy settings be? Is there any tutorial for this?

JusticeRage commented 1 year ago

Are you setting a particular value for the proxy? This value should be left blank unless it's needed

apol3t commented 1 year ago

I guess I'm a complete idiot. Leaving the proxy section blank solved the problem. I was adding the default open.ai proxy address you specified . sorry to disturb you

JusticeRage commented 1 year ago

No worries, I'm glad this is fixed!