leghair commited on
Commit
e216d94
·
verified ·
1 Parent(s): 86aa4a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -8,17 +8,19 @@ from tools.final_answer import FinalAnswerTool
8
  from Gradio_UI import GradioUI
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
 
 
11
  @tool
12
- def convert_currency(arg1:str, arg2:int)-> str: #it's import to specify the return type
13
- #Keep this format for the description / args / args description but feel free to modify the tool
14
- """converts currency from one currency to another using real time prices
15
  Args:
16
- amount: The amount to convert.
17
- from_currency: The 3-letter currency code to convert from (e.g., 'USD').
18
- to_currency: The 3-letter currency code to convert to (e.g., 'EUR').
19
 
20
  Returns:
21
- A string with the converted amount and exchange rate.
22
  """
23
  try:
24
  # Fetch exchange rate data
 
8
  from Gradio_UI import GradioUI
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
+
12
+
13
  @tool
14
+ def convert_currency(amount: float, from_currency: str, to_currency: str) -> str:
15
+ """Converts an amount from one currency to another using real-time exchange rates.
16
+
17
  Args:
18
+ amount (float): The amount to convert.
19
+ from_currency (str): The 3-letter currency code to convert from (e.g., 'USD').
20
+ to_currency (str): The 3-letter currency code to convert to (e.g., 'EUR').
21
 
22
  Returns:
23
+ str: A formatted string with the converted amount and exchange rate.
24
  """
25
  try:
26
  # Fetch exchange rate data