Skip to content

Add missing usage collection to BedrockAnthropic3ChatModel call with prompt #1520

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

Conversation

dafriz
Copy link
Contributor

@dafriz dafriz commented Oct 10, 2024

This PR adds the returning of ChatResponseMetadata from calls to

BedrockAnthropic3ChatModel.call(Prompt prompt)

Includes id, model, inputTokens and outputTokens usage data.

additionally this method was refactored to remove the use of deprecated methods.

Fixes #1025
Partially fixes #1519

…prompt

and additionally replace use of deprecated methods.
…pt method.

Include id, model, inputTokens and outputTokens usage data.
@markpollack markpollack added this to the 1.0.0-M4 milestone Oct 14, 2024
@markpollack
Copy link
Member

I took the opportunity to introduce DefaultUsage so that we have a simple jackson friendly class not connected to the model provider's api.

@markpollack
Copy link
Member

merged in c9f50da

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AWS BedrockAnthropic3ChatModel token usage metrics are missing BedrockAnthropic3ChatModel surfaces usage information
2 participants