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

Add possibility to set a proxy for openai API access #5243

Closed
ymaurer opened this issue May 25, 2023 · 0 comments · Fixed by #5246
Closed

Add possibility to set a proxy for openai API access #5243

ymaurer opened this issue May 25, 2023 · 0 comments · Fixed by #5246

Comments

@ymaurer
Copy link
Contributor

ymaurer commented May 25, 2023

Feature request

For a deployment behind a corporate proxy, it's useful to be able to access the API by specifying an explicit proxy.

Motivation

Currently it's possible to do this by setting the environment variables http_proxy / https_proxy to set a proxy for the whole python interpreter. However this then prevents access to other internal servers. accessing other network resources (e.g. a vector database on a different server, corporate S3 storage etc.) should not go through the proxy. So it's important to be able to just proxy requests for externally hosted APIs. We are working with the OpenAI API and currently we cannot both access those and our qdrant database on another server.

Your contribution

Since the openai python package supports the proxy parameter, this is relatively easy to implement for the OpenAI API. I'll submit a PR.

dev2049 pushed a commit that referenced this issue May 25, 2023
# Added the option of specifying a proxy for the OpenAI API

Fixes #5243

Co-authored-by: Yves Maurer <>
Undertone0809 pushed a commit to Undertone0809/langchain that referenced this issue Jun 19, 2023
…ai#5246)

# Added the option of specifying a proxy for the OpenAI API

Fixes langchain-ai#5243

Co-authored-by: Yves Maurer <>
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 a pull request may close this issue.

1 participant