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 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({
|
||||||
|
|||||||
Reference in New Issue
Block a user