Ver código fonte

fix text split (#15426)

tags/1.0.1
Jyong 7 meses atrás
pai
commit
f77f7e1437
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4
    1
      api/core/rag/splitter/fixed_text_splitter.py

+ 4
- 1
api/core/rag/splitter/fixed_text_splitter.py Ver arquivo

@@ -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.

Carregando…
Cancelar
Salvar