Yago Bolivar
commited on
Commit
·
2803e9d
1
Parent(s):
af6bf18
refactor: update identify_file method signature to return dict and remove tool decorator
Browse files
src/file_processing_tool.py
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
from __future__ import annotations
|
2 |
-
from smolagents import tool
|
3 |
import os
|
4 |
import mimetypes
|
5 |
-
from typing import Self
|
6 |
|
7 |
import os
|
8 |
import mimetypes
|
@@ -31,8 +30,7 @@ class FileIdentifier:
|
|
31 |
for ext in details["extensions"]:
|
32 |
self.extension_to_type[ext] = simple_type
|
33 |
|
34 |
-
|
35 |
-
def identify_file(self: Self, filepath: str):
|
36 |
"""
|
37 |
Identifies the file type and suggests a processing action.
|
38 |
|
|
|
1 |
from __future__ import annotations
|
|
|
2 |
import os
|
3 |
import mimetypes
|
4 |
+
from typing import Self
|
5 |
|
6 |
import os
|
7 |
import mimetypes
|
|
|
30 |
for ext in details["extensions"]:
|
31 |
self.extension_to_type[ext] = simple_type
|
32 |
|
33 |
+
def identify_file(self: Self, filepath: str) -> dict: # Standard instance method signature
|
|
|
34 |
"""
|
35 |
Identifies the file type and suggests a processing action.
|
36 |
|