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

webLLMGlobal reference

Open lestan opened this issue 1 year ago • 2 comments

In the get started example, there's a reference to webLLMGlobal in the get_started.html file. I also see it in the streaming example (streaming.html).

What does this code block / variable do?

<script>
    webLLMGlobal = {};
</script>

Trying to determine if it's a global reference to the engine and if it's set by webllm when the engine is created or if it's something else. I don't see it being referenced in the code within those examples so wasn't sure of its purpose.

Appreciate any insight and guidance. Thanks!

Reference: https://github.com/mlc-ai/web-llm/blob/main/examples/get-started/src/get_started.html

lestan avatar Sep 29 '24 22:09 lestan

I'm also curious about this. I've kept it in my code, but am unsure of it's use.

flatsiedatsie avatar Oct 10 '24 05:10 flatsiedatsie

I belive this may be a legacy code that is no longer needed, cc @CharlieFRuan @Neet-Nestor . let us cross check and confirm, if it is not needed, we should remove from our example

tqchen avatar Oct 10 '24 15:10 tqchen