Manu Mehrotra
Manu Mehrotra
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...
@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
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...
@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...