I was able to find support for JSON schemas in the project, and it seems to actually get implemented under the hood by BNF. I was wondering if WebLLM could directly support BNF instead of reaching it in a roundabout way by first giving it a JSON schema. I tried to investigate to see if I could make it happen myself, but I got lost when I found references to mlc.grammar.BNFGrammarGetGrammarOfJSON and mlc.grammar.BNFGrammarFromSchema and couldn't figure out where those were defined. It seemed to me that they are supposed to come from the @mlc-ai/web-runtime package, but the TVM project that is referenced as its source code does not seem to have these functions in it.
I was able to find support for JSON schemas in the project, and it seems to actually get implemented under the hood by BNF. I was wondering if WebLLM could directly support BNF instead of reaching it in a roundabout way by first giving it a JSON schema. I tried to investigate to see if I could make it happen myself, but I got lost when I found references to mlc.grammar.BNFGrammarGetGrammarOfJSON and mlc.grammar.BNFGrammarFromSchema and couldn't figure out where those were defined. It seemed to me that they are supposed to come from the @mlc-ai/web-runtime package, but the TVM project that is referenced as its source code does not seem to have these functions in it.