From 259bdcbd95aa417daaf1b2e9a0b1c9a4e06aacc6 Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Wed, 12 Jun 2024 23:24:45 -0300 Subject: [PATCH] refactor: Add MultilineInput class for handling multiline text inputs --- src/backend/base/langflow/inputs/inputs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/backend/base/langflow/inputs/inputs.py b/src/backend/base/langflow/inputs/inputs.py index f46d9545d..4b3fc7038 100644 --- a/src/backend/base/langflow/inputs/inputs.py +++ b/src/backend/base/langflow/inputs/inputs.py @@ -23,11 +23,15 @@ class PromptInput(BaseInputMixin, ListableInputMixin): # Applying mixins to a specific input type class StrInput(BaseInputMixin, ListableInputMixin, DatabaseLoadMixin): # noqa: F821 field_type: Optional[SerializableFieldTypes] = FieldTypes.TEXT - multiline: StrictBoolean = False load_from_db: StrictBoolean = False """Defines if the field will allow the user to open a text editor. Default is False.""" +class MultilineInput(BaseInputMixin): + field_type: Optional[SerializableFieldTypes] = FieldTypes.TEXT + multiline: StrictBoolean = True + + class SecretStrInput(BaseInputMixin, DatabaseLoadMixin): field_type: Optional[SerializableFieldTypes] = FieldTypes.PASSWORD password: StrictBoolean = Field(default=True)