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

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