b49b704e826be445876bed64262efbd4e4c2e5cb
從 4349db2~1 撈回 OllamaService.generate_embedding,補齊被誤刪的方法。
問題:
- services/openclaw_learning_service.py:67 仍呼叫 ollama_service.generate_embedding(...)
- 4349db2 大改時把這個方法刪掉,導致每次 NemoTron 寫入學習資料時觸發
AttributeError: 'OllamaService' object has no attribute 'generate_embedding'
- pgvector KM 因此完全停寫,違反 ADR-007 雙寫鐵律
修法:
- 把 method paste 回 OllamaService 末端(line 508)
- 對齊現代 config:os 已在檔案頂部 import,移除方法內重複 import
- embedding 走 EMBEDDING_HOST(Hermes 主機,內網免認證)
- model 預設 bge-m3:latest(ADR-003 對齊)
驗證:
- AST parse OK
- grep 'def generate_embedding' 已存在
Critic finding: CRIT-1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Description
EwoooC — 商品看板 + 業績報表 + AI KM (Flask + pgvector, Docker Compose on 188)
Languages
PostScript
59.7%
Python
30.9%
HTML
4.2%
CSS
2.1%
JavaScript
1.9%
Other
1.1%