153 work summarizer token counter fix #154
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Description: 153 work summarizer token counter fix
Summary
This pull request addresses a bug fix in the token counter functionality within the
kaizen/llms/provider.pyfile. The main purpose of these changes is to correct the way tokens are counted by thelitellm.token_counterfunction, ensuring that the correct parameters are passed to it.Significant Modifications
Bug Fix in Token Counter: The
available_tokensmethod inkaizen/llms/provider.pyhas been updated to pass the parameters tolitellm.token_counterusing keyword arguments (model=self.model, text=message) instead of positional arguments. This change ensures that the function receives the correct inputs, potentially fixing any issues related to incorrect token counting.Version Bump: The project version in
pyproject.tomlhas been incremented from0.1.13to0.1.14. This version bump indicates a minor update, likely reflecting the bug fix.Impact
Please review the changes and provide feedback or approval as necessary.
Original Description
None