OPENAI_PROXY not working (#14833)

Replace this entire comment with:
- **Description:** OPENAI_PROXY is not working for openai==1.3.9, The
`proxies` argument is deprecated. The `http_client` argument should be
passed instead,
  - **Issue:** OPENAI_PROXY is not working,
  - **Dependencies:** None,
  - **Tag maintainer:** @hwchase17 ,
  - **Twitter handle:** timothy66666
pull/14881/head
Timothy Ji 7 months ago committed by GitHub
parent d82a3828f2
commit c5a685b10b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -153,7 +153,7 @@
"id": "58a9ddb1",
"metadata": {},
"source": [
"If you are behind an explicit proxy, you can use the OPENAI_PROXY environment variable to pass through"
"If you are behind an explicit proxy, you can specify the http_client to pass through"
]
},
{
@ -163,7 +163,11 @@
"metadata": {},
"outputs": [],
"source": [
"os.environ[\"OPENAI_PROXY\"] = \"http://proxy.yourcompany.com:8080\""
"pip install httpx\n",
"\n",
"import httpx\n",
"\n",
"openai = OpenAI(model_name=\"gpt-3.5-turbo-instruct\", http_client=httpx.Client(proxies=\"http://proxy.yourcompany.com:8080\"))"
]
}
],

Loading…
Cancel
Save