2023-09-12 19:04:35 +03:00
|
|
|
import { Model, PaidModels } from "../types/brainConfig";
|
2023-07-25 13:08:08 +03:00
|
|
|
|
2023-11-15 14:42:19 +03:00
|
|
|
export const defineMaxTokens = (
|
|
|
|
model: Model | PaidModels | undefined
|
|
|
|
): number => {
|
2023-07-25 13:08:08 +03:00
|
|
|
//At the moment is evaluating only models from OpenAI
|
|
|
|
switch (model) {
|
2023-08-07 17:35:23 +03:00
|
|
|
case "gpt-3.5-turbo":
|
2023-11-01 10:52:49 +03:00
|
|
|
return 1000;
|
2023-11-22 10:47:51 +03:00
|
|
|
case "gpt-3.5-turbo-1106":
|
|
|
|
return 1000;
|
2023-07-25 13:08:08 +03:00
|
|
|
case "gpt-3.5-turbo-16k":
|
2023-11-01 10:52:49 +03:00
|
|
|
return 4000;
|
2023-07-25 13:08:08 +03:00
|
|
|
case "gpt-4":
|
2023-11-01 10:52:49 +03:00
|
|
|
return 4000;
|
2023-07-25 13:08:08 +03:00
|
|
|
default:
|
2023-11-22 10:47:51 +03:00
|
|
|
return 1000;
|
2023-07-25 13:08:08 +03:00
|
|
|
}
|
|
|
|
};
|