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

βœ¨πŸ› #183: Fix Anthropic API key header and start counting its token usage #184

Merged
merged 5 commits into from
Mar 24, 2024

Conversation

roma-glushko
Copy link
Member

Anthropic seems to go out of beta finally and I could get a token to test our integration which doesn't seem to work because of the wrong API key header used.

Changes

  • Fixed the header where Anthropic API key is passed
  • Started propagating token usage of Anthropic requests
  • Corrected the TokenUsage interface by changing count field to integers from floats

Copy link

codecov bot commented Mar 19, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 66.55%. Comparing base (369ddea) to head (5f763d7).

Files Patch % Lines
pkg/providers/anthropic/chat.go 77.27% 4 Missing and 1 partial ⚠️
pkg/providers/bedrock/chat.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #184      +/-   ##
===========================================
- Coverage    66.58%   66.55%   -0.04%     
===========================================
  Files           73       73              
  Lines         3163     3169       +6     
===========================================
+ Hits          2106     2109       +3     
- Misses         948      951       +3     
  Partials       109      109              

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@roma-glushko
Copy link
Member Author

cc @curi-adi

@roma-glushko roma-glushko changed the title πŸ› #183: Fix Anthropic API key header and start counting its token usage βœ¨πŸ› #183: Fix Anthropic API key header and start counting its token usage Mar 24, 2024
@roma-glushko roma-glushko merged commit e37b0f8 into develop Mar 24, 2024
10 checks passed
@roma-glushko roma-glushko deleted the 183-fix-anthropic-authn-token-usage branch March 24, 2024 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

πŸ› Anthropic: Fix Wrong API key header & start counting usage tokens
1 participant