Anthropic Token Counting - #1749
Conversation
✅MegaLinter analysis: Success
Notices📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining See detailed reports in MegaLinter artifacts
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1749 +/- ##
=======================================
Coverage 82.03% 82.03%
=======================================
Files 215 215
Lines 26417 26445 +28
Branches 4171 4177 +6
=======================================
+ Hits 21670 21695 +25
+ Misses 3324 3320 -4
- Partials 1423 1430 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| ) | ||
| ) | ||
| if input_message_content: | ||
| response_prompt_tokens = token_count_callback(request_model, input_message_content) |
There was a problem hiding this comment.
I wonder if we should put the token count callback invocations inside of a specific try-except block so we can log out an error message with details if the customer's callback function failed.
There was a problem hiding this comment.
I've added an error message for this.
0935fc6 to
7ff997b
Compare

Overview