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

XFEstudio/gpt4free

Add ToolSupportProvider

d11aabcd
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +2 -3
Modified g4f/providers/tool_support.py +2 -3
@@ -31,12 +31,11 @@ class ToolSupportProvider(AsyncGeneratorProvider):
31 31 stream, logging=False,
32 32 has_images=images is not None
33 33 )
34 if response_format is None:
35 response_format = {"type": "json"}
36
37 34 if tools is not None:
38 35 if len(tools) > 1:
39 36 raise ValueError("Only one tool is supported.")
37 if response_format is None:
38 response_format = {"type": "json"}
40 39 tools = tools.pop()
41 40 lines = ["Respone in JSON format."]
42 41 properties = tools["function"]["parameters"]["properties"]