AgentsAgentBase

set_pronunciations

View as MarkdownOpen in Claude

Replace all pronunciation rules at once with a list of raw rule dictionaries.

Parameters

pronunciations
list[dict[str, Any]]Required

List of pronunciation rule dictionaries. Each dictionary must contain replace and with keys, and optionally ignore_case.

Returns

AgentBase — Returns self for method chaining.

Example

1from signalwire import AgentBase
2
3agent = AgentBase(name="support", route="/support")
4agent.set_prompt_text("You are a helpful assistant.")
5agent.set_pronunciations([
6 {"replace": "SQL", "with": "sequel"},
7 {"replace": "SWML", "with": "swimmel", "ignore_case": True},
8 {"replace": "IEEE", "with": "I triple E"}
9])
10agent.serve()