Skip to content

cleanText()

PromptScript API


cleanText(text): string

Defined in: eval/src/sanitize.ts:17

Normalize a string that comes from a model, a provider or a dataset before it is shown or written: line breaks become a space, control and bidi characters are removed. Runs the same on and off a terminal.

Parameters

text

string

Returns

string