Tesvia commited on
Commit
09fe455
·
verified ·
1 Parent(s): 05193be

Upload tools.py

Browse files
Files changed (1) hide show
  1. tools.py +7 -2
tools.py CHANGED
@@ -37,12 +37,17 @@ class ExcelLoaderTool(Tool):
37
  Read .xlsx/.xls/.csv from disk and return rows as a list of dictionaries with string keys.
38
  """
39
  inputs = {
40
- "path": {"type": "string", "description": "Path to .csv/.xls/.xlsx file", "required": True},
 
 
 
 
41
  "sheet": {
42
  "type": "string",
43
  "description": "Sheet name or index (optional, required for Excel files only)",
44
  "required": False,
45
  "default": "",
 
46
  }
47
  }
48
  output_type = "array"
@@ -52,7 +57,7 @@ class ExcelLoaderTool(Tool):
52
  if not os.path.isfile(path):
53
  raise FileNotFoundError(path)
54
  ext = os.path.splitext(path)[1].lower()
55
- # Handle empty string as None for sheet
56
  if sheet == "":
57
  sheet = None
58
  if ext == ".csv":
 
37
  Read .xlsx/.xls/.csv from disk and return rows as a list of dictionaries with string keys.
38
  """
39
  inputs = {
40
+ "path": {
41
+ "type": "string",
42
+ "description": "Path to .csv/.xls/.xlsx file",
43
+ "required": True
44
+ },
45
  "sheet": {
46
  "type": "string",
47
  "description": "Sheet name or index (optional, required for Excel files only)",
48
  "required": False,
49
  "default": "",
50
+ "nullable": True
51
  }
52
  }
53
  output_type = "array"
 
57
  if not os.path.isfile(path):
58
  raise FileNotFoundError(path)
59
  ext = os.path.splitext(path)[1].lower()
60
+ # Handle empty string as None for sheet
61
  if sheet == "":
62
  sheet = None
63
  if ext == ".csv":