AgentsAgentBase

get_language_params

View as MarkdownOpen in Claude

Retrieve the engine-specific params dict currently set on a language that was added with add_language.

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").

Returns

Optional[dict[str, Any]] — The params dict if set, or None otherwise (including when the code is unknown).

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})
7
8params = agent.get_language_params("en-US")
9# {"stability": 0.5}

Set or replace params with set_language_params.