@easbot/local-model-sdk 0.3.22 → 0.3.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +12 -0
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -100,6 +100,18 @@ console.log(batchResult.embeddings);
100
100
  | `bge-base-zh-v1.5` | BGE Base 中文模型 | 768 |
101
101
  | `bge-large-zh-v1.5` | BGE Large 中文模型 | 1024 |
102
102
 
103
+ > **2026-09-23 PR-2 同步**:embedding model 运行时依赖说明
104
+ >
105
+ > `@huggingface/transformers` 的本地推理需要 `onnxruntime-common` 作为 native runtime。
106
+ >
107
+ > - **症状**:`status` / `probeEmbeddingDims` 时报 `Cannot find package 'onnxruntime-common' imported from @huggingface/transformers`
108
+ > - **影响**:probe 失败但 service fallback 到 config 中的 dim(如 768),搜索功能仍可用;仅是**告警级别**不阻塞
109
+ > - **修复**:
110
+ > - 全量安装:`pnpm add -w onnxruntime-common`(推到 monorepo root,被所有包共享)
111
+ > - 或临时:跳过 probe(status 命令暂不主动探测)
112
+ > - 或用 remote embedding(OpenAI / 通义千问 / Ollama)替代本地 embedding
113
+ > - **长期**:`@easbot/local-model-sdk` 的 `package.json` 应加 `onnxruntime-common` 为 `optionalDependencies` 让 pnpm 自动安装
114
+
103
115
  ## 开发
104
116
 
105
117
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easbot/local-model-sdk",
3
- "version": "0.3.22",
3
+ "version": "0.3.24",
4
4
  "description": "Complete local model SDK for EASBot - Transformers.js + ONNX implementation supporting both Language Model (text generation) and Embedding (text embedding) with full AI SDK v3 compatibility",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -56,17 +56,17 @@
56
56
  "ai": "^6.0.253",
57
57
  "onnxruntime-node": "^1.25.1",
58
58
  "zod": "^4.4.3",
59
- "@easbot/types": "0.3.22",
60
- "@easbot/utils": "0.3.22"
59
+ "@easbot/types": "0.3.24",
60
+ "@easbot/utils": "0.3.24"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/node": "^25.9.5",
64
- "@vitest/coverage-v8": "^4.1.5",
64
+ "@vitest/coverage-v8": "^4.1.10",
65
65
  "dotenv": "^17.4.2",
66
66
  "esbuild": "^0.28.2",
67
67
  "tsup": "^8.5.1",
68
68
  "typescript": "^6.0.3",
69
- "vitest": "^4.1.5"
69
+ "vitest": "^4.1.10"
70
70
  },
71
71
  "engines": {
72
72
  "node": ">=22.22.2"