diff --git a/src/backend/base/langflow/components/inputs/TextInput.py b/src/backend/base/langflow/components/inputs/TextInput.py index 9db7f0481..0c759c4e1 100644 --- a/src/backend/base/langflow/components/inputs/TextInput.py +++ b/src/backend/base/langflow/components/inputs/TextInput.py @@ -1,8 +1,7 @@ from langflow.base.io.text import TextComponent from langflow.field_typing import Text -from langflow.inputs import StrInput +from langflow.inputs import MultilineInput, StrInput from langflow.template import Output -from langflow.schema.message import Message class TextInput(TextComponent): @@ -13,15 +12,12 @@ class TextInput(TextComponent): inputs = [ StrInput( name="input_value", - type=str, display_name="Text", info="Text to be passed as input.", - input_types=["Text", "Message"], ), - StrInput( + MultilineInput( name="data_template", display_name="Data Template", - multiline=True, info="Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.", advanced=True, value="{text}", @@ -32,9 +28,4 @@ class TextInput(TextComponent): ] def text_response(self) -> Text: - if isinstance(self.input_value, Message): - text = self.input_value.text - else: - text = self.input_value - - return self.build(input_value=text, data_template=self.data_template) + return self.build(input_value=self.input_value, data_template=self.data_template)