mirror of
https://github.com/hiyouga/LlamaFactory.git
synced 2026-02-01 08:13:38 +00:00
[misc] fix constants (#9008)
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user