refactor: Add value attribute to ChatInput

Add a new value attribute to the ChatInput class in ChatInput.py. This allows for the pre-filling of the input field with a default value.
This commit is contained in:
Rodrigo 2024-06-12 19:41:25 -03:00
commit b0e6e42115
2 changed files with 4 additions and 2 deletions

View file

@ -15,6 +15,7 @@ class ChatInput(ChatComponent):
display_name="Text",
multiline=True,
input_types=[],
value="",
info="Message to be passed as input.",
),
DropdownInput(

View file

@ -1,6 +1,7 @@
from langflow.base.io.text import TextComponent
from langflow.field_typing import Text
from langflow.template import Input, Output
from langflow.inputs import StrInput, Input
from langflow.template import Output
class TextInput(TextComponent):
@ -9,7 +10,7 @@ class TextInput(TextComponent):
icon = "type"
inputs = [
Input(
StrInput(
name="input_value",
type=str,
display_name="Value",