karenwky commited on
Commit
61b63ce
·
verified ·
1 Parent(s): 789270d

Update tool.py

Browse files
Files changed (1) hide show
  1. tool.py +6 -0
tool.py CHANGED
@@ -44,5 +44,11 @@ class SimpleTool(Tool):
44
  if from_unit not in conversion_rates or to_unit not in conversion_rates[from_unit]:
45
  raise ValueError(f"Conversion from {from_unit} to {to_unit} is not supported")
46
 
 
 
 
 
 
 
47
  # Perform the conversion
48
  return value * conversion_rates[from_unit][to_unit]
 
44
  if from_unit not in conversion_rates or to_unit not in conversion_rates[from_unit]:
45
  raise ValueError(f"Conversion from {from_unit} to {to_unit} is not supported")
46
 
47
+ # Debug error
48
+ print(f"Value: {value}, Type: {type(value)}")
49
+ print(f"From unit: {from_unit}, To unit: {to_unit}")
50
+ print(f"Conversion rate: {conversion_rates[from_unit][to_unit]}, Type: {type(conversion_rates[from_unit][to_unit])}")
51
+
52
+
53
  # Perform the conversion
54
  return value * conversion_rates[from_unit][to_unit]