AgentsAgentBase

set_language_params

View as MarkdownOpen in Claude

Set or replace the engine-specific params on a language that was already added with add_language. The params are emitted as the language object’s params key in SWML.

Language configurations map to the SWML ai.languages array. See the SWML languages reference for the full specification.

Parameters

code
strRequired

Language code as previously passed to add_language (e.g., "en-US").

params
dict[str, Any]Required

Engine-specific params dict to attach. An empty dict removes the params key.

Returns

AgentBase — Returns self for method chaining. No-op if the code is not found.

Example

1from signalwire import AgentBase
2
3agent = AgentBase(name="support", route="/support")
4agent.set_prompt_text("You are a helpful assistant.")
5agent.add_language("English", "en-US", "josh", engine="elevenlabs")
6agent.set_language_params("en-US", {"stability": 0.5, "similarity_boost": 0.75})
7agent.serve()

Read the current params back with get_language_params.