Files
wehub-resource-sync 770d92cb1f
Lint / lint (push) Has been cancelled
Build Docs / Deploy Docs (push) Has been cancelled
Windows CI / Windows (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:23:58 +08:00

580 B
Executable File

Node/Javascript/Typescript Access Examples for mlc_llm REST APIs

Please make sure you are running v18.17.x of node (and npm v9.6.7) -- v20.x currently has some compatibility problems with typescript used in the langchain example.

First install dependencies.

npm i

Copy dotenv.exmaple to .env.

To run JS chat completion (both streaming and non-streaming) example:

node sample_client.js

To run OpenAI (chat completion streaming and non-streaming, and legacy completion) example:

node sample_openai.js

To run LangchainJS Typescript example:

npm run example