Da-Rabbit-Hole commited on
Commit
5b9e3fb
·
verified ·
1 Parent(s): db0d289

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -2,16 +2,16 @@ from smolagents import tool
2
  import requests
3
  import pandas as pd
4
 
5
- @tool
6
- def my_custom_tool(arg1: str, arg2: int) -> str:
7
- """A placeholder tool that simply echoes its inputs.
8
- Args:
9
- arg1: The first argument.
10
- arg2: The second argument.
11
- Returns:
12
- A short status string.
13
- """
14
- return f"arg1={arg1}, arg2={arg2}"
15
 
16
  @tool
17
  def get_crypto_prices(crypto_ids: list[str], currency: str = "usd") -> dict:
@@ -25,7 +25,7 @@ def get_crypto_prices(crypto_ids: list[str], currency: str = "usd") -> dict:
25
  if not crypto_ids:
26
  return {"error": "crypto_ids must be a non-empty list"}
27
 
28
- url = "https://api.coingecko.com/api/v3/simple/price"
29
  params = {"ids": ",".join(crypto_ids), "vs_currencies": currency.lower()}
30
 
31
  try:
 
2
  import requests
3
  import pandas as pd
4
 
5
+ # @tool
6
+ # def my_custom_tool(arg1: str, arg2: int) -> str:
7
+ # """A placeholder tool that simply echoes its inputs.
8
+ # Args:
9
+ # arg1: The first argument.
10
+ # arg2: The second argument.
11
+ # Returns:
12
+ # A short status string.
13
+ # """
14
+ # return f"arg1={arg1}, arg2={arg2}"
15
 
16
  @tool
17
  def get_crypto_prices(crypto_ids: list[str], currency: str = "usd") -> dict:
 
25
  if not crypto_ids:
26
  return {"error": "crypto_ids must be a non-empty list"}
27
 
28
+ url = "https://api.coingecko.com/api/v3/coins/markets?&x_cg_demo_api_key=CG-4TqTQv39JuPvRFmz3dz5Kcff"
29
  params = {"ids": ",".join(crypto_ids), "vs_currencies": currency.lower()}
30
 
31
  try: