Chat Input
The Chat Input component accepts text messages and file attachments from users and passes them downstream as structured Message objects. It automatically includes conversational metadata such as:
1. Sender Details: Identifies the message sender.
2. Session ID: Tracks the active conversation session.
3. Timestamp: Records when the message was submitted.
4. File Attachments: Includes files uploaded with the message.
Important: Do not pass a pre-formatted Message object as the initial input. The Chat Input component automatically creates the outgoing Message object and passes it to downstream components.
Chat Input Parameters
Tip: Most input parameters are hidden by default in the visual editor to keep the interface clean. To display additional parameters, use Controls from the component’s header menu.
For details about the attributes generated in the resulting payload, including input parameters that map directly to Message properties, see Message Data.
| Display Name | Description |
|---|---|
| Input Text | The message text to be passed as input. |
| Sender Type | Identifies the sender as User. |
| Sender Name | Specifies the sender's name. If not provided, it defaults to User or Language Model based on the selected Sender Type. |
| Session ID | The unique identifier for the chat session. If left empty, the current session ID is used. |
| Files | The files to be included with the message. |
Internal Architecture (For Developers)
The ChatInput class provides an asynchronous method (message_response) that constructs and stores the outgoing Message object using the Message.create() factory method:
message = await Message.create(
text=self.input_value,
sender=self.sender,
sender_name=self.sender_name,
session_id=self.session_id,
files=self.files,
properties={
"background_color": background_color,
"text_color": text_color,
"icon": icon,
},
)