更新 RAGEngine 和嵌入管理器以支持嵌入管理器的传递,添加本地提供者的嵌入模型加载逻辑,优化错误处理和消息处理机制。

This commit is contained in:
duanfuxiang
2025-07-04 15:52:00 +08:00
parent bed96a5233
commit 4e139ecc4f
7 changed files with 453 additions and 312 deletions

View File

@@ -623,7 +623,7 @@ export default class InfioPlugin extends Plugin {
if (!this.ragEngineInitPromise) {
this.ragEngineInitPromise = (async () => {
const dbManager = await this.getDbManager()
this.ragEngine = new RAGEngine(this.app, this.settings, dbManager)
this.ragEngine = new RAGEngine(this.app, this.settings, dbManager, this.embeddingManager)
return this.ragEngine
})()
}