From 4ac9050368de51ddd6d76185abd6551749ea29bd Mon Sep 17 00:00:00 2001 From: Aymeric Date: Mon, 6 Jan 2025 13:47:22 +0100 Subject: [PATCH] Fix Tool.from_hub with correct file path --- src/smolagents/tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/smolagents/tools.py b/src/smolagents/tools.py index 010ea11..4504bc7 100644 --- a/src/smolagents/tools.py +++ b/src/smolagents/tools.py @@ -506,10 +506,10 @@ class Tool: with open(module_path, "w") as f: f.write(tool_code) - print("TOOLCODE:\n", tool_code) + print("TOOL CODE:\n", tool_code) # Load module from file path - spec = importlib.util.spec_from_file_location("custom_tool", module_path) + spec = importlib.util.spec_from_file_location("tool", module_path) module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module)