addPatternHint
Add a hint with pattern matching and replacement. This allows you to intercept specific ASR output and rewrite it before it reaches the AI — useful for correcting consistent misrecognitions or normalizing variations.
Parameters
opts
Pattern hint configuration object with the following fields:
opts.hint
Descriptive label for the hint (surfaced to the ASR alongside the pattern).
opts.pattern
Regular expression pattern to match.
opts.replace
Replacement text to substitute when the pattern matches.
opts.ignoreCase
Whether to ignore case when matching the pattern.
Returns
AgentBase — Returns this for method chaining.