stop
Stop the AI agent session.
Returns
dict — Server acknowledgment.
Stop the AI agent session.
dict — Server acknowledgment.
from signalwire.relay import RelayClientclient = RelayClient(project="your-project-id",token="your-api-token",contexts=["default"],)@client.on_callasync def handle_call(call):await call.answer()action = await call.ai(prompt={"text": "You are a helpful assistant."},ai_params={"temperature": 0.7},)# Stop the AI sessionawait action.stop()client.run()