Преглед на файлове

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
No account linked to committer's email address
променени са 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


Loading…
Отказ
Запис