web-llm icon indicating copy to clipboard operation
web-llm copied to clipboard

Error running the function calling example: Cannot find global function mlc.serve.BNFGrammarGetGrammarOfJSON

Open m0o0scar opened this issue 10 months ago • 3 comments

What's the issue?

The following error is thrown when running the function calling example:

index.js:2883 Uncaught (in promise) Error: Cannot find global function mlc.serve.BNFGrammarGetGrammarOfJSON
    at Instance.getGlobalFuncInternal (index.js:2883:23)
    at Instance.getGlobalFunc (index.js:2870:25)
    at new GrammarFactory (grammar.ts:31:11)
    at new LLMChatPipeline (llm_chat.ts:99:27)
    at Engine.<anonymous> (engine.ts:210:21)
    at Generator.next (<anonymous>)
    at fulfilled (tslib.es6.js:118:58)

How to reproduce?

  1. Clone the latest code;
  2. cd examples/function-calling;
  3. npm i && npm start;
  4. Visit localhost:8888 on browser and wait until the model done loading;
  5. Check console to see the error.

m0o0scar avatar Apr 18 '24 13:04 m0o0scar

Function calling is a WIP and will be updated soon! Apologies for the inconvenience. All other examples should be working and feel free to try them out

CharlieFRuan avatar Apr 18 '24 16:04 CharlieFRuan

Cool, thanks for the reply, Charlie 👍 Is there a rough estimate of when the update will be released? Thanks.

m0o0scar avatar Apr 19 '24 00:04 m0o0scar

This weekend / early next week!

CharlieFRuan avatar Apr 19 '24 00:04 CharlieFRuan