-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add model manager * add generated web worker code * sync * get rid of remote-blob * get rid of import wllama.js * add vitest * fix ci * add firefox test * fix firefox deps * enable generate docs on pr * add intro * add tests for ModelManager * small clarification * update docs * add wasm-from-cdn * update readme * add test for progress callback * remove reactjs example * add embd test * ci: bump to node 22, add lint * fix ci * fix npm ci * update readme * add loadModelFromHF * fix remove model from cache * fix main example * update docs * add allowOffline test * fix model validation, add tests * bump upstream source code
- Loading branch information
Showing
66 changed files
with
8,338 additions
and
5,530 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ci-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.cache/ms-playwright | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
|
||
timeout-minutes: 10 | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node_version: [22] | ||
# include: | ||
# - os: macos-14 | ||
# node_version: 22 | ||
# - os: windows-latest | ||
# node_version: 22 | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set node version to ${{ inputs.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
|
||
- name: Install | ||
run: npm ci --include=dev | ||
|
||
- name: Install Playwright Dependencies | ||
run: npx playwright install --with-deps | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Test (Chrome) | ||
run: npm run test | ||
|
||
- name: Test (Firefox) | ||
run: npm run test:firefox | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup NodeJS | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '22' | ||
|
||
- name: Install | ||
run: npm ci --include=dev | ||
|
||
- name: Check format | ||
run: | | ||
git config --global --add safe.directory $(realpath .) | ||
git status | ||
npm run format | ||
git status | ||
modified_files="$(git status -s)" | ||
echo "Modified files: ${modified_files}" | ||
if [ -n "${modified_files}" ]; then | ||
echo "Detect unformatted files" | ||
echo "You may need to run: npm run format" | ||
echo "${modified_files}" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Verify generated worker code is up-to-date | ||
|
||
on: | ||
# Runs on pushes | ||
push: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
verify: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '22' | ||
|
||
- name: Verify generated code | ||
run: | | ||
git config --global --add safe.directory $(realpath .) | ||
git status | ||
npm run build:worker | ||
git status | ||
modified_files="$(git status -s)" | ||
echo "Modified files: ${modified_files}" | ||
if [ -n "${modified_files}" ]; then | ||
echo "Generated code file is not up-to-date" | ||
echo "Hint: You may need to run: npm run build:worker" | ||
echo "${modified_files}" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
node_modules | ||
.DS_Store | ||
.vscode | ||
/cache | ||
/docs | ||
/dist | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.