Spaces:
Sleeping
Sleeping
Update tool.py
Browse files
tool.py
CHANGED
@@ -3,7 +3,7 @@ from typing import Optional
|
|
3 |
|
4 |
class SimpleTool(Tool):
|
5 |
name = "CulinAI -- your AI Recipe Assistant"
|
6 |
-
description = "Gets a recipe suggestion based on provided ingredients, dietary preference, and your laziness level (1=active chef, 10=super lazy). After finding a recipe,
|
7 |
inputs = {"ingredients":{"type":"string","description":"A comma-separated string of available ingredients."},"diet":{"type":"string","nullable":True,"description":"Dietary restrictions such as 'vegetarian', 'vegan', or 'gluten free'. Defaults to None."},"laziness":{"type":"integer","nullable":True,"description":"An integer from 1 (active) to 10 (super lazy); higher means recipes with quicker prep."}}
|
8 |
output_type = "string"
|
9 |
|
@@ -11,8 +11,8 @@ class SimpleTool(Tool):
|
|
11 |
def forward(self, ingredients: str, diet: Optional[str] = None, laziness: Optional[int] = 5) -> str:
|
12 |
"""
|
13 |
Gets a recipe suggestion based on provided ingredients, dietary preference,
|
14 |
-
and your laziness level (1=active chef, 10=super lazy). After finding a recipe,
|
15 |
-
retrieves detailed recipe information.
|
16 |
Args:
|
17 |
ingredients: A comma-separated string of available ingredients.
|
18 |
diet: Dietary restrictions such as 'vegetarian', 'vegan', or 'gluten free'. Defaults to None.
|
|
|
3 |
|
4 |
class SimpleTool(Tool):
|
5 |
name = "CulinAI -- your AI Recipe Assistant"
|
6 |
+
description = "Gets a recipe suggestion based on provided ingredients, dietary preference, and your laziness level (1=active chef, 10=super lazy). After finding a recipe, it retrieves detailed recipe information.\nFor dietary restriction, you can select from: none, vegetarian, vegan, gluten free, ketogenic, paleo, pescetarian, whole30, halal, or low fodmap."
|
7 |
inputs = {"ingredients":{"type":"string","description":"A comma-separated string of available ingredients."},"diet":{"type":"string","nullable":True,"description":"Dietary restrictions such as 'vegetarian', 'vegan', or 'gluten free'. Defaults to None."},"laziness":{"type":"integer","nullable":True,"description":"An integer from 1 (active) to 10 (super lazy); higher means recipes with quicker prep."}}
|
8 |
output_type = "string"
|
9 |
|
|
|
11 |
def forward(self, ingredients: str, diet: Optional[str] = None, laziness: Optional[int] = 5) -> str:
|
12 |
"""
|
13 |
Gets a recipe suggestion based on provided ingredients, dietary preference,
|
14 |
+
and your laziness level (1=active chef, 10=super lazy). After finding a recipe,
|
15 |
+
it retrieves detailed recipe information.
|
16 |
Args:
|
17 |
ingredients: A comma-separated string of available ingredients.
|
18 |
diet: Dietary restrictions such as 'vegetarian', 'vegan', or 'gluten free'. Defaults to None.
|