wphoenix commited on
Commit
d6ef9fd
·
verified ·
1 Parent(s): 33bbcf1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -42,7 +42,7 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's important to specify the ret
42
  return "What magic will you build ?"
43
 
44
  @tool
45
- def fetch_active_crypto()-> str: #it's important to specify the return type
46
  #Keep this format for the description / args / args description but feel free to modify the tool
47
  """A tool that fetches all active crypto by market cap in USD
48
  """
@@ -63,7 +63,7 @@ def fetch_active_crypto()-> str: #it's important to specify the return type
63
  try:
64
  response = session.get(url, params=parameters)
65
  data = json.loads(response.text)
66
- return str(top_10_items_from_json(data))
67
  except (ConnectionError, Timeout, TooManyRedirects) as e:
68
  return e
69
 
 
42
  return "What magic will you build ?"
43
 
44
  @tool
45
+ def fetch_active_crypto()-> dict[str, int]: #it's important to specify the return type
46
  #Keep this format for the description / args / args description but feel free to modify the tool
47
  """A tool that fetches all active crypto by market cap in USD
48
  """
 
63
  try:
64
  response = session.get(url, params=parameters)
65
  data = json.loads(response.text)
66
+ return top_10_items_from_json(data)
67
  except (ConnectionError, Timeout, TooManyRedirects) as e:
68
  return e
69