AgentsAgentBase

set_languages

View as MarkdownOpen in Claude

Replace all language configurations at once with a list of raw language dictionaries.

Parameters

languages
list[dict[str, Any]]Required

List of language configuration dictionaries. Each dictionary should include name, code, and voice keys, and optionally engine, model, speech_fillers, and function_fillers.

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_languages([
6 {"name": "English", "code": "en-US", "voice": "rime.spore"},
7 {"name": "Spanish", "code": "es-MX", "voice": "rime.luna"},
8 {"name": "French", "code": "fr-FR", "voice": "rime.soleil"}
9])
10agent.serve()