Update TextInput and ChatOutput build methods
This commit is contained in:
parent
4ad0385768
commit
0cf2229ff1
3 changed files with 11 additions and 9 deletions
|
|
@ -6,7 +6,11 @@ from langflow.field_typing import Text
|
|||
|
||||
class TextInput(TextComponent):
|
||||
display_name = "Text Input"
|
||||
description = "Capture and send text inputs."
|
||||
description = "Capture Text or Record and send text inputs."
|
||||
|
||||
def build(self, input_value: Optional[str] = "") -> Text:
|
||||
return super().build(input_value=input_value)
|
||||
def build(
|
||||
self,
|
||||
input_value: Optional[str] = "",
|
||||
record_template: Optional[str] = "{text}",
|
||||
) -> Text:
|
||||
return super().build(input_value=input_value, record_template=record_template)
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ class ChatOutput(ChatComponent):
|
|||
input_value: Optional[str] = None,
|
||||
session_id: Optional[str] = None,
|
||||
return_record: Optional[bool] = False,
|
||||
record_template: Optional[str] = "{text}",
|
||||
) -> Union[Text, Record]:
|
||||
return super().build(
|
||||
sender=sender,
|
||||
|
|
@ -24,4 +25,5 @@ class ChatOutput(ChatComponent):
|
|||
input_value=input_value,
|
||||
session_id=session_id,
|
||||
return_record=return_record,
|
||||
record_template=record_template,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -8,9 +8,5 @@ class TextOutput(TextComponent):
|
|||
display_name = "Text Output"
|
||||
description = "Used to send a text output."
|
||||
|
||||
field_config = {
|
||||
"input_value": {"display_name": "Value"},
|
||||
}
|
||||
|
||||
def build(self, input_value: Optional[Text] = "") -> Text:
|
||||
return super().build(input_value=input_value)
|
||||
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