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

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

Example

from signalwire import AgentBase
agent = AgentBase(name="support", route="/support")
agent.set_prompt_text("You are a helpful assistant.")
agent.add_language("English", "en-US", "josh", engine="elevenlabs")
agent.set_language_params("en-US", {"stability": 0.5})
params = agent.get_language_params("en-US")
# {"stability": 0.5}

Set or replace params with set_language_params.