adds preliminary gpt4o

This commit is contained in:
nai-degen
2024-05-13 12:43:39 -05:00
parent d3e7ef3c14
commit 6dabc82bcf
5 changed files with 12 additions and 3 deletions
+1
View File
@@ -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",
+4
View File
@@ -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;