setResponse

View as MarkdownOpen in Claude

Set or replace the response text after construction. The response is the text the AI speaks back to the caller after the function executes.

Parameters

response
stringRequired

Text for the AI to speak to the caller.

Returns

FunctionResultthis, for chaining.

Example

1import { FunctionResult } from '@signalwire/sdk';
2
3const result = new FunctionResult();
4result.setResponse('Your order has been confirmed.');