adds preliminary gpt4o
This commit is contained in:
@@ -75,6 +75,7 @@ export const LLM_SERVICES = (<A extends readonly LLMService[]>(
|
||||
] as const);
|
||||
|
||||
export const OPENAI_MODEL_FAMILY_MAP: { [regex: string]: OpenAIModelFamily } = {
|
||||
"^gpt-4o": "gpt4-turbo", //todo: separate model family
|
||||
"^gpt-4-turbo(-\\d{4}-\\d{2}-\\d{2})?$": "gpt4-turbo",
|
||||
"^gpt-4-turbo(-preview)?$": "gpt4-turbo",
|
||||
"^gpt-4-(0125|1106)(-preview)?$": "gpt4-turbo",
|
||||
|
||||
@@ -6,6 +6,10 @@ import { ModelFamily } from "./models";
|
||||
export function getTokenCostUsd(model: ModelFamily, tokens: number) {
|
||||
let cost = 0;
|
||||
switch (model) {
|
||||
// case "gpt4o":
|
||||
// case "azure-gpt4o":
|
||||
// cost = 0.000005;
|
||||
// break;
|
||||
case "azure-gpt4-turbo":
|
||||
case "gpt4-turbo":
|
||||
cost = 0.00001;
|
||||
|
||||
Reference in New Issue
Block a user