Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,8 +19,13 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
|
|
| 19 |
return "What magic will you build ?"
|
| 20 |
|
| 21 |
@tool
|
| 22 |
-
def currency_converter(amount:float, from_currency:str, to_currency:str) -> str:
|
| 23 |
-
"""Convert between currencies using real-time exchange rates
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
try:
|
| 25 |
url = f"https://api.exchangerate-api.com/v4/latest/{from_currency}"
|
| 26 |
response = requests.get(url)
|
|
|
|
| 19 |
return "What magic will you build ?"
|
| 20 |
|
| 21 |
@tool
|
| 22 |
+
def currency_converter(amount: float, from_currency: str, to_currency: str) -> str:
|
| 23 |
+
"""Convert between currencies using real-time exchange rates
|
| 24 |
+
Args:
|
| 25 |
+
amount: The amount to convert
|
| 26 |
+
from_currency: Currency code to convert from (e.g. USD)
|
| 27 |
+
to_currency: Currency code to convert to (e.g. EUR)
|
| 28 |
+
"""
|
| 29 |
try:
|
| 30 |
url = f"https://api.exchangerate-api.com/v4/latest/{from_currency}"
|
| 31 |
response = requests.get(url)
|