Skip to content

Commit

Permalink
adding gpt4o-mini (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanzuber-scale3 committed Jul 21, 2024
1 parent 2e3de06 commit f29f0d1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export const TIKTOKEN_MODEL_MAPPING: Record<string, TiktokenEncoding> = {
"gpt-4": "cl100k_base",
"gpt-4o": "o200k_base",
"gpt-4o-2024-05-13": "o200k_base",
"gpt-4o-mini": "o200k_base",
"gpt-4o-mini-2024-07-18": "o200k_base",
};

export type LangTraceAttributes = LLMSpanAttributes &
Expand All @@ -49,6 +51,14 @@ export interface CostTableEntry {

// cost per 1000 tokens
export const OPENAI_PRICING: Record<string, CostTableEntry> = {
"gpt-4o-mini": {
input: 0.00015,
output: 0.0006,
},
"gpt-4o-mini-2024-07-18": {
input: 0.00015,
output: 0.0006,
},
"gpt-4o": {
input: 0.005,
output: 0.015,
Expand Down
10 changes: 10 additions & 0 deletions lib/types/playground_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ export interface Conversation {
}

export enum OpenAIModel {
"gpt-4o-mini" = "gpt-4o-mini",
"gpt-4o-mini-2024-07-18" = "gpt-4o-mini-2024-07-18",
"gpt-4o" = "gpt-4o",
"gpt-4o-2024-05-13" = "gpt-4o-2024-05-13",
"gpt-4-turbo-preview" = "gpt-4-turbo-preview",
Expand All @@ -31,6 +33,14 @@ export enum AnthropicModel {
}

export const openAIModels = [
{
value: "gpt-4o-mini",
label: "GPT-4 Omni Mini",
},
{
value: "gpt-4o-mini-2024-07-18",
label: "GPT-4 Omni Mini (2024-07-18)",
},
{
value: "gpt-4o",
label: "GPT-4 Omni",
Expand Down

0 comments on commit f29f0d1

Please sign in to comment.