refactor(calculator): update tool implementation and fix deprecation warnings
refactor(calculator): update tool implementation and fix deprecation warnings
- Replace legacy tool mode implementation using CalculatorToolSchema with simplified tool_mode=True approach.
- Fix ast.Num deprecation warnings by supporting ast.Constant while maintaining backwards compatibility.
@carlosrcoelho
LGTM
CodSpeed Performance Report
Merging #5442 will degrade performances by 32.87%
Comparing Vigtu:calculator-overhaul (bf0e59f) with main (3193804)
Summary
⚡ 1 improvements
❌ 1 regressions
✅ 13 untouched benchmarks
:warning: Please fix the performance issues or acknowledge them on CodSpeed.
Benchmarks breakdown
| Benchmark | main |
Vigtu:calculator-overhaul |
Change | |
|---|---|---|---|---|
| ⚡ | test_successful_run_with_input_type_text |
4,243.8 ms | 249.4 ms | ×17 |
| ❌ | test_successful_run_with_output_type_debug |
167.3 ms | 249.3 ms | -32.87% |
@Vigtu can you check and fix why the unit test are failing?
tests with the component calculator as tool is failing!
@Vigtu We are compiling few guidelines for component refactor PR. Will let you know further details once its ready!
edit test cases to use calculator component tool.
Working on this! Thank you
@Vigtu can we get these changes in by Today (friday) ? Please let me know if there are any blockers!
@Vigtu can we get these changes in by Today (friday) ? Please let me know if there are any blockers!
Done