From 21ded02bc15d62848b7ee3dad3b8af0b0f90da0c Mon Sep 17 00:00:00 2001 From: octo-patch Date: Tue, 28 Apr 2026 10:34:39 +0800 Subject: [PATCH] docs: fix inconsistent FinalAnswerTool import in unit1 tutorial (fixes #579) The partial import snippet showed FinalAnswerTool imported from smolagents, but the actual Space template and the complete app.py section in the same file import it from tools.final_answer. Update the partial snippet to be consistent with the real template structure. Co-Authored-By: Octopus --- units/en/unit1/tutorial.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/units/en/unit1/tutorial.mdx b/units/en/unit1/tutorial.mdx index fa2dcda7a..542599293 100644 --- a/units/en/unit1/tutorial.mdx +++ b/units/en/unit1/tutorial.mdx @@ -55,11 +55,12 @@ Let's break down the code together: - The file begins with some simple but necessary library imports ```python -from smolagents import CodeAgent, DuckDuckGoSearchTool, FinalAnswerTool, InferenceClientModel, load_tool, tool +from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel, load_tool, tool import datetime import requests import pytz import yaml +from tools.final_answer import FinalAnswerTool ``` As outlined earlier, we will directly use the **CodeAgent** class from **smolagents**.