Procházet zdrojové kódy

fix text split (#15426)

tags/1.0.1
Jyong před 7 měsíci
rodič
revize
f77f7e1437
Žádný účet není propojen s e-mailovou adresou tvůrce revize
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4
    1
      api/core/rag/splitter/fixed_text_splitter.py

+ 4
- 1
api/core/rag/splitter/fixed_text_splitter.py Zobrazit soubor

@@ -88,7 +88,10 @@ class FixedRecursiveCharacterTextSplitter(EnhanceRecursiveCharacterTextSplitter)
break
# Now that we have the separator, split the text
if separator:
splits = text.split(separator)
if separator == " ":
splits = text.split()
else:
splits = text.split(separator)
else:
splits = list(text)
# Now go merging things, recursively splitting longer texts.

Načítá se…
Zrušit
Uložit