addInternalFiller

View as MarkdownOpen in Claude

Add filler phrases spoken while a specific SWAIG function is executing. The AI randomly selects from the list each time the function is invoked.

Parameters

functionName
stringRequired

Name of the SWAIG function these fillers apply to (e.g., "next_step", "check_time").

languageCode
stringRequired

BCP-47 language code (e.g., "en-US", "es", "fr").

fillers
string[]Required

Array of filler phrases for this function and language.

Returns

AgentBase — Returns this for method chaining.

Example

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