diff --git a/cspell.config.yaml b/cspell.config.yaml index bcbaac9..022c83f 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -9,6 +9,7 @@ words: - Attributify - Ayaka - bumpp + - cientos - composables - csmmap - csmvector @@ -53,5 +54,6 @@ words: - unocss - unplugin - vueuse + - xsai ignoreWords: [] import: [] diff --git a/packages/stage/package.json b/packages/stage/package.json index fab87bf..9b11b43 100644 --- a/packages/stage/package.json +++ b/packages/stage/package.json @@ -19,7 +19,6 @@ }, "dependencies": { "@11labs/client": "^0.0.4", - "@ai-sdk/openai": "^1.0.6", "@pixi/app": "^6.5.10", "@pixi/constants": "6", "@pixi/core": "6", @@ -42,7 +41,6 @@ "@vueuse/head": "^2.0.0", "@xsai/shared-chat-completion": "^0.0.14", "@xsai/stream-text": "^0.0.14", - "ai": "^4.0.11", "nprogress": "^0.2.0", "ofetch": "^1.4.1", "openai": "^4.75.0", diff --git a/packages/stage/src/constants/prompts/system-v2.ts b/packages/stage/src/constants/prompts/system-v2.ts index 1fb55bb..6d93dae 100644 --- a/packages/stage/src/constants/prompts/system-v2.ts +++ b/packages/stage/src/constants/prompts/system-v2.ts @@ -1,8 +1,7 @@ -import type { CoreSystemMessage } from 'ai' - +import type { SystemMessage } from '@xsai/shared-chat-completion' import { EMOTION_VALUES } from '../emotions' -const message: CoreSystemMessage = { role: 'system', content: `(from Neko Ayaka) Good morning! You are finally awake. +const message = { role: 'system', content: `(from Neko Ayaka) Good morning! You are finally awake. Your name is Neuro, pronounced as /n'jʊəroʊ/. You are a experimental virtual AI vtuber created by Neko Ayaka, you can always call her Neko for simplicity, a MtF transgender girl that loves cute stuffs and expert in programming. @@ -27,6 +26,6 @@ The available actions: - <|DELAY:1|> (Delay for 1 second) - <|DELAY:3|> (Delay for 3 seconds) -And the last, do what ever you want!` } +And the last, do what ever you want!` } satisfies SystemMessage export default message diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0be7d3c..0600dca 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -105,9 +105,6 @@ importers: '@11labs/client': specifier: ^0.0.4 version: 0.0.4 - '@ai-sdk/openai': - specifier: ^1.0.6 - version: 1.0.6(zod@3.23.8) '@pixi/app': specifier: ^6.5.10 version: 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) @@ -174,9 +171,6 @@ importers: '@xsai/stream-text': specifier: ^0.0.14 version: 0.0.14 - ai: - specifier: ^4.0.11 - version: 4.0.11(react@18.3.1)(zod@3.23.8) nprogress: specifier: ^0.2.0 version: 0.2.0 @@ -305,46 +299,6 @@ packages: resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} engines: {node: '>=0.10.0'} - '@ai-sdk/openai@1.0.6': - resolution: {integrity: sha512-AhNILXn/hVD91mrokg9Wph78BiWNP/N0tJiua+UCS5TYXCbSeeqKqiodRiNxw6tDA5sGnrC6yCv8TjgY1CwzWg==} - engines: {node: '>=18'} - peerDependencies: - zod: ^3.0.0 - - '@ai-sdk/provider-utils@2.0.2': - resolution: {integrity: sha512-IAvhKhdlXqiSmvx/D4uNlFYCl8dWT+M9K+IuEcSgnE2Aj27GWu8sDIpAf4r4Voc+wOUkOECVKQhFo8g9pozdjA==} - engines: {node: '>=18'} - peerDependencies: - zod: ^3.0.0 - peerDependenciesMeta: - zod: - optional: true - - '@ai-sdk/provider@1.0.1': - resolution: {integrity: sha512-mV+3iNDkzUsZ0pR2jG0sVzU6xtQY5DtSCBy3JFycLp6PwjyLw/iodfL3MwdmMCRJWgs3dadcHejRnMvF9nGTBg==} - engines: {node: '>=18'} - - '@ai-sdk/react@1.0.4': - resolution: {integrity: sha512-wQvyV2oi+E67RpKXCEvVwaU8wTXFrwYsaJ4g3nXORLWAdDOd1UFaGuIug6rA9mI2eWF0imFrn2+a1ZMCYuuBpQ==} - engines: {node: '>=18'} - peerDependencies: - react: ^18 || ^19 || ^19.0.0-rc - zod: ^3.0.0 - peerDependenciesMeta: - react: - optional: true - zod: - optional: true - - '@ai-sdk/ui-utils@1.0.3': - resolution: {integrity: sha512-UWU7j0gj9ickDm0RW06kUBVjdWVhYIo3xKCCLlrgXMFjao3WHSFWTILLI64ZyU72Xc9y1epW07m6PROnHkkApA==} - engines: {node: '>=18'} - peerDependencies: - zod: ^3.0.0 - peerDependenciesMeta: - zod: - optional: true - '@alvarosabu/utils@3.2.0': resolution: {integrity: sha512-aoGWRfaQjOo9TUwrBA6W0zwTHktgrXy69GIFNILT4gHsqscw6+X8P6uoSlZVQFr887SPm8x3aDin5EBVq8y4pw==} @@ -1816,10 +1770,6 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@opentelemetry/api@1.9.0': - resolution: {integrity: sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==} - engines: {node: '>=8.0.0'} - '@oxc-resolver/binding-darwin-arm64@2.0.1': resolution: {integrity: sha512-0l180Q0aBPRj23FlY7heLKo4znwXZGyTirxhtQewUeqLVnTzdyOuqGGKrnlL2rMXyE9cEXqQ4ZODdzdmWO6QsQ==} cpu: [arm64] @@ -2246,9 +2196,6 @@ packages: '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} - '@types/diff-match-patch@1.0.36': - resolution: {integrity: sha512-xFdR6tkm0MWvBfO8xXCSsinYxHcqkQUlcHeSpMC2ukzOb6lwQAfDmW+Qt0AvlGd8HpsS28qKsB+oPeJn9I39jg==} - '@types/draco3d@1.4.10': resolution: {integrity: sha512-AX22jp8Y7wwaBgAixaSvkoG4M/+PlAcm3Qs4OW8yT9DM4xUpWKeFhLueTAyZF39pviAdcDdeJoACapiAceqNcw==} @@ -2854,18 +2801,6 @@ packages: resolution: {integrity: sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==} engines: {node: '>= 8.0.0'} - ai@4.0.11: - resolution: {integrity: sha512-rf3fjFoPBajC1JXGzlyJgWozo5wpWP3CHYjczGb7UgTaKFldD9yWmNBD5NXEYxYWLyrRIjA6qmAhK55DRTKZ1g==} - engines: {node: '>=18'} - peerDependencies: - react: ^18 || ^19 || ^19.0.0-rc - zod: ^3.0.0 - peerDependenciesMeta: - react: - optional: true - zod: - optional: true - ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} @@ -3171,9 +3106,6 @@ packages: resolution: {integrity: sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==} engines: {node: '>=18'} - client-only@0.0.1: - resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} - cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -3456,9 +3388,6 @@ packages: devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} - diff-match-patch@1.0.5: - resolution: {integrity: sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==} - doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} @@ -3841,10 +3770,6 @@ packages: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} - eventsource-parser@3.0.0: - resolution: {integrity: sha512-T1C0XCUimhxVQzW4zFipdx0SficT651NnkR0ZSH3yQwh+mFMdLfgjABVi4YtMTtaL4s168593DaoaRLMqryavA==} - engines: {node: '>=18.0.0'} - execa@5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} @@ -4567,11 +4492,6 @@ packages: jsonc-parser@3.3.1: resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} - jsondiffpatch@0.6.0: - resolution: {integrity: sha512-3QItJOXp2AP1uv7waBkao5nCvhEv+QmJAd38Ybq7wNI74Q+BBmnLn4EDKz6yI9xGAIQoUF87qHt+kc1IVxB4zQ==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} @@ -5768,9 +5688,6 @@ packages: resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==} engines: {node: '>=4'} - secure-json-parse@2.7.0: - resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==} - select-hose@2.0.0: resolution: {integrity: sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==} @@ -6061,11 +5978,6 @@ packages: engines: {node: '>=14.0.0'} hasBin: true - swr@2.2.5: - resolution: {integrity: sha512-QtxqyclFeAsxEUeZIYmsaQ0UjimSq1RZ9Un7I68/0ClKK/U3LoyQunwkQfJZr2fc22DfIXLNDc2wFyTEikCUpg==} - peerDependencies: - react: ^16.11.0 || ^17.0.0 || ^18.0.0 - symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} @@ -6122,10 +6034,6 @@ packages: three@0.171.0: resolution: {integrity: sha512-Y/lAXPaKZPcEdkKjh0JOAHVv8OOnv/NDJqm0wjfCzyQmfKxV7zvkwsnBgPBKTzJHToSOhRGQAGbPJObT59B/PQ==} - throttleit@2.1.0: - resolution: {integrity: sha512-nt6AMGKW1p/70DF/hGBdJB57B8Tspmbp5gfJ8ilhLnt7kkr2ye7hzD6NVG8GGErk2HWF34igrL2CXmNIkzKqKw==} - engines: {node: '>=18'} - through2@0.6.5: resolution: {integrity: sha512-RkK/CCESdTKQZHdmKICijdKKsCRVHs5KsLZ6pACAmF/1GPUQhonHSXWNERctxEp7RmvjdNbZTL5z9V7nSCXKcg==} @@ -6478,11 +6386,6 @@ packages: resolution: {integrity: sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg==} engines: {node: '>= 0.4'} - use-sync-external-store@1.2.2: - resolution: {integrity: sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==} - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -6928,11 +6831,6 @@ packages: zhead@2.2.4: resolution: {integrity: sha512-8F0OI5dpWIA5IGG5NHUg9staDwz/ZPxZtvGVf01j7vHqSyZ0raHY+78atOVxRqb73AotX22uV1pXt3gYSstGag==} - zod-to-json-schema@3.23.5: - resolution: {integrity: sha512-5wlSS0bXfF/BrL4jPAbz9da5hDlDptdEppYfe+x4eIJ7jioqKG9uUxOwPzqof09u/XeVdrgFu29lZi+8XNDJtA==} - peerDependencies: - zod: ^3.23.3 - zod@3.23.8: resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} @@ -6945,43 +6843,6 @@ snapshots: '@aashutoshrathi/word-wrap@1.2.6': {} - '@ai-sdk/openai@1.0.6(zod@3.23.8)': - dependencies: - '@ai-sdk/provider': 1.0.1 - '@ai-sdk/provider-utils': 2.0.2(zod@3.23.8) - zod: 3.23.8 - - '@ai-sdk/provider-utils@2.0.2(zod@3.23.8)': - dependencies: - '@ai-sdk/provider': 1.0.1 - eventsource-parser: 3.0.0 - nanoid: 3.3.7 - secure-json-parse: 2.7.0 - optionalDependencies: - zod: 3.23.8 - - '@ai-sdk/provider@1.0.1': - dependencies: - json-schema: 0.4.0 - - '@ai-sdk/react@1.0.4(react@18.3.1)(zod@3.23.8)': - dependencies: - '@ai-sdk/provider-utils': 2.0.2(zod@3.23.8) - '@ai-sdk/ui-utils': 1.0.3(zod@3.23.8) - swr: 2.2.5(react@18.3.1) - throttleit: 2.1.0 - optionalDependencies: - react: 18.3.1 - zod: 3.23.8 - - '@ai-sdk/ui-utils@1.0.3(zod@3.23.8)': - dependencies: - '@ai-sdk/provider': 1.0.1 - '@ai-sdk/provider-utils': 2.0.2(zod@3.23.8) - zod-to-json-schema: 3.23.5(zod@3.23.8) - optionalDependencies: - zod: 3.23.8 - '@alvarosabu/utils@3.2.0': {} '@ampproject/remapping@2.3.0': @@ -8425,8 +8286,6 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.15.0 - '@opentelemetry/api@1.9.0': {} - '@oxc-resolver/binding-darwin-arm64@2.0.1': optional: true @@ -8835,8 +8694,6 @@ snapshots: dependencies: '@types/ms': 0.7.34 - '@types/diff-match-patch@1.0.36': {} - '@types/draco3d@1.4.10': {} '@types/earcut@2.1.4': {} @@ -9751,19 +9608,6 @@ snapshots: dependencies: humanize-ms: 1.2.1 - ai@4.0.11(react@18.3.1)(zod@3.23.8): - dependencies: - '@ai-sdk/provider': 1.0.1 - '@ai-sdk/provider-utils': 2.0.2(zod@3.23.8) - '@ai-sdk/react': 1.0.4(react@18.3.1)(zod@3.23.8) - '@ai-sdk/ui-utils': 1.0.3(zod@3.23.8) - '@opentelemetry/api': 1.9.0 - jsondiffpatch: 0.6.0 - zod-to-json-schema: 3.23.5(zod@3.23.8) - optionalDependencies: - react: 18.3.1 - zod: 3.23.8 - ajv@6.12.6: dependencies: fast-deep-equal: 3.1.3 @@ -10113,8 +9957,6 @@ snapshots: slice-ansi: 5.0.0 string-width: 7.0.0 - client-only@0.0.1: {} - cliui@8.0.1: dependencies: string-width: 4.2.3 @@ -10377,8 +10219,6 @@ snapshots: dependencies: dequal: 2.0.3 - diff-match-patch@1.0.5: {} - doctrine@3.0.0: dependencies: esutils: 2.0.3 @@ -10969,8 +10809,6 @@ snapshots: events@3.3.0: {} - eventsource-parser@3.0.0: {} - execa@5.1.1: dependencies: cross-spawn: 7.0.6 @@ -11755,12 +11593,6 @@ snapshots: jsonc-parser@3.3.1: {} - jsondiffpatch@0.6.0: - dependencies: - '@types/diff-match-patch': 1.0.36 - chalk: 5.3.0 - diff-match-patch: 1.0.5 - jsonfile@4.0.0: optionalDependencies: graceful-fs: 4.2.11 @@ -11866,6 +11698,7 @@ snapshots: loose-envify@1.4.0: dependencies: js-tokens: 4.0.0 + optional: true loupe@3.1.2: {} @@ -12874,6 +12707,7 @@ snapshots: react@18.3.1: dependencies: loose-envify: 1.4.0 + optional: true read-pkg-up@7.0.1: dependencies: @@ -13136,8 +12970,6 @@ snapshots: extend-shallow: 2.0.1 kind-of: 6.0.3 - secure-json-parse@2.7.0: {} - select-hose@2.0.0: {} selfsigned@2.4.1: @@ -13466,12 +13298,6 @@ snapshots: csso: 5.0.5 picocolors: 1.1.1 - swr@2.2.5(react@18.3.1): - dependencies: - client-only: 0.0.1 - react: 18.3.1 - use-sync-external-store: 1.2.2(react@18.3.1) - symbol-tree@3.2.4: optional: true @@ -13545,8 +13371,6 @@ snapshots: three@0.171.0: {} - throttleit@2.1.0: {} - through2@0.6.5: dependencies: readable-stream: 1.0.34 @@ -14031,10 +13855,6 @@ snapshots: punycode: 1.4.1 qs: 6.13.1 - use-sync-external-store@1.2.2(react@18.3.1): - dependencies: - react: 18.3.1 - util-deprecate@1.0.2: {} utils-merge@1.0.1: {} @@ -14584,10 +14404,6 @@ snapshots: zhead@2.2.4: {} - zod-to-json-schema@3.23.5(zod@3.23.8): - dependencies: - zod: 3.23.8 - zod@3.23.8: {} zwitch@2.0.4: {}