Gab-Chung commited on
Commit
3dbb067
·
verified ·
1 Parent(s): 862d4cb

updated the arguments of currency converter to the recommended format

Browse files
Files changed (1) hide show
  1. app.py +6 -10
app.py CHANGED
@@ -21,17 +21,13 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
21
 
22
  @tool
23
  def convert_currency(amount:float, from_currency:float, to_currency:float)-> float:
 
 
 
 
 
24
  """
25
- Convert the specified amount from one currency to another.
26
-
27
- Parameters:
28
- - amount (float): The amount of money to convert.
29
- - from_currency (str): The currency code of the source currency (e.g., 'USD').
30
- - to_currency (str): The currency code of the target currency (e.g., 'EUR').
31
-
32
- Returns:
33
- - float: The converted amount in the target currency.
34
- """
35
  # Initialize the CurrencyRates object
36
  c = CurrencyRates()
37
 
 
21
 
22
  @tool
23
  def convert_currency(amount:float, from_currency:float, to_currency:float)-> float:
24
+ """ A tool that converts a specified amount from one currency to another.
25
+ Args:
26
+ amount (float): The amount of money to convert (e.g. 10.5)
27
+ from_currency (str): The currency code of the source currency (e.g., 'USD').
28
+ to_currency (str): The currency code of the target currency (e.g., 'EUR').
29
  """
30
+
 
 
 
 
 
 
 
 
 
31
  # Initialize the CurrencyRates object
32
  c = CurrencyRates()
33