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

XFEstudio/gpt4free

DeepInfra: Add max_tokens and stop

0d4f6377
nullstreak <139914347+nullstreak@users.noreply.github.com>
提交于

代码差异

1 个文件 +2 -0
Modified g4f/Provider/DeepInfra.py +2 -0
@@ -61,6 +61,8 @@ class DeepInfra(AsyncGeneratorProvider, ProviderModelMixin):
61 61 'model' : cls.get_model(model),
62 62 'messages': messages,
63 63 'temperature': kwargs.get("temperature", 0.7),
64 'max_tokens': kwargs.get("max_tokens", 512),
65 'stop': kwargs.get("stop", []),
64 66 'stream' : True
65 67 }
66 68 async with session.post('https://api.deepinfra.com/v1/openai/chat/completions',