From c5aecaf31de46ace2a7bc243810b995957b84c0b Mon Sep 17 00:00:00 2001 From: Cocoon-Break <54054995+kuishou68@users.noreply.github.com> Date: Mon, 20 Apr 2026 12:22:55 +0800 Subject: [PATCH] [data] fix SeedToolUtils.tool_extractor returns content when no tool calls found (#10408) Signed-off-by: Cocoon-Break <54054995+kuishou68@users.noreply.github.com> --- src/llamafactory/data/tool_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llamafactory/data/tool_utils.py b/src/llamafactory/data/tool_utils.py index 4c3ec5ce6..7b77078e8 100644 --- a/src/llamafactory/data/tool_utils.py +++ b/src/llamafactory/data/tool_utils.py @@ -758,7 +758,7 @@ class SeedToolUtils(ToolUtils): results.append(FunctionCall(func_name.strip(), json.dumps(args_dict, ensure_ascii=False))) - return results + return results if results else content class LingToolUtils(QwenToolUtils):