浏览代码

Fix: add chunk, empty question issue. (#6405)

### What problem does this PR solve?

#6404

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.18.0
Kevin Hu 7 个月前
父节点
当前提交
394d1a86f6
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      api/apps/sdk/doc.py

+ 1
- 1
api/apps/sdk/doc.py 查看文件

@@ -1067,7 +1067,7 @@ def add_chunk(tenant_id, dataset_id, document_id):
d["important_tks"] = rag_tokenizer.tokenize(
" ".join(req.get("important_keywords", []))
)
d["question_kwd"] = req.get("questions", [])
d["question_kwd"] = [str(q).strip() for q in req.get("questions", []) if str(q).strip()]
d["question_tks"] = rag_tokenizer.tokenize(
"\n".join(req.get("questions", []))
)

正在加载...
取消
保存