defineTextResponse
Purpose and behavior
Section titled “Purpose and behavior”Declare a response whose value is the trimmed text of the last complete <tag>…</tag> pair. It fails with ResponseError only when no complete pair exists; an invalid tag or repairs fails with code configuration.
Complete example and detailed rules.
Parameters and properties
Section titled “Parameters and properties”optionsRequiredTextResponseOptionsTag name and the number of repair turns allowed after an invalid answer.options.tagRequiredstringTag name without angle brackets: a letter followed by letters, digits, _ or -. Another form fails with code configuration.options.repairsOptionalnumber | undefinedCorrection turns allowed after an invalid answer, default 0; must be a nonnegative integer. Above 0, the agent must be able to resume its conversation.