Quellcode durchsuchen

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)
tags/nightly
balibabu vor 10 Monaten
Ursprung
Commit
a3eeb5de32
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden
1 geänderte Dateien mit 1 neuen und 4 gelöschten Zeilen
  1. 1
    4
      api/apps/chunk_app.py

+ 1
- 4
api/apps/chunk_app.py Datei anzeigen

@@ -148,10 +148,7 @@ def set():
t for t in re.split(
r"[\n\t]",
req["content_with_weight"]) if len(t) > 1]
if len(arr) != 2:
return get_data_error_result(
message="Q&A must be separated by TAB/ENTER key.")
q, a = rmPrefix(arr[0]), rmPrefix(arr[1])
q, a = rmPrefix(arr[0]), rmPrefix("\n".join(arr[1:]))
d = beAdoc(d, arr[0], arr[1], not any(
[rag_tokenizer.is_chinese(t) for t in q + a]))


Laden…
Abbrechen
Speichern