* fix: message history limiter to support tool calls
* add: pytest and docs for message history limiter for tool calls
* Added keep_first_message for HistoryLimiter transform
* Update to inbetween to between
* Updated keep_first_message to non-optional, logic for history limiter
* Update transforms.py
* Update test_transforms to match utils introduction, add keep_first_message testing
* Update test_transforms.py for pre-commit checks
---------
Co-authored-by: Mark Sze <66362098+marklysze@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Add minimum token threshold in MessageHistoryLimiter
* Update transforms tests for the threshold
* Move min_threshold_tokens from Message to Token Limiter
* Optimize _check_tokens_threshold
Co-authored-by: Wael Karkoub <wael.karkoub96@gmail.com>
* Apply requested changes (renaming, phrasing, validations)
* Fix format
* Fix _check_tokens_threshold logic
* Update docs and notebook
* Improve phrasing
* Add min_tokens example in notebook
* Add min_tokens example in website docs
* Add min_tokens example in notebook
* Update website docs to be in sync with get_logs change
---------
Co-authored-by: Wael Karkoub <wael.karkoub96@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Standardize printing of MessageTransforms
* Fix pre-commit black failure
* Add test for transform_messages printing
* Return str instead of printing
* Rename to_print_stats to verbose
* Cleanup
* t i# This is a combination of 3 commits.
Update requirements
* Remove lazy-fixture
* Avoid calling apply_transform in two code paths
* Format
* Replace stats with logs
* Handle no content messages in TokenLimiter get_logs()
* Move tests from test_transform_messages to test_transforms
---------
Co-authored-by: Wael Karkoub <wael.karkoub96@gmail.com>