```text
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:
parent
643772c216
commit
b0e6e42115
2 changed files with 4 additions and 2 deletions
|
|
@ -15,6 +15,7 @@ class ChatInput(ChatComponent):
|
||||||
display_name="Text",
|
display_name="Text",
|
||||||
multiline=True,
|
multiline=True,
|
||||||
input_types=[],
|
input_types=[],
|
||||||
|
value="",
|
||||||
info="Message to be passed as input.",
|
info="Message to be passed as input.",
|
||||||
),
|
),
|
||||||
DropdownInput(
|
DropdownInput(
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
from langflow.base.io.text import TextComponent
|
from langflow.base.io.text import TextComponent
|
||||||
from langflow.field_typing import Text
|
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):
|
class TextInput(TextComponent):
|
||||||
|
|
@ -9,7 +10,7 @@ class TextInput(TextComponent):
|
||||||
icon = "type"
|
icon = "type"
|
||||||
|
|
||||||
inputs = [
|
inputs = [
|
||||||
Input(
|
StrInput(
|
||||||
name="input_value",
|
name="input_value",
|
||||||
type=str,
|
type=str,
|
||||||
display_name="Value",
|
display_name="Value",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue