mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-03-17 11:13:40 +00:00
fix: [#9374] AI知识库千帆向量报错,添加异常处理
- 添加try-catch捕获向量存储过程中的异常 - 防止NullPointerException导致程序崩溃 - 提供更友好的错误提示信息
This commit is contained in:
parent
22666ade0c
commit
480ad7387b
@ -215,7 +215,14 @@ public class EmbeddingHandler implements IEmbeddingHandler {
|
|||||||
}
|
}
|
||||||
//update-end---author:wangshuai---date:2025-12-26---for:【QQYUN-14265】【AI】支持记忆---
|
//update-end---author:wangshuai---date:2025-12-26---for:【QQYUN-14265】【AI】支持记忆---
|
||||||
Document from = Document.from(content, metadata);
|
Document from = Document.from(content, metadata);
|
||||||
ingestor.ingest(from);
|
//update-begin---author:jeecg---date:2026-02-26---for:[#9374]【AI知识库】千帆向量报错,添加异常处理防止空指针
|
||||||
|
try {
|
||||||
|
ingestor.ingest(from);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("向量存储失败,请检查向量模型配置是否正确", e);
|
||||||
|
throw new JeecgBootException("向量存储失败:" + e.getMessage());
|
||||||
|
}
|
||||||
|
//update-end---author:jeecg---date:2026-02-26---for:[#9374]【AI知识库】千帆向量报错,添加异常处理防止空指针
|
||||||
return metadata.toMap();
|
return metadata.toMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user