Skip to content

Commit 8b77eda

Browse files
authored
feat(provider-transformers): added package to integrate transformers.js with xsai (moeru-ai#36)
* feat(provider-transformers): added package to integrate transformers.js with xsai * fix: build * chore: use updated xsai --------- Signed-off-by: Neko Ayaka <neko@ayaka.moe>
1 parent 8fb6914 commit 8b77eda

27 files changed

Lines changed: 1143 additions & 453 deletions

File tree

apps/moonshine-web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
"dependencies": {
2020
"@tresjs/core": "^4.3.3",
21-
"@unocss/reset": "^66.1.0-beta.1",
21+
"@unocss/reset": "^66.1.0-beta.3",
2222
"@vueuse/core": "^12.7.0",
2323
"@vueuse/motion": "^2.2.6",
2424
"ofetch": "^1.4.1",

apps/stage-tamagotchi/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
"@tresjs/core": "^4.3.3",
4949
"@types/yauzl": "^2.10.3",
5050
"@typeschema/valibot": "^0.14.0",
51-
"@unhead/vue": "^2.0.0-alpha.23",
52-
"@unocss/reset": "^66.1.0-beta.1",
51+
"@unhead/vue": "^2.0.0-alpha.27",
52+
"@unocss/reset": "^66.1.0-beta.3",
5353
"@vueuse/core": "^12.7.0",
5454
"@vueuse/head": "^2.0.0",
5555
"@vueuse/shared": "^12.7.0",
@@ -59,7 +59,7 @@
5959
"@xsai/providers": "catalog:",
6060
"@xsai/shared-chat": "catalog:",
6161
"@xsai/stream-text": "catalog:",
62-
"@xsai/utils-chat": "^0.1.0-beta.7",
62+
"@xsai/utils-chat": "^0.1.0-beta.9",
6363
"defu": "^6.1.4",
6464
"nprogress": "^0.2.0",
6565
"ofetch": "^1.4.1",
@@ -85,9 +85,9 @@
8585
},
8686
"devDependencies": {
8787
"@electron-toolkit/tsconfig": "^1.0.1",
88-
"@iconify-json/carbon": "^1.2.7",
88+
"@iconify-json/carbon": "^1.2.8",
8989
"@iconify-json/eos-icons": "^1.2.2",
90-
"@iconify-json/lucide": "^1.2.26",
90+
"@iconify-json/lucide": "^1.2.27",
9191
"@iconify-json/mingcute": "^1.2.3",
9292
"@iconify-json/solar": "^1.2.2",
9393
"@iconify-json/svg-spinners": "^1.2.2",
@@ -103,14 +103,14 @@
103103
"@vitejs/plugin-vue": "^5.2.1",
104104
"@vue-macros/volar": "^0.30.14",
105105
"@vueuse/motion": "^2.2.6",
106-
"electron": "^34.2.0",
106+
"electron": "^34.3.0",
107107
"electron-builder": "24.13.3",
108108
"electron-vite": "^2.3.0",
109109
"markdown-it-link-attributes": "^4.0.1",
110110
"unocss-preset-scrollbar": "^3.2.0",
111-
"unplugin-auto-import": "^19.1.0",
112-
"unplugin-vue-components": "^28.4.0",
113-
"unplugin-vue-macros": "^2.14.3",
111+
"unplugin-auto-import": "^19.1.1",
112+
"unplugin-vue-components": "^28.4.1",
113+
"unplugin-vue-macros": "^2.14.4",
114114
"unplugin-vue-markdown": "^28.3.1",
115115
"unplugin-vue-router": "^0.11.2",
116116
"vite-bundle-visualizer": "^1.2.1",

apps/stage-web/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
"@tresjs/core": "^4.3.3",
4545
"@types/yauzl": "^2.10.3",
4646
"@typeschema/valibot": "^0.14.0",
47-
"@unhead/vue": "^2.0.0-alpha.23",
48-
"@unocss/reset": "^66.1.0-beta.1",
47+
"@unhead/vue": "^2.0.0-alpha.27",
48+
"@unocss/reset": "^66.1.0-beta.3",
4949
"@valibot/to-json-schema": "1.0.0-rc.0",
5050
"@vueuse/core": "^12.7.0",
5151
"@vueuse/head": "^2.0.0",
@@ -56,7 +56,7 @@
5656
"@xsai/providers": "catalog:",
5757
"@xsai/shared-chat": "catalog:",
5858
"@xsai/stream-text": "catalog:",
59-
"@xsai/utils-chat": "^0.1.0-beta.7",
59+
"@xsai/utils-chat": "catalog:",
6060
"defu": "^6.1.4",
6161
"jszip": "^3.10.1",
6262
"nprogress": "^0.2.0",
@@ -83,9 +83,9 @@
8383
},
8484
"devDependencies": {
8585
"@electron-toolkit/preload": "^3.0.1",
86-
"@iconify-json/carbon": "^1.2.7",
86+
"@iconify-json/carbon": "^1.2.8",
8787
"@iconify-json/eos-icons": "^1.2.2",
88-
"@iconify-json/lucide": "^1.2.26",
88+
"@iconify-json/lucide": "^1.2.27",
8989
"@iconify-json/mingcute": "^1.2.3",
9090
"@iconify-json/simple-icons": "^1.2.26",
9191
"@iconify-json/solar": "^1.2.2",
@@ -105,9 +105,9 @@
105105
"@vueuse/motion": "^2.2.6",
106106
"hfup": "workspace:^",
107107
"markdown-it-link-attributes": "^4.0.1",
108-
"unplugin-auto-import": "^19.1.0",
109-
"unplugin-vue-components": "^28.4.0",
110-
"unplugin-vue-macros": "^2.14.3",
108+
"unplugin-auto-import": "^19.1.1",
109+
"unplugin-vue-components": "^28.4.1",
110+
"unplugin-vue-macros": "^2.14.4",
111111
"unplugin-vue-markdown": "^28.3.1",
112112
"unplugin-vue-router": "^0.11.2",
113113
"vite-bundle-visualizer": "^1.2.1",

apps/whisper-webgpu/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"typecheck": "vue-tsc --noEmit"
1818
},
1919
"dependencies": {
20-
"@unocss/reset": "^66.1.0-beta.1",
20+
"@unocss/reset": "^66.1.0-beta.3",
2121
"@vueuse/core": "^12.7.0",
2222
"ofetch": "^1.4.1",
2323
"vue": "^3.5.13"

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "airi-vtuber",
33
"type": "module",
44
"private": true,
5-
"packageManager": "pnpm@10.5.0",
5+
"packageManager": "pnpm@10.5.2",
66
"description": "LLM powered virtual character",
77
"author": {
88
"name": "Neko Ayaka",
@@ -35,8 +35,8 @@
3535
"@antfu/ni": "^23.3.1",
3636
"@cspell/dict-ru_ru": "^2.2.4",
3737
"@types/node": "^22.13.5",
38-
"@unocss/eslint-config": "^66.1.0-beta.1",
39-
"@unocss/eslint-plugin": "^66.1.0-beta.1",
38+
"@unocss/eslint-config": "^66.1.0-beta.3",
39+
"@unocss/eslint-plugin": "^66.1.0-beta.3",
4040
"@vitest/coverage-v8": "3.0.5",
4141
"bumpp": "^10.0.3",
4242
"changelogithub": "^13.12.1",
@@ -50,9 +50,9 @@
5050
"taze": "^18.6.0",
5151
"typescript": "~5.7.3",
5252
"unbuild": "3.0.0-rc.11",
53-
"unocss": "^66.1.0-beta.1",
53+
"unocss": "^66.1.0-beta.3",
5454
"vite": "^6.2.0",
55-
"vite-plugin-inspect": "^10.3.0",
55+
"vite-plugin-inspect": "^11.0.0",
5656
"vitest": "^3.0.7"
5757
},
5858
"workspaces": [
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[build]
2+
base = "/"
3+
command = "pnpm -F @proj-airi/provider-transformers... run build"
4+
publish = "/packages/provider-transformers/playground/dist"
5+
6+
[build.environment]
7+
NODE_VERSION = "23"
8+
9+
[[redirects]]
10+
from = "/*"
11+
to = "/index.html"
12+
status = 200
13+
force = false
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"name": "@proj-airi/provider-transformers",
3+
"type": "module",
4+
"private": true,
5+
"description": "Transformers.js wrapper makes it easy to use with xsai",
6+
"author": {
7+
"name": "Neko Ayaka",
8+
"email": "neko@ayaka.moe",
9+
"url": "https://github.com/nekomeowww"
10+
},
11+
"license": "MIT",
12+
"repository": {
13+
"type": "git",
14+
"url": "https://github.com/moeru-ai/airi.git",
15+
"directory": "packages/provider-transformers"
16+
},
17+
"exports": {
18+
".": {
19+
"types": "./dist/index.d.ts",
20+
"import": "./dist/index.mjs"
21+
},
22+
"./worker": {
23+
"types": "./dist/worker/index.d.ts",
24+
"import": "./dist/worker/index.mjs"
25+
},
26+
"./types": {
27+
"types": "./dist/types/index.d.ts",
28+
"import": "./dist/types/index.mjs"
29+
}
30+
},
31+
"module": "./dist/index.mjs",
32+
"types": "./dist/index.d.ts",
33+
"files": [
34+
"README.md",
35+
"dist",
36+
"package.json"
37+
],
38+
"scripts": {
39+
"dev": "pnpm run stub && pnpm run play:dev",
40+
"stub": "unbuild --stub",
41+
"build": "unbuild && pnpm run play:build",
42+
"play:dev": "vite",
43+
"play:build": "vite build",
44+
"play:preview": "vite preview",
45+
"typecheck": "tsc --noEmit"
46+
},
47+
"peerDependencies": {
48+
"web-worker": "^1.5.0"
49+
},
50+
"peerDependenciesMeta": {
51+
"web-worker": {
52+
"optional": true
53+
}
54+
},
55+
"dependencies": {
56+
"@huggingface/transformers": "^3.3.3",
57+
"@proj-airi/utils-transformers": "workspace:^",
58+
"@webgpu/types": "^0.1.54",
59+
"@xsai-ext/shared-providers": "catalog:",
60+
"@xsai/embed": "catalog:",
61+
"@xsai/shared": "catalog:",
62+
"defu": "^6.1.4",
63+
"es-toolkit": "^1.32.0"
64+
},
65+
"devDependencies": {
66+
"@iconify-json/solar": "^1.2.2",
67+
"@unocss/reset": "^66.1.0-beta.3",
68+
"@vitejs/plugin-vue": "^5.2.1",
69+
"@vueuse/core": "^12.7.0",
70+
"vite": "^6.2.0",
71+
"vue": "^3.5.13",
72+
"vue-tsc": "^2.2.4"
73+
}
74+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>Project AIRI 🤗 Transformers.js xsai provider Playground</title>
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0" />
7+
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" />
8+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
9+
<script>
10+
;(function () {
11+
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
12+
const setting = localStorage.getItem('vueuse-color-scheme') || 'auto'
13+
if (setting === 'dark' || (prefersDark && setting !== 'light'))
14+
document.documentElement.classList.toggle('dark', true)
15+
})()
16+
</script>
17+
</head>
18+
<body class="font-sans">
19+
<div id="app"></div>
20+
<script type="module" src="/src/main.ts"></script>
21+
<noscript> This website requires JavaScript to function properly. Please enable JavaScript to continue. </noscript>
22+
</body>
23+
</html>
1.55 KB
Loading
Lines changed: 8 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)