ngxson / wllama

WebAssembly binding for llama.cpp - Enabling in-browser LLM inference
https://ngxson.github.io/wllama/examples/basic/
MIT License
231 stars 5 forks source link

Improve cache API #80

Closed ngxson closed 2 days ago

ngxson commented 3 days ago

Add getNameFromURL and delete to CacheManager

Usage:

await CacheManager.delete("https://huggingface.co/.../my_model.gguf");

// or
const items = await CacheManager.list();
await CacheManager.delete(items[0].name);

// or
await CacheManager.deleteMany((item) => item.name === items[0].name);