ability to cancel ollama generation
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import {CallbackCommand} from "../base/callback-command";
|
||||
|
||||
export class Cancel extends CallbackCommand {
|
||||
|
||||
text = "❌ Отменить";
|
||||
data = null;
|
||||
|
||||
constructor(text?: string, data?: string) {
|
||||
super();
|
||||
|
||||
this.text = text ?? this.text;
|
||||
this.data = data ?? this.data;
|
||||
}
|
||||
|
||||
static withData(data?: string): Cancel {
|
||||
return new Cancel(null, data);
|
||||
}
|
||||
|
||||
async execute(): Promise<void> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user