mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-31 20:19:43 +00:00
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
This commit is contained in:
parent
d82a3828f2
commit
c5a685b10b
@ -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…
Reference in New Issue
Block a user