gencay / vscode-chatgpt

An unofficial Visual Studio Code - OpenAI ChatGPT integration
ISC License
3.5k stars 755 forks source link

Feature Request: API call support proxy server #182

Closed onesecurity closed 1 year ago

onesecurity commented 1 year ago

Chatgpt: Proxy Server [Optional] The proxy server you'd like to use. Supports HTTP proxies only, don't provide the protocol in the setting. Format example:

authenticated:myUsername:myPassword@my.proxy.com:3001

anonymous: 204.137.172.37:999

Only available for Browser Auto-login method

Is it possible to support proxy servers when calling the API?

Deniffer commented 1 year ago

I came to the same situation, it would be helpful it the api support proxy like http/https/socks5.

Since i configured the right proxy for my ubuntu20.04, and it can access the https://api.openai.com/v1/chat/completions as well as google.com (by curl method), and i tried by using http(s) and socks5 proxy.

But once i use remote ssh to connect the ubuntu20.04 and try to use chatgpt-vscode , it came up to Connection Timeout.

So i wonder if there is a way for us to use proxy for API call ? like the browser does.

YeSho-cpp commented 1 year ago

the setting json on vscode add "remote.extensionKind": {"gencay.vscode-chatgpt": [ "ui" ]

ZhengQinLai commented 1 year ago

the setting json on vscode add "remote.extensionKind": {"gencay.vscode-chatgpt": [ "ui" ]

LGTM

gencay commented 1 year ago

@Deniffer could you also confirm whether the recommendation from @YeSho-cpp worked for you?