chore: Update ChatInput.py to include Text import and modify return type
This commit is contained in:
parent
5dd0df05a0
commit
b7a63154c3
1 changed files with 3 additions and 1 deletions
|
|
@ -2,6 +2,8 @@ from typing import Optional
|
||||||
|
|
||||||
from langflow.base.io.chat import ChatComponent
|
from langflow.base.io.chat import ChatComponent
|
||||||
from langflow.schema.message import Message
|
from langflow.schema.message import Message
|
||||||
|
from langflow.field_typing import Text
|
||||||
|
from typing import Union
|
||||||
|
|
||||||
|
|
||||||
class ChatInput(ChatComponent):
|
class ChatInput(ChatComponent):
|
||||||
|
|
@ -26,7 +28,7 @@ class ChatInput(ChatComponent):
|
||||||
input_value: Optional[str] = None,
|
input_value: Optional[str] = None,
|
||||||
files: Optional[list[str]] = None,
|
files: Optional[list[str]] = None,
|
||||||
session_id: Optional[str] = None,
|
session_id: Optional[str] = None,
|
||||||
) -> Message:
|
) -> Union[Message, Text]:
|
||||||
return super().build_with_record(
|
return super().build_with_record(
|
||||||
sender=sender,
|
sender=sender,
|
||||||
sender_name=sender_name,
|
sender_name=sender_name,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue