Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Allow interrupting the text generation #206

Open
felladrin opened this issue Jun 9, 2024 · 1 comment
Open

[Feature Request] Allow interrupting the text generation #206

felladrin opened this issue Jun 9, 2024 · 1 comment

Comments

@felladrin
Copy link

Currently, it seems there is no way to send a signal to interrupt the text generation in the model.run().

/// User-facing method to run the model.
///
/// Untyped input is required unfortunately.
pub async fn run(&mut self, input: JsValue) -> Result<JsValue, JsValue> {
self.inner.run(input).await
}

My current workaround is to call location.reload() to interrupt it.

@FL33TW00D
Copy link
Collaborator

Agreed - we should offer a cancellation callback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants