trimTokens(context
, maxTokens
, model
): any
Truncate the context to the maximum length allowed by the model.
Parameters
• context: any
The context of the message to be completed.
• maxTokens: any
• model: any
The model to use for generateText.
Returns
any
Defined in
packages/core/src/generation.ts:308