setInternalFillers

View as MarkdownOpen in Claude

Set every internal-filler entry on the agent in a single call. Internal fillers are short phrases the agent speaks (via TTS) while a native SWAIG function is running, so the caller doesn’t hear dead air during transitions or background work. Use addInternalFiller() to add a single entry instead.

Filler names outside the SWML schema’s supported set are logged as a warning and silently ignored by the runtime. Supported names: hangup, check_time, wait_for_user, wait_seconds, adjust_response_latency, next_step, change_context, get_visual_input, get_ideal_strategy.

Parameters

internalFillers
Record<string, Record<string, string[]>>Required

Outer key: native SWAIG function name (e.g. "next_step"). Inner key: language code (e.g. "en-US"). Value: array of filler phrases played randomly while that function executes.

Returns

AgentBase — Returns this for method chaining.

Example

1import { AgentBase } from '@signalwire/sdk';
2
3const agent = new AgentBase({ name: 'assistant', route: '/assistant' });
4agent.setPromptText('You are a helpful assistant.');
5agent.setInternalFillers({
6 next_step: {
7 'en-US': ['Moving to the next step...', 'Great, let us continue...'],
8 es: ['Pasando al siguiente paso...'],
9 },
10 check_time: {
11 'en-US': ['Let me check the time...'],
12 },
13});
14await agent.serve();