fix(翻译进知识库):修复1.对话上传的文件需要同步到对应知识库!但现在知识库里没有看到
deploy-hxtesting / build-and-deploy (push) Successful in 1m20s
deploy-hxtesting / build-and-deploy (push) Successful in 1m20s
2.如图三所示点击相对于文件详情中图片都没有了
This commit is contained in:
1 parent
a6632e7b55
commit
b762deaf15
3 files changed
+25
-3
No files matched your search
@@ -214,10 +214,16 @@ func (t *XlsxTranslateTool) Execute(ctx context.Context, args json.RawMessage) (
|
||||
// both into the agent's knowledge base when one is selected; ingestion
|
||||
// runs through the normal async pipeline, so failures never block
|
||||
// delivering the translated workbook.
|
||||
if t.ingestKB != "" && t.knowledge != nil {
|
||||
switch {
|
||||
case t.ingestKB != "" && t.knowledge != nil:
|
||||
if warn := t.ingestToKnowledge(ctx, tenantID, source, data, outName, translated); warn != "" {
|
||||
report.Warnings = append(report.Warnings, warn)
|
||||
}
|
||||
default:
|
||||
// Silent skipping here is how the "knowledge library stays empty"
|
||||
// confusion happens — surface the missing configuration instead.
|
||||
report.Warnings = append(report.Warnings,
|
||||
"本智能体未勾选知识库,原件与译文未入库(管理员在智能体编辑中为本智能体勾选知识库后启用自动入库)")
|
||||
}
|
||||
|
||||
logger.Infof(ctx, "[Tool][XlsxTranslate] session=%s file=%s -> %s units=%d residual=%d llm_calls=%d",
|
||||
|
||||
Reference in new issue
Block a user