Merge remote-tracking branch 'origin/main'

This commit is contained in:
nai-degen 2024-02-26 18:12:23 -06:00
commit fd742fc0cb
1 changed files with 5 additions and 1 deletions

View File

@ -6,15 +6,19 @@ import { ModelFamily } from "./models";
export function getTokenCostUsd(model: ModelFamily, tokens: number) { export function getTokenCostUsd(model: ModelFamily, tokens: number) {
let cost = 0; let cost = 0;
switch (model) { switch (model) {
case "azure-gpt4-turbo":
case "gpt4-turbo": case "gpt4-turbo":
cost = 0.00001; cost = 0.00001;
break; break;
case "azure-gpt4-32k":
case "gpt4-32k": case "gpt4-32k":
cost = 0.00006; cost = 0.00006;
break; break;
case "azure-gpt4":
case "gpt4": case "gpt4":
cost = 0.00003; cost = 0.00003;
break; break;
case "azure-turbo":
case "turbo": case "turbo":
cost = 0.000001; cost = 0.000001;
break; break;
@ -23,7 +27,7 @@ export function getTokenCostUsd(model: ModelFamily, tokens: number) {
break; break;
case "aws-claude": case "aws-claude":
case "claude": case "claude":
cost = 0.00001102; cost = 0.000008;
break; break;
case "mistral-tiny": case "mistral-tiny":
cost = 0.00000031; cost = 0.00000031;