Skip to main content

@elizaos/core v1.0.0-beta.7 / truncateToCompleteSentence

Function: truncateToCompleteSentence()

truncateToCompleteSentence(text, maxLength): string

Truncate text to fit within the character limit, ensuring it ends at a complete sentence.

Parameters

text: string

maxLength: number

Returns

string

Defined in

packages/core/src/prompts.ts:612