helgn commited on
Commit
9b3c507
·
verified ·
1 Parent(s): 9f661d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -21,16 +21,13 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
21
  return "What magic will you build ?"
22
 
23
  @tool
24
- def get_calories(meal:str) -> Union[str, None]:
25
  """
26
- Retrieves the calorie information for a given meal from the OpenFoodFacts API.
27
 
28
  Args:
29
  meal: The argument that describes the name or description of the meal to search for.
30
 
31
- Returns:
32
- Union: The calorie information as a string in the format 'X kcal per 100g',
33
- 'No data found' if no information is available, or None if the request fails.
34
  """
35
  search_url = "https://world.openfoodfacts.org/cgi/search.pl"
36
  params = {
 
21
  return "What magic will you build ?"
22
 
23
  @tool
24
+ def get_calories(meal:str) -> str:
25
  """
26
+ Retrieves the calorie information per 100g for a given meal from the OpenFoodFacts API.
27
 
28
  Args:
29
  meal: The argument that describes the name or description of the meal to search for.
30
 
 
 
 
31
  """
32
  search_url = "https://world.openfoodfacts.org/cgi/search.pl"
33
  params = {