Spaces:
Sleeping
Sleeping
cyberosa
commited on
Commit
·
5e58bba
1
Parent(s):
a1969f6
updating tools
Browse files- app.py +2 -2
- tools/calories_checker.py +2 -2
app.py
CHANGED
|
@@ -50,7 +50,7 @@ prompt_templates["final_answer"] = {
|
|
| 50 |
}
|
| 51 |
|
| 52 |
# print("Loaded prompt templates:", prompt_templates)
|
| 53 |
-
|
| 54 |
agent = CodeAgent(
|
| 55 |
model=model,
|
| 56 |
tools=[
|
|
@@ -62,7 +62,7 @@ agent = CodeAgent(
|
|
| 62 |
grammar=None,
|
| 63 |
planning_interval=None,
|
| 64 |
name="NutriCoach",
|
| 65 |
-
description="
|
| 66 |
prompt_templates=prompt_templates,
|
| 67 |
)
|
| 68 |
|
|
|
|
| 50 |
}
|
| 51 |
|
| 52 |
# print("Loaded prompt templates:", prompt_templates)
|
| 53 |
+
|
| 54 |
agent = CodeAgent(
|
| 55 |
model=model,
|
| 56 |
tools=[
|
|
|
|
| 62 |
grammar=None,
|
| 63 |
planning_interval=None,
|
| 64 |
name="NutriCoach",
|
| 65 |
+
description="Assistant to help you with nutritional information, meal planning, and food-related queries.",
|
| 66 |
prompt_templates=prompt_templates,
|
| 67 |
)
|
| 68 |
|
tools/calories_checker.py
CHANGED
|
@@ -8,14 +8,14 @@ import json
|
|
| 8 |
class CaloriesCheckerTool(Tool):
|
| 9 |
name = "calories_check"
|
| 10 |
description = """Checks the calories and other components of food given n a query with the food you want to check,
|
| 11 |
-
it returns a dictionary with the
|
| 12 |
inputs = {
|
| 13 |
"query": {
|
| 14 |
"type": "string",
|
| 15 |
"description": "The query with the food and ingredients you want to check.",
|
| 16 |
}
|
| 17 |
}
|
| 18 |
-
output_type = "
|
| 19 |
|
| 20 |
def __init__(self, *args, **kwargs):
|
| 21 |
self.is_initialized = False
|
|
|
|
| 8 |
class CaloriesCheckerTool(Tool):
|
| 9 |
name = "calories_check"
|
| 10 |
description = """Checks the calories and other components of food given n a query with the food you want to check,
|
| 11 |
+
it returns a dictionary with all the nutritional information of the food"""
|
| 12 |
inputs = {
|
| 13 |
"query": {
|
| 14 |
"type": "string",
|
| 15 |
"description": "The query with the food and ingredients you want to check.",
|
| 16 |
}
|
| 17 |
}
|
| 18 |
+
output_type = "any"
|
| 19 |
|
| 20 |
def __init__(self, *args, **kwargs):
|
| 21 |
self.is_initialized = False
|