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

chore(pricing): update Anthropic model pricing constants #142

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

jtanningbed
Copy link
Contributor

Why are these changes needed?

Just a maintenance update to include anthropic newer model pricing info.

Info taken from anthropic docs

Related issue number

Checks

@jtanningbed
Copy link
Contributor Author

before:
.venv/lib/python3.13/site-packages/autogen/oai/anthropic.py:426: UserWarning: Cost calculation not available for model claude-3-5-sonnet-20241022 warnings.warn(f"Cost calculation not available for model {model}", UserWarning)
cost={'usage_including_cached_inference': {'total_cost': 0}, 'usage_excluding_cached_inference': {'total_cost': 0}}

after:
cost={'usage_including_cached_inference': {'total_cost': 0.028481999999999997, 'claude-3-5-sonnet-20241022': {'cost': 0.002682, 'prompt_tokens': 304, 'completion_tokens': 241, 'total_tokens': 545}, 'gpt-4-0613': {'cost': 0.025799999999999997, 'prompt_tokens': 554, 'completion_tokens': 153, 'total_tokens': 707}}, 'usage_excluding_cached_inference': {'total_cost': 0.017651999999999998, 'claude-3-5-sonnet-20241022': {'cost': 0.002682, 'prompt_tokens': 244, 'completion_tokens': 130, 'total_tokens': 374}, 'gpt-4-0613': {'cost': 0.014969999999999999, 'prompt_tokens': 351, 'completion_tokens': 74, 'total_tokens': 425}}}, human_input=[])

@qingyun-wu
Copy link
Collaborator

Thank you @jtanningbed for your contribution! Could I have your discord id and email so that we properly acknowledge your contribution, and also have you sign CLA properly!

@qingyun-wu qingyun-wu self-requested a review December 5, 2024 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants