mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-14 05:05:09 +03:00
b5e2d5ad9c
# Description - Implement Icon Component - Implement TextButton Component - Change Add Brain Button And Set it in the Search Page - Fix Errors When sending empty message - Change EsLint rules ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate):
20 lines
442 B
TypeScript
20 lines
442 B
TypeScript
import { Model, PaidModels } from "../types/BrainConfig";
|
|
|
|
export const defineMaxTokens = (
|
|
model: Model | PaidModels | undefined
|
|
): number => {
|
|
//At the moment is evaluating only models from OpenAI
|
|
switch (model) {
|
|
case "gpt-3.5-turbo":
|
|
return 2000;
|
|
case "gpt-3.5-turbo-1106":
|
|
return 2000;
|
|
case "gpt-3.5-turbo-16k":
|
|
return 4000;
|
|
case "gpt-4":
|
|
return 4000;
|
|
default:
|
|
return 1000;
|
|
}
|
|
};
|