Skip to navigation

Closes the AIChatClient the gateway built from the environment. A client you passed to the constructor belongs to you and is left open. Call close() once, when the process shuts down.

Parameters

None.

Returns

Promise<void>.

Examples

import { ChatGateway } from '@signalwire/sdk';
const gateway = new ChatGateway({
configUrl: 'https://bayview-taxi.example.com/dispatch',
key: '<YOUR_PUBLISHABLE_KEY>',
});
process.on('SIGTERM', async () => {
await gateway.close();
process.exit(0);
});