Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -85,7 +85,7 @@ class BasicAgent:
|
|
85 |
is_food_tool = FunctionTool.from_defaults(
|
86 |
name="is_food",
|
87 |
fn=is_food,
|
88 |
-
description="
|
89 |
)
|
90 |
|
91 |
|
@@ -645,7 +645,7 @@ def sum_list(numbers: list[float]) -> float:
|
|
645 |
print_coso(f"[TOOL] Result: {total}")
|
646 |
return total
|
647 |
|
648 |
-
def
|
649 |
food_items = {"burgers", "hot dogs", "salads", "fries", "ice cream"}
|
650 |
tags = {item: (item.lower() in food_items) for item in items}
|
651 |
result = ", ".join([f"{item}: {tags[item]}" for item in items])
|
|
|
85 |
is_food_tool = FunctionTool.from_defaults(
|
86 |
name="is_food",
|
87 |
fn=is_food,
|
88 |
+
description="Takes a list of strings and returns a string with all the elements of the list that are considered food (e.g., burgers, salads, fries, etc.)."
|
89 |
)
|
90 |
|
91 |
|
|
|
645 |
print_coso(f"[TOOL] Result: {total}")
|
646 |
return total
|
647 |
|
648 |
+
def is_food(items: list[str]) -> str:
|
649 |
food_items = {"burgers", "hot dogs", "salads", "fries", "ice cream"}
|
650 |
tags = {item: (item.lower() in food_items) for item in items}
|
651 |
result = ", ".join([f"{item}: {tags[item]}" for item in items])
|