[misc] fix constants (#9008)

This commit is contained in:
Yaowei Zheng
2025-08-23 23:04:30 +08:00
committed by GitHub
parent 0ab0be9df2
commit ec41ef08aa
6 changed files with 40 additions and 16 deletions

View File

@@ -355,6 +355,7 @@ class GLM4MOEToolUtils(QwenToolUtils):
return "\n".join(function_texts)
class SeedToolUtils(ToolUtils):
r"""Seed tool using template."""
@@ -387,8 +388,7 @@ class SeedToolUtils(ToolUtils):
def tool_extractor(content: str) -> Union[str, list["FunctionCall"]]:
results = []
regex = re.compile(
r"<seed:tool_call>\s*<function=\s*([^\s<]+)\s*(.*?)\s*</function>\s*</seed:tool_call>",
re.DOTALL
r"<seed:tool_call>\s*<function=\s*([^\s<]+)\s*(.*?)\s*</function>\s*</seed:tool_call>", re.DOTALL
)
for func_name, params_block in re.findall(regex, content):
args_dict = {}
@@ -405,6 +405,7 @@ class SeedToolUtils(ToolUtils):
return results
TOOLS = {
"default": DefaultToolUtils(),
"glm4": GLM4ToolUtils(),