stop
Stop the AI agent session.
Returns
Promise<Record<string, unknown>> — Server acknowledgment.
Stop the AI agent session.
Promise<Record<string, unknown>> — Server acknowledgment.
import { RelayClient } from '@signalwire/sdk';const client = new RelayClient({project: process.env.SIGNALWIRE_PROJECT_ID!,token: process.env.SIGNALWIRE_API_TOKEN!,contexts: ['default']});client.onCall(async (call) => {await call.answer();const action = await call.ai({prompt: { text: 'You are a helpful assistant.' },aiParams: { temperature: 0.7 },});// Stop the AI sessionawait action.stop();});await client.run();