fix: imports from TextInput to MessageTextInput
This commit is contained in:
parent
d18ac62476
commit
914e741e29
3 changed files with 386 additions and 118 deletions
|
|
@ -38,7 +38,7 @@ class ExampleComponent(Component):
|
||||||
icon = "icon-name"
|
icon = "icon-name"
|
||||||
|
|
||||||
inputs = [
|
inputs = [
|
||||||
TextInput(
|
MessageTextInput(
|
||||||
name="input_text",
|
name="input_text",
|
||||||
display_name="Input Text",
|
display_name="Input Text",
|
||||||
info="Text input for the component.",
|
info="Text input for the component.",
|
||||||
|
|
@ -102,7 +102,7 @@ icon = "icon-name"
|
||||||
|
|
||||||
```python
|
```python
|
||||||
inputs = [
|
inputs = [
|
||||||
TextInput(
|
MessageTextInput(
|
||||||
name="input_text",
|
name="input_text",
|
||||||
display_name="Input Text",
|
display_name="Input Text",
|
||||||
info="Text input for the component.",
|
info="Text input for the component.",
|
||||||
|
|
@ -162,7 +162,7 @@ These methods trigger `self.stop` to block the transmission for the selected out
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from langflow.custom import Component
|
from langflow.custom import Component
|
||||||
from langflow.inputs import TextInput, DropdownInput, BoolInput
|
from langflow.inputs import MessageTextInput, DropdownInput, BoolInput
|
||||||
from langflow.template import Output
|
from langflow.template import Output
|
||||||
from langflow.field_typing import Text
|
from langflow.field_typing import Text
|
||||||
|
|
||||||
|
|
@ -172,12 +172,12 @@ class ConditionalRouterComponent(Component):
|
||||||
icon = "router"
|
icon = "router"
|
||||||
|
|
||||||
inputs = [
|
inputs = [
|
||||||
TextInput(
|
MessageTextInput(
|
||||||
name="input_value",
|
name="input_value",
|
||||||
display_name="Input Value",
|
display_name="Input Value",
|
||||||
info="Value to be evaluated.",
|
info="Value to be evaluated.",
|
||||||
),
|
),
|
||||||
TextInput(
|
MessageTextInput(
|
||||||
name="comparison_value",
|
name="comparison_value",
|
||||||
display_name="Comparison Value",
|
display_name="Comparison Value",
|
||||||
info="Value to compare against.",
|
info="Value to compare against.",
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from langchain_text_splitters import CharacterTextSplitter
|
from langchain_text_splitters import CharacterTextSplitter
|
||||||
|
|
||||||
from langflow.custom import Component
|
from langflow.custom import Component
|
||||||
from langflow.io import HandleInput, IntInput, Output, TextInput
|
from langflow.io import HandleInput, IntInput, Output
|
||||||
from langflow.schema import Data
|
from langflow.schema import Data
|
||||||
from langflow.utils.util import unescape_string
|
from langflow.utils.util import unescape_string
|
||||||
|
|
||||||
|
|
@ -32,7 +33,7 @@ class SplitTextComponent(Component):
|
||||||
info="The maximum number of characters in each chunk.",
|
info="The maximum number of characters in each chunk.",
|
||||||
value=1000,
|
value=1000,
|
||||||
),
|
),
|
||||||
TextInput(
|
MessageTextInput(
|
||||||
name="separator",
|
name="separator",
|
||||||
display_name="Separator",
|
display_name="Separator",
|
||||||
info="The character to split on. Defaults to newline.",
|
info="The character to split on. Defaults to newline.",
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue