返回提交历史
Modified
README.md
+3
-11
XFEstudio/gpt4free
Improve readme
13b496af
代码差异
1 个文件
+3
-11
@@ -226,22 +226,13 @@ import g4f
226
226
227
227
from g4f.Provider import (
228
228
AItianhu,
229
Acytoo,
230
229
Aichat,
231
Ails,
232
230
Bard,
233
231
Bing,
234
232
ChatBase,
235
233
ChatgptAi,
236
H2o,
237
HuggingChat,
238
OpenAssistant,
239
234
OpenaiChat,
240
Raycast,
241
Theb,
242
235
Vercel,
243
Vitalentum,
244
Ylokh,
245
236
You,
246
237
Yqcloud,
247
238
)
@@ -324,9 +315,9 @@ async def run_all():
324
315
asyncio.run(run_all())
325
316
```
326
317
327
##### Proxy Support:
318
##### Proxy and Timeout Support:
328
319
329
All providers support specifying a proxy in the create functions.
320
All providers support specifying a proxy and increasing timeout in the create functions.
330
321
331
322
```py
332
323
import g4f
@@ -336,6 +327,7 @@ response = g4f.ChatCompletion.create(
336
327
messages=[{"role": "user", "content": "Hello"}],
337
328
proxy="http://host:port",
338
329
# or socks5://user:pass@host:port
330
timeout=120, # in secs
339
331
)
340
332
341
333
print(f"Result:", response)