Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added proxy option #3

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Added proxy option #3

wants to merge 11 commits into from

Conversation

Khang5687
Copy link

I added the option to specify proxies so that OpenAI API can be accessed through proxy. Please have a look!

@peterdemin
Copy link
Owner

Have you tried using HTTPS_PROXY env var, as documented here: https://requests.readthedocs.io/en/latest/user/advanced/#proxies?
This should work out of the box

@Khang5687
Copy link
Author

I think it would be beneficial for Windows users as they can specify proxy with --proxy option instead of manually adding an environment variable in Windows settings.

@peterdemin
Copy link
Owner

I see. Sounds good. Let's remove mentions of OPENAI_PROXY_SERVER and rely on standard HTTP_PROXY.

@Khang5687
Copy link
Author

I have changed in accordance to your wish, please have a thorough check if there should be any errors in my codes :)

Fixed duplicate import
Fixed a typo that would cause build errors
@Khang5687
Copy link
Author

I fixed an error in cli.py. For some reasons, git didn't push my fixed code, I had to update it directly through github. Please have a look :)

@peterdemin peterdemin self-requested a review March 4, 2023 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants