Skip to content

Commit

Permalink
Release 3.011 (#293)
Browse files Browse the repository at this point in the history
* Pagination bug

* Bug fix

* Update package

* Bugfixes

* Add migration file

* adding ability to add to dataset from traces tab

* fixing z-index bug

* fixing llm parsing, disable button for non llm traces

* cleaning up api providers page

* more bug fixes, auditing models

* adding api key auth to create project api key (#270)

* Improvements to prompt playground (#272)

* fixing static text area, fixing overlap

* creating custo ui for playground taces

* fetching traces on dialog open

* fixes

* fixes

* fixes

---------

Co-authored-by: Karthik Kalyanaraman <[email protected]>

* fix

* fix

* support for o1-preview and o1-mini (#275)

* fixing live prompt bug (#277)

* DSPy enhancements (#280)

* DSPy experiments

* LiteLLM support

* eval charts

* experiment metrics

* empty state

* minor fix

* fix

* clearing invite form fields on send (#279)

* Track project creation count metrics (#271)

* adding posthog

* bug fixes, adding new env vars

* adding posthog api key to dockerfile

* updating read me

* removing sensitive data

* removing more data

* adding sign up count by team

* minor

* update

* fixes

---------

Co-authored-by: Karthik Kalyanaraman <[email protected]>

* minor

* minor (#282)

* add vercel ai pricing (#283)

* fix (#284)

* Fixes (#289)

* Add `Gemini` Cost table (#291)

* add gemini cost tables

* remove protobuf helper

---------

Co-authored-by: dylan <[email protected]>
Co-authored-by: dylanzuber-scale3 <[email protected]>
Co-authored-by: Ali Waleed <[email protected]>
  • Loading branch information
4 people authored Oct 13, 2024
1 parent e95d88f commit 291d502
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,25 @@ export const AZURE_PRICING: Record<string, CostTableEntry> = {
},
};

export const GEMINI_PRICING: Record<string, CostTableEntry> = {
"gemini-1.5-pro": {
input: 0.00125, // $1.25 per 1M tokens = $0.00125 per 1K tokens
output: 0.005, // $5.00 per 1M tokens = $0.005 per 1K tokens
},
"gemini-1.5-flash": {
input: 0.000075, // $0.075 per 1M tokens = $0.000075 per 1K tokens
output: 0.0003, // $0.30 per 1M tokens = $0.0003 per 1K tokens
},
"gemini-1.5-flash-8b": {
input: 0.0000375, // $0.0375 per 1M tokens = $0.0000375 per 1K tokens
output: 0.00015, // $0.15 per 1M tokens = $0.00015 per 1K tokens
},
"gemini-1.0-pro": {
input: 0.0005, // $0.50 per 1M tokens = $0.0005 per 1K tokens
output: 0.0015, // $1.50 per 1M tokens = $0.0015 per 1K tokens
},
};

export const PAGE_SIZE = 15;

export const DEFAULT_TESTS: Partial<Test>[] = [
Expand Down
3 changes: 3 additions & 0 deletions lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
ANTHROPIC_PRICING,
AZURE_PRICING,
COHERE_PRICING,
GEMINI_PRICING,
CostTableEntry,
GROQ_PRICING,
LangTraceAttributes,
Expand Down Expand Up @@ -630,6 +631,8 @@ export function calculatePriceFromUsage(
}
}
costTable = AZURE_PRICING[correctModel];
} else if (vendor === "gemini") {
costTable = GEMINI_PRICING[model];
}
if (costTable) {
const total =
Expand Down

0 comments on commit 291d502

Please sign in to comment.