web-llm
web-llm copied to clipboard
chrome extension not working with manifest version 3 and google will be stopping manifest version 2 in January, 2024
chrome extension not working with manifest version 3 and Google will be stopping manifest version 2 in January, 2024
Are there any plans to make the extension work with manifest version 3?
chrome is pointing to the following line in @mlc/ai/web-tokenizers/lib :
var r = constructor.apply(obj, argumentList);
I think, https://stackoverflow.com/questions/64698248/chrome-extension-refused-to-evaluate-a-string-as-javascript-because-unsafe-eval provides the root cause and solution
can we use -s NO_DYNAMIC_EXECUTION=1 when building the webtokenizer lib at https://github.com/mlc-ai/tokenizers-cpp/tree/main/web ?
cc @tqchen , @sudeepag
ok, I can confirm, that above mentioned worked for my chrome extension which uses manifest 3.
I had to change the build.sh in tokenizers-cpp/web to add -s NO_DYNAMIC_EXECUTION=1
then pack the resultant module and include it in package.json of web-llm
after buiding web-llm from source, I was able to get manifest 3 to work.
Thank you @manuongithub , do you mind send a PR to okenizers-cpp/web
@tqchen pls. check the pull request at - https://github.com/mlc-ai/tokenizers-cpp/pull/20 If you approve this then I'll update the chrome extension code too so that it starts using manifest 3
can we please get a web-llm release to bump the upstream tokenizers-cpp to 0.1.2? i'm assuming that's what's needed next without building from source?
cc @CharlieFRuan
@darvid Updated to 0.2.10 to reflect tokenizer's 0.1.2. Sorry for the delay
thanks @CharlieFRuan , @tqchen - I will change manifest to ver 3 now and raise a PR. Do you want me to also put the extension in the chrome webstore now that manifest 3 is supported?
@tqchen, @CharlieFRuan pls. take a look at https://github.com/mlc-ai/web-llm/pull/218 which enables manifest version 3 for the chrome extension and also enables WebGPU usage out of the box instead of using the chrome extension using the local server.