Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for counting tokens #29

Merged

Conversation

StevanFreeborn
Copy link
Owner

closes #19
closes #25

  • fix: remove model id validation
  • feat: add support for count tokens endpoint
  • refactor: put public method above private methods
  • tests: add integration tests to cover both 😁 and 🥲 paths when counting message tokens
  • chore: remove need for beta header when using prompt caching or PDF support
  • docs: add count message tokens example to README.md

Copy link

codecov bot commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 94.87179% with 2 lines in your changes missing coverage. Please review.

Project coverage is 98.57%. Comparing base (9c0a2e3) to head (de326ab).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
src/AnthropicClient/AnthropicApiClient.cs 85.71% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #29      +/-   ##
==========================================
- Coverage   98.71%   98.57%   -0.15%     
==========================================
  Files          66       67       +1     
  Lines        1247     1264      +17     
  Branches      101      103       +2     
==========================================
+ Hits         1231     1246      +15     
  Misses          5        5              
- Partials       11       13       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@StevanFreeborn StevanFreeborn merged commit 5a1bf4c into main Jan 3, 2025
2 of 4 checks passed
@StevanFreeborn StevanFreeborn deleted the stevanfreeborn/feat/add-support-for-counting-tokens branch January 3, 2025 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant