Update build_config method in TextComponent subclasses
This commit is contained in:
parent
0cf2229ff1
commit
7ebbc9abac
3 changed files with 21 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ class TextComponent(CustomComponent):
|
|||
|
||||
def build_config(self):
|
||||
return {
|
||||
"input_value": {"display_name": "Value", "input_types": ["Record"]},
|
||||
"input_value": {"display_name": "Value", "input_types": ["Record"], "info": "Text or Record to be passed."},
|
||||
"record_template": {"display_name": "Record Template", "multiline": True},
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,16 @@ class TextInput(TextComponent):
|
|||
display_name = "Text Input"
|
||||
description = "Capture Text or Record and send text inputs."
|
||||
|
||||
def build_config(self):
|
||||
return {
|
||||
"input_value": {
|
||||
"display_name": "Value",
|
||||
"input_types": ["Record"],
|
||||
"info": "Text or Record to be passed as input.",
|
||||
},
|
||||
"record_template": {"display_name": "Record Template", "multiline": True},
|
||||
}
|
||||
|
||||
def build(
|
||||
self,
|
||||
input_value: Optional[str] = "",
|
||||
|
|
|
|||
|
|
@ -8,5 +8,15 @@ class TextOutput(TextComponent):
|
|||
display_name = "Text Output"
|
||||
description = "Used to send a text output."
|
||||
|
||||
def build_config(self):
|
||||
return {
|
||||
"input_value": {
|
||||
"display_name": "Value",
|
||||
"input_types": ["Record"],
|
||||
"info": "Text or Record to be passed as output.",
|
||||
},
|
||||
"record_template": {"display_name": "Record Template", "multiline": True},
|
||||
}
|
||||
|
||||
def build(self, input_value: Optional[Text] = "", record_template: str = "{text}") -> Text:
|
||||
return super().build(input_value=input_value, record_template=record_template)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue