fixes incorrect context size limit for aws claude v1

This commit is contained in:
nai-degen 2023-10-02 03:53:04 -05:00
parent f67560a17b
commit 0837c89a42
1 changed files with 3 additions and 3 deletions

View File

@ -48,11 +48,11 @@ export const validateContextSize: RequestPreprocessor = async (req) => {
modelMax = 32768; modelMax = 32768;
} else if (model.match(/gpt-4/)) { } else if (model.match(/gpt-4/)) {
modelMax = 8192; modelMax = 8192;
} else if (model.match(/claude-(?:instant-)?v1(?:\.\d)?-100k/)) { } else if (model.match(/^claude-(?:instant-)?v1(?:\.\d)?-100k/)) {
modelMax = 100000; modelMax = 100000;
} else if (model.match(/claude-(?:instant-)?v1(?:\.\d)?$/)) { } else if (model.match(/^claude-(?:instant-)?v1(?:\.\d)?$/)) {
modelMax = 9000; modelMax = 9000;
} else if (model.match(/claude-2/)) { } else if (model.match(/^claude-2/)) {
modelMax = 100000; modelMax = 100000;
} else if (model.match(/^text-bison-\d{3}$/)) { } else if (model.match(/^text-bison-\d{3}$/)) {
modelMax = BISON_MAX_CONTEXT; modelMax = BISON_MAX_CONTEXT;