cancelLastMessage method
Request a cancel for the last conversation message submitted. Returns true if the cancel was requested, false otherwise. A cancel will not be sent if there is no active run.
Implementation
Future<bool> cancelLastMessage() async {
if (runId == null) {
return false;
}
await client.cancelRun(threadId: threadId!, runId: runId!);
return true;
}