swarmauri / swarmauri-sdk

a modular multimodal framework for ai applications
https://swarmauri.com
Apache License 2.0
73 stars 42 forks source link

Suppress Unnecessary Logs and Add Missing Type Annotations in TemperatureConverterTool #708

Open DevDigiLance opened 1 month ago

DevDigiLance commented 1 month ago

Experiencing irrelevant logging outputs and a missing type annotation error while using Swarmauri as a 3rd party package

RafaelJohn9 commented 1 month ago

using swarmauri as a 3rd party package and this errors and logging keep popping up

Subclass Parameter does not have a type annotation
{'temperature_in_fahrenheit': '77.0'}
{'temperature_in_celsius': '-273.15'}
{'temperature_in_kelvin': '273.15'}

Obviously having this errors while using swarmauri is irrelevant to the end user.

I have tracked the file causing this issue to pkgs/swarmauri/swarmauri/tools/concrete/TemperatureConverterTool.py

where we have

 73 # Example usage:
 74 tool = TemperatureConverterTool()
 75 print(tool("celsius", "fahrenheit", 25))  # Should output: 77.0
 76 print(tool("kelvin", "celsius", 0))  # Should output: -273.15
 77 print(tool("fahrenheit", "kelvin", 32))  # Should output: 273.15
 78 
 79 
 80 SubclassUnion.update(
 81     baseclass=ToolBase,
 82     type_name="TemperatureConverterTool",
 83     obj=TemperatureConverterTool,
 84 )
3rd-Son commented 1 month ago

Thank you so much @RafaelJohn9 let me clear this out asap

3rd-Son commented 1 month ago

709