Update stream-text.ts dynamic model max Token updated

This commit is contained in:
Raiyan Hasan 2024-11-21 11:49:09 +05:30 committed by GitHub
parent 4269d57ea8
commit e1c3d603df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,9 +68,11 @@ export function streamText(
const modelDetails = MODEL_LIST.find((m) => m.name === currentModel); const modelDetails = MODEL_LIST.find((m) => m.name === currentModel);
const dynamicMaxTokens = const dynamicMaxTokens =
modelDetails && modelDetails.maxTokenAllowed modelDetails && modelDetails.maxTokenAllowed
? Math.min(MAX_TOKENS, modelDetails.maxTokenAllowed) ? modelDetails.maxTokenAllowed
: MAX_TOKENS; : MAX_TOKENS;
return _streamText({ return _streamText({