mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 03:25:57 +08:00
Fix: Q&A chunk modification (#4227)
### What problem does this PR solve? _Briefly describe what this PR aims to solve. Include background context that will help reviewers understand the purpose of the PR._ ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
1160b58b6e
commit
a3eeb5de32
@ -148,10 +148,7 @@ def set():
|
|||||||
t for t in re.split(
|
t for t in re.split(
|
||||||
r"[\n\t]",
|
r"[\n\t]",
|
||||||
req["content_with_weight"]) if len(t) > 1]
|
req["content_with_weight"]) if len(t) > 1]
|
||||||
if len(arr) != 2:
|
q, a = rmPrefix(arr[0]), rmPrefix("\n".join(arr[1:]))
|
||||||
return get_data_error_result(
|
|
||||||
message="Q&A must be separated by TAB/ENTER key.")
|
|
||||||
q, a = rmPrefix(arr[0]), rmPrefix(arr[1])
|
|
||||||
d = beAdoc(d, arr[0], arr[1], not any(
|
d = beAdoc(d, arr[0], arr[1], not any(
|
||||||
[rag_tokenizer.is_chinese(t) for t in q + a]))
|
[rag_tokenizer.is_chinese(t) for t in q + a]))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user