diff --git a/src/backend/base/langflow/components/helpers/CombineText.py b/src/backend/base/langflow/components/helpers/CombineText.py index c61302a22..1f8ac5e13 100644 --- a/src/backend/base/langflow/components/helpers/CombineText.py +++ b/src/backend/base/langflow/components/helpers/CombineText.py @@ -1,25 +1,28 @@ from langflow.interface.custom.custom_component import CustomComponent from langflow.field_typing import Text - class CombineTextComponent(CustomComponent): display_name = "Combine Text" - description = "Concatenate multiple text sources into a single text chunk using a specified delimiter." + description = "Concatenate two text sources into a single text chunk using a specified delimiter." icon = "merge" def build_config(self): return { - "texts": { - "display_name": "Texts", - "info": "Multiple text inputs to concatenate.", + "text1": { + "display_name": "First Text", + "info": "The first text input to concatenate.", + }, + "text2": { + "display_name": "Second Text", + "info": "The second text input to concatenate.", }, "delimiter": { "display_name": "Delimiter", - "info": "A string used to separate each text input. Defaults to a whitespace.", + "info": "A string used to separate the two text inputs. Defaults to a whitespace.", }, } - def build(self, texts: list[str], delimiter: str = " ") -> Text: - combined = delimiter.join(texts) + def build(self, text1: str, text2: str, delimiter: str = " ") -> Text: + combined = delimiter.join([text1, text2]) self.status = combined return combined