Spaces:
No application file
No application file
Update tools.py
Browse files
tools.py
CHANGED
@@ -6,6 +6,8 @@ from smolagents import Tool
|
|
6 |
search_tool = DuckDuckGoSearchTool()
|
7 |
|
8 |
|
|
|
|
|
9 |
import random
|
10 |
|
11 |
class CurrencyConverterTool(Tool):
|
@@ -13,7 +15,7 @@ class CurrencyConverterTool(Tool):
|
|
13 |
description = "Converts amounts between different currencies using dummy exchange rates."
|
14 |
inputs = {
|
15 |
"amount": {
|
16 |
-
"type": "
|
17 |
"description": "The amount to convert."
|
18 |
},
|
19 |
"from_currency": {
|
@@ -59,4 +61,3 @@ class CurrencyConverterTool(Tool):
|
|
59 |
converted_amount *= (1 + variation)
|
60 |
|
61 |
return f"{amount:.2f} {from_currency} = {converted_amount:.2f} {to_currency} (tasa simulada)"
|
62 |
-
|
|
|
6 |
search_tool = DuckDuckGoSearchTool()
|
7 |
|
8 |
|
9 |
+
import random
|
10 |
+
|
11 |
import random
|
12 |
|
13 |
class CurrencyConverterTool(Tool):
|
|
|
15 |
description = "Converts amounts between different currencies using dummy exchange rates."
|
16 |
inputs = {
|
17 |
"amount": {
|
18 |
+
"type": "number",
|
19 |
"description": "The amount to convert."
|
20 |
},
|
21 |
"from_currency": {
|
|
|
61 |
converted_amount *= (1 + variation)
|
62 |
|
63 |
return f"{amount:.2f} {from_currency} = {converted_amount:.2f} {to_currency} (tasa simulada)"
|
|