stop
Stop the AI agent session.
Returns
dict — Server acknowledgment.
Example
1 from signalwire.relay import RelayClient 2 3 client = RelayClient( 4 project="your-project-id", 5 token="your-api-token", 6 host="your-space.signalwire.com", 7 contexts=["default"], 8 ) 9 10 @client.on_call 11 async def handle_call(call): 12 await call.answer() 13 action = await call.ai( 14 prompt={"text": "You are a helpful assistant."}, 15 ai_params={"temperature": 0.7}, 16 ) 17 18 # Stop the AI session 19 await action.stop() 20 21 client.run()