gdms commited on
Commit
335b1ff
·
1 Parent(s): 222e01c

ajuste na tool de vegetais

Browse files
Files changed (1) hide show
  1. tools.py +6 -6
tools.py CHANGED
@@ -630,7 +630,7 @@ def calculate_excel_sum_by_columns_tool(
630
  VEGETABLES = {
631
  "lettuce", "carrot", "broccoli", "spinach", "kale", "celery", "cabbage",
632
  "sweet potato", "radish", "turnip", "cauliflower", "beet", "onion", "garlic",
633
- "green bean", "pea", "chard", "arugula", "basil", "parsley", "dill", "leek",
634
  "asparagus", "eggplant", "okra", "pumpkin", "squash", "yam", "collard green",
635
  "mustard green", "brussels sprout", "scallion", "fennel", "rhubarb", "artichoke",
636
  "endive", "escarole", "bok choy", "watercress", "turnip green"
@@ -665,11 +665,11 @@ def filter_vegetables_from_list_tool(items: list[str]) -> list[str]:
665
  Returns:
666
  List of vegetable items
667
  """
668
- lista: list[str]= []
669
  for i in items:
670
- norm = normalize_item(i)
671
- if norm in VEGETABLES:
672
- lista.append(norm)
673
 
674
- return lista
675
 
 
630
  VEGETABLES = {
631
  "lettuce", "carrot", "broccoli", "spinach", "kale", "celery", "cabbage",
632
  "sweet potato", "radish", "turnip", "cauliflower", "beet", "onion", "garlic",
633
+ "pea", "chard", "arugula", "basil", "parsley", "dill", "leek",
634
  "asparagus", "eggplant", "okra", "pumpkin", "squash", "yam", "collard green",
635
  "mustard green", "brussels sprout", "scallion", "fennel", "rhubarb", "artichoke",
636
  "endive", "escarole", "bok choy", "watercress", "turnip green"
 
665
  Returns:
666
  List of vegetable items
667
  """
668
+ result =[]
669
  for i in items:
670
+
671
+ if normalize_item(i) in VEGETABLES:
672
+ result.append(i)
673
 
674
+ return result
675