Skip to content

Commit

Permalink
Merge pull request #82 from joaonadkarni/fix-name-tokne-costs-not-def…
Browse files Browse the repository at this point in the history
…ined

Fix 'Failed to update TOKEN_COSTS: name 'TOKEN_COSTS' is not defined'
  • Loading branch information
areibman authored Oct 30, 2024
2 parents cd7ee73 + 1f5b93d commit 8ec499c
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 35 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,13 @@ Units denominated in USD. All prices can be located in `model_prices.json`.
| claude-2 | $ 8.00 | $24.00 | 100,000 | 8191 |
| claude-2.1 | $ 8.00 | $24.00 | 200,000 | 8191 |
| claude-3-haiku-20240307 | $0.25 | $1.25 | 200,000 | 4096 |
| claude-3-haiku-latest | $0.25 | $1.25 | 200,000 | 4096 |
| claude-3-opus-20240229 | $15.00 | $75.00 | 200,000 | 4096 |
| claude-3-opus-latest | $15.00 | $75.00 | 200,000 | 4096 |
| claude-3-sonnet-20240229 | $ 3.00 | $15.00 | 200,000 | 4096 |
| claude-3-5-sonnet-20240620 | $ 3.00 | $15.00 | 200,000 | 8192 |
| claude-3-5-sonnet-20241022 | $ 3.00 | $15.00 | 200,000 | 8192 |
| claude-3-5-sonnet-latest | $ 3.00 | $15.00 | 200,000 | 8192 |
| text-bison | -- | -- | 8,192 | 2048 |
| text-bison@001 | -- | -- | 8,192 | 1024 |
| text-bison@002 | -- | -- | 8,192 | 1024 |
Expand Down Expand Up @@ -408,12 +411,12 @@ Units denominated in USD. All prices can be located in `model_prices.json`.
| rerank-multilingual-v3.0 | $ 0.00 | $ 0.00 | 4,096 | 4096 |
| rerank-english-v2.0 | $ 0.00 | $ 0.00 | 4,096 | 4096 |
| rerank-multilingual-v2.0 | $ 0.00 | $ 0.00 | 4,096 | 4096 |
| embed-english-v3.0 | $0.1 | $ 0.00 | 512 | nan |
| embed-english-light-v3.0 | $0.1 | $ 0.00 | 512 | nan |
| embed-multilingual-v3.0 | $0.1 | $ 0.00 | 512 | nan |
| embed-english-v2.0 | $0.1 | $ 0.00 | 512 | nan |
| embed-english-light-v2.0 | $0.1 | $ 0.00 | 512 | nan |
| embed-multilingual-v2.0 | $0.1 | $ 0.00 | 256 | nan |
| embed-english-v3.0 | $0.1 | $ 0.00 | 1,024 | nan |
| embed-english-light-v3.0 | $0.1 | $ 0.00 | 1,024 | nan |
| embed-multilingual-v3.0 | $0.1 | $ 0.00 | 1,024 | nan |
| embed-english-v2.0 | $0.1 | $ 0.00 | 4,096 | nan |
| embed-english-light-v2.0 | $0.1 | $ 0.00 | 1,024 | nan |
| embed-multilingual-v2.0 | $0.1 | $ 0.00 | 768 | nan |
| replicate/meta/llama-2-13b | $0.1 | $0.5 | 4,096 | 4096 |
| replicate/meta/llama-2-13b-chat | $0.1 | $0.5 | 4,096 | 4096 |
| replicate/meta/llama-2-70b | $0.65 | $2.75 | 4,096 | 4096 |
Expand All @@ -436,6 +439,7 @@ Units denominated in USD. All prices can be located in `model_prices.json`.
| openrouter/anthropic/claude-3-haiku | $0.25 | $1.25 | nan | nan |
| openrouter/anthropic/claude-3-haiku-20240307 | $0.25 | $1.25 | 200,000 | 4096 |
| anthropic/claude-3-5-sonnet-20241022 | $ 3.00 | $15.00 | 200,000 | 8192 |
| anthropic/claude-3-5-sonnet-latest | $ 3.00 | $15.00 | 200,000 | 8192 |
| openrouter/anthropic/claude-3.5-sonnet | $ 3.00 | $15.00 | 200,000 | 8192 |
| openrouter/anthropic/claude-3.5-sonnet:beta | $ 3.00 | $15.00 | 200,000 | 8192 |
| openrouter/anthropic/claude-3-sonnet | $ 3.00 | $15.00 | nan | nan |
Expand Down Expand Up @@ -514,6 +518,7 @@ Units denominated in USD. All prices can be located in `model_prices.json`.
| anthropic.claude-3-sonnet-20240229-v1:0 | $ 3.00 | $15.00 | 200,000 | 4096 |
| anthropic.claude-3-5-sonnet-20240620-v1:0 | $ 3.00 | $15.00 | 200,000 | 4096 |
| anthropic.claude-3-5-sonnet-20241022-v2:0 | $ 3.00 | $15.00 | 200,000 | 4096 |
| anthropic.claude-3-5-sonnet-latest-v2:0 | $ 3.00 | $15.00 | 200,000 | 4096 |
| anthropic.claude-3-haiku-20240307-v1:0 | $0.25 | $1.25 | 200,000 | 4096 |
| anthropic.claude-3-opus-20240229-v1:0 | $15.00 | $75.00 | 200,000 | 4096 |
| us.anthropic.claude-3-sonnet-20240229-v1:0 | $ 3.00 | $15.00 | 200,000 | 4096 |
Expand Down Expand Up @@ -762,6 +767,8 @@ Units denominated in USD. All prices can be located in `model_prices.json`.
| databricks/databricks-mpt-7b-instruct | $0.50001 | $ 0.00 | 8,192 | 8192 |
| databricks/databricks-bge-large-en | $0.10003 | $ 0.00 | 512 | nan |
| databricks/databricks-gte-large-en | $0.12999 | $ 0.00 | 8,192 | nan |
| azure/gpt-4o-mini-2024-07-18 | $0.165 | $0.66 | 128,000 | 16384 |
| amazon.titan-embed-image-v1 | $0.8 | $ 0.00 | 128 | nan |

### Callback handlers
You may also calculate token costs in LLM wrapper/framework libraries using callbacks.
Expand Down
Loading

0 comments on commit 8ec499c

Please sign in to comment.