Update stream-text.ts dynamic model max Token updated
This commit is contained in:
@@ -68,9 +68,11 @@ export function streamText(
|
||||
|
||||
const modelDetails = MODEL_LIST.find((m) => m.name === currentModel);
|
||||
|
||||
|
||||
|
||||
const dynamicMaxTokens =
|
||||
modelDetails && modelDetails.maxTokenAllowed
|
||||
? Math.min(MAX_TOKENS, modelDetails.maxTokenAllowed)
|
||||
modelDetails && modelDetails.maxTokenAllowed
|
||||
? modelDetails.maxTokenAllowed
|
||||
: MAX_TOKENS;
|
||||
|
||||
return _streamText({
|
||||
|
||||
Reference in New Issue
Block a user