ChristopheZhao / ChaGPT-API-Call

Python calls ChatGPT API, multi-turn dialogue support
112 stars 38 forks source link

add proxies to overcome connection error #10

Open stevie1023 opened 1 year ago

stevie1023 commented 1 year ago

Hi, there appears to be a connection error when it tries to fetch the openai api, how and where can i add a proxy setting to overcome this issue? could you please provide a minimal script? Thanks in advance!

ChristopheZhao commented 1 year ago

@stevie1023 Hi, what kind of error did it report when you ran your code? And have you tried using a VPN?

stevie1023 commented 1 year ago

hi, this is the error reported and i have no idea how to add a proxy to the script :) image

ChristopheZhao commented 1 year ago

@stevie1023 I solved this problem by using VPN,which I recommend you use because OpenAI does not support network access to its service in some regions.

stevie1023 commented 1 year ago

hi, thanks for your reply and I'll try that.