diff options
Diffstat (limited to '')
-rw-r--r-- | docs/leagcy.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/leagcy.md b/docs/leagcy.md index 224bc098..e8808381 100644 --- a/docs/leagcy.md +++ b/docs/leagcy.md @@ -179,4 +179,22 @@ async def run_all(): asyncio.run(run_all()) ``` +##### Proxy and Timeout Support + +All providers support specifying a proxy and increasing timeout in the create functions. + +```python +import g4f + +response = g4f.ChatCompletion.create( + model=g4f.models.default, + messages=[{"role": "user", "content": "Hello"}], + proxy="http://host:port", + # or socks5://user:pass@host:port + timeout=120, # in secs +) + +print(f"Result:", response) +``` + [Return to Home](/)
\ No newline at end of file |