refactor: Update RecursiveCharacterTextSplitterComponent separators assignment

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-06-20 21:50:37 -03:00
commit 4c1599f531

View file

@ -60,7 +60,7 @@ class RecursiveCharacterTextSplitterComponent(Component):
elif self.separators:
# check if the separators list has escaped characters
# if there are escaped characters, unescape them
self.separators: list[str] | None = [unescape_string(x) for x in self.separators]
self.separators = [unescape_string(x) for x in self.separators]
# Make sure chunk_size and chunk_overlap are ints
if self.chunk_size: