-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Introduce TokenKind and add duration to consumptions * Introduce DurationManager * Use Anthropic-like Usage object * Make Usage empty instead of optional * Move costs into yaml files * Implement get_cost_map() instead of direct access * Fix * Update docs * Fix print statement * Adjust consumption docs * Add consumptions print in test_llm_caching_middleware.py * Address comments * Fix
- Loading branch information
1 parent
60c63c5
commit 3746c63
Showing
16 changed files
with
508 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
kind: LLMCostManager | ||
version: 0.1 | ||
metadata: | ||
name: anthropic-costs | ||
labels: | ||
provider: Anthropic | ||
reference: https://www.anthropic.com/pricing#anthropic-api | ||
spec: | ||
default: | ||
description: | | ||
Default model costs | ||
models: | ||
claude-3-haiku-20240307: | ||
input: 0.25 | ||
output: 1.25 | ||
claude-3-sonnet-20240229: | ||
input: 3.00 | ||
output: 15.00 | ||
claude-3-5-sonnet-20240620: | ||
input: 3.00 | ||
output: 15.00 | ||
claude-3-5-sonnet-20241022: | ||
input: 3.00 | ||
output: 15.00 | ||
claude-3-opus-20240229: | ||
input: 15.00 | ||
output: 75.00 | ||
caching: | ||
description: | | ||
Prompt caching costs: input - cache write; output - cache read; | ||
Note - not all model support prompt caching | ||
models: | ||
claude-3-haiku-20240307: | ||
input: 0.30 | ||
output: 0.03 | ||
claude-3-5-sonnet-20240620: | ||
input: 3.75 | ||
output: 0.30 | ||
claude-3-5-sonnet-20241022: | ||
input: 3.75 | ||
output: 0.30 | ||
claude-3-opus-20240229: | ||
input: 18.75 | ||
output: 1.50 |
Oops, something went wrong.