Skip to content

Commit b5f4324

Browse files
docs(readme): fix http client proxies example (#1932)
1 parent 13b0075 commit b5f4324

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Diff for: README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -468,18 +468,19 @@ can also get all the extra fields on the Pydantic model as a dict with
468468

469469
You can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:
470470

471-
- Support for proxies
472-
- Custom transports
471+
- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)
472+
- Custom [transports](https://www.python-httpx.org/advanced/transports/)
473473
- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality
474474

475475
```python
476+
import httpx
476477
from openai import OpenAI, DefaultHttpxClient
477478

478479
client = OpenAI(
479480
# Or use the `OPENAI_BASE_URL` env var
480481
base_url="http://my.test.server.example.com:8083",
481482
http_client=DefaultHttpxClient(
482-
proxies="http://my.test.proxy.example.com",
483+
proxy="http://my.test.proxy.example.com",
483484
transport=httpx.HTTPTransport(local_address="0.0.0.0"),
484485
),
485486
)

0 commit comments

Comments
 (0)