Fix Tool.from_hub with correct file path

This commit is contained in:
Aymeric 2025-01-06 13:47:22 +01:00
parent 20aa691b26
commit 4ac9050368
1 changed files with 2 additions and 2 deletions

View File

@ -509,7 +509,7 @@ class Tool:
print("TOOL CODE:\n", tool_code) print("TOOL CODE:\n", tool_code)
# Load module from file path # 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) module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module) spec.loader.exec_module(module)