Commit f8f01a61

stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
2024-07-19 00:53:49
chore(docs): document how to do per-request http client customization (#1560)
1 parent 8ce46fe
Changed files (1)
README.md
@@ -575,6 +575,12 @@ client = OpenAI(
 )
 ```
 
+You can also customize the client on a per-request basis by using `with_options()`:
+
+```python
+client.with_options(http_client=DefaultHttpxClient(...))
+```
+
 ### Managing HTTP resources
 
 By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.