diff options
author | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-02-21 17:02:54 +0100 |
---|---|---|
committer | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-02-21 17:02:54 +0100 |
commit | 0a0698c7f3fa117e95eaf9b017e4122d15ef4566 (patch) | |
tree | 8d2997750aef7bf9ae0f9ec63410279119fffb69 /docs/leagcy.md | |
parent | Merge pull request #1603 from xtekky/index (diff) | |
download | gpt4free-0a0698c7f3fa117e95eaf9b017e4122d15ef4566.tar gpt4free-0a0698c7f3fa117e95eaf9b017e4122d15ef4566.tar.gz gpt4free-0a0698c7f3fa117e95eaf9b017e4122d15ef4566.tar.bz2 gpt4free-0a0698c7f3fa117e95eaf9b017e4122d15ef4566.tar.lz gpt4free-0a0698c7f3fa117e95eaf9b017e4122d15ef4566.tar.xz gpt4free-0a0698c7f3fa117e95eaf9b017e4122d15ef4566.tar.zst gpt4free-0a0698c7f3fa117e95eaf9b017e4122d15ef4566.zip |
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 |