Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7a83e0f

Browse files
stainless-app[bot]stainless-bot
authored andcommittedDec 9, 2024·
docs(readme): fix http client proxies example (#1932)
1 parent 995cce0 commit 7a83e0f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎README.md

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

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

627-
- Support for proxies
628-
- Custom transports
627+
- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)
628+
- Custom [transports](https://www.python-httpx.org/advanced/transports/)
629629
- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality
630630

631631
```python
632+
import httpx
632633
from openai import OpenAI, DefaultHttpxClient
633634

634635
client = OpenAI(
635636
# Or use the `OPENAI_BASE_URL` env var
636637
base_url="http://my.test.server.example.com:8083/v1",
637638
http_client=DefaultHttpxClient(
638-
proxies="http://my.test.proxy.example.com",
639+
proxy="http://my.test.proxy.example.com",
639640
transport=httpx.HTTPTransport(local_address="0.0.0.0"),
640641
),
641642
)

0 commit comments

Comments
 (0)
Please sign in to comment.