返回提交历史
Modified
g4f/providers/tool_support.py
+2
-3
XFEstudio/gpt4free
Add ToolSupportProvider
d11aabcd
代码差异
1 个文件
+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"]