setIsolated

View as MarkdownOpen in Claude

Set whether this context is isolated from other contexts’ conversation history. When true, conversation history from other contexts is not carried over.

Parameters

isolated
booleanRequired

Whether to isolate this context from other contexts’ conversation history.

Returns

Context — Self for method chaining.

Example

1import { ContextBuilder } from '@signalwire/sdk';
2
3const builder = new ContextBuilder();
4builder.addContext('default').addStep('menu').setText('Ask what the caller needs.');
5
6const secure = builder.addContext('secure');
7secure.setIsolated(true);
8secure.setSystemPrompt('You are verifying the caller\'s identity.');
9secure.addStep('verify').setText('Ask for the caller\'s account PIN.');