Skip to content

How to let the user cancel loading the model and stop it from fetching params #499

@JohnReginaldShutler

Description

@JohnReginaldShutler

Hello quick question! I was wondering, after you create the engine (in the step below) and the cache starts getting populated, how do you code a cancel button for a user to cancel downloading the model/quit the task. Is there a method that can be called? In this example to stop the response llm.abort(); but I would like to understand what abort() is being called on and how can I get there from the simple implementation found below.

const engine = await CreateMLCEngine(
selectedModel,
{ initProgressCallback: initProgressCallback }, // engineConfig
);

Thank you!

@customautosys

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions