Commit Graph

4 Commits

Author SHA1 Message Date
Devin AI
9ed21c4b0e feat: add logging for None values and improve documentation
- Add logging for None token values
- Improve test documentation and structure
- Fix import sorting in tests

Part of #2198

Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-22 01:36:00 +00:00
Devin AI
4e84b98ac2 refactor: improve token counter implementation
- Fix import sorting in tests
- Add docstrings and type validation
- Add comprehensive test cases
- Add validation for negative token counts

Addresses review feedback on #2198

Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-22 01:32:43 +00:00
Devin AI
9f7f1cdb54 style: fix import sorting in test_token_process.py
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-22 01:30:52 +00:00
Devin AI
3f02d10626 fix: handle None values in token counter
- Update sum_cached_prompt_tokens to handle None values gracefully
- Add unit tests for token counting with None values
- Fixes #2197

Co-Authored-By: Joe Moura <joao@crewai.com>
2025-02-22 01:29:47 +00:00