XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

add proxy and remove stream

9ab880a8
Bagus Indrayana <bagusindrayanaindo@gmail.com>
提交于

代码差异

1 个文件 +1 -1
Modified g4f/Provider/Providers/V50.py +1 -1
@@ -36,7 +36,7 @@ def _create_completion(model: str, messages: list, stream: bool, temperature: fl
36 36 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36'
37 37 }
38 38 response = requests.post("https://p5.v50.ltd/api/chat-process",
39 json=payload, headers=headers, stream=True)
39 json=payload, headers=headers, proxies=kwargs['proxy'] if 'proxy' in kwargs else {})
40 40 yield response.text
41 41
42 42 params = f'g4f.Providers.{os.path.basename(__file__)[:-3]} supports: ' + \