浏览代码

Fix: The data set created by API call failed to parse after uploading the file. (#8657)

### What problem does this PR solve?

https://github.com/infiniflow/ragflow/issues/8656

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.20.0
Stephen Hu 4 个月前
父节点
当前提交
d5f6335f99
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4
    1
      rag/svr/task_executor.py

+ 4
- 1
rag/svr/task_executor.py 查看文件

@@ -445,7 +445,10 @@ async def embedding(docs, mdl, parser_config=None, callback=None):
tk_count += c
callback(prog=0.7 + 0.2 * (i + 1) / len(cnts), msg="")
cnts = cnts_
title_w = float(parser_config.get("filename_embd_weight", 0.1))
filename_embd_weight = parser_config.get("filename_embd_weight", 0.1) # due to the db support none value
if not filename_embd_weight:
filename_embd_weight = 0.1
title_w = float(filename_embd_weight)
vects = (title_w * tts + (1 - title_w) *
cnts) if len(tts) == len(cnts) else cnts


正在加载...
取消
保存