revert: 恢复工具调用正则最小长度限制
This commit is contained in:
1 parent
404ea1947b
commit
1c38412e42
1 file changed
+1
-1
+1
-1
@@ -748,7 +748,7 @@ class ToolClient:
|
||||
remaining_text = re.sub(think_pattern, "", remaining_text, flags=re.DOTALL)
|
||||
|
||||
tool_calls = []; json_strs = []; errors = []
|
||||
tool_pattern = r"<(?:tool_use|tool_call)>((?:(?!<(?:tool_use|tool_call)>).){0,}?)</(?:tool_use|tool_call)>"}
|
||||
tool_pattern = r"<(?:tool_use|tool_call)>((?:(?!<(?:tool_use|tool_call)>).){15,}?)</(?:tool_use|tool_call)>"}
|
||||
tool_all = re.findall(tool_pattern, remaining_text, re.DOTALL)
|
||||
|
||||
if tool_all:
|
||||
|
||||
Reference in new issue
Block a user