Merge pull request #9377 from jeecgai/fix/issue-9374-qianfan-embedding

fix: #9374 AI知识库千帆向量报错添加异常处理
This commit is contained in:
JEECG 2026-03-05 16:59:39 +08:00 committed by GitHub
commit fa85db1327
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -215,7 +215,14 @@ public class EmbeddingHandler implements IEmbeddingHandler {
}
//update-end---author:wangshuai---date:2025-12-26---for:QQYUN-14265AI支持记忆---
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();
}