System environment value proxy seems not working here.
Is that possible to add a proxy config for openai python lib?
Such as:
## Generate by GPT4
import openai
from requests.sessions import Session
# Create a Requests Session instance
session = Session()
session.proxies = {
'http': 'http://your-proxy-address:port',
'https': 'http://your-proxy-address:port',
}
# Modify the session used by the OpenAI client
openai.api_requestor._client.session = session
# Now you can use the OpenAI client, and it will make requests through the proxy you configured
response = openai.Completion.create(
engine="text-davinci-003",
prompt="Hello, world!",
max_tokens=5
)
System environment value proxy seems not working here. Is that possible to add a proxy config for openai python lib?
Such as:
or