diff --git a/src/backend/langflow/interface/initialize/loading.py b/src/backend/langflow/interface/initialize/loading.py index 4e04fc8e6..5418f6906 100644 --- a/src/backend/langflow/interface/initialize/loading.py +++ b/src/backend/langflow/interface/initialize/loading.py @@ -361,6 +361,12 @@ def instantiate_textsplitter( "separator_type" in params and params["separator_type"] == "Text" ) or "separator_type" not in params: params.pop("separator_type", None) + # separators might come in as an escaped string like \\n + # so we need to convert it to a string + if "separators" in params: + params["separators"] = ( + params["separators"].encode().decode("unicode-escape") + ) text_splitter = class_object(**params) else: from langchain.text_splitter import Language