Content
Chatbot
A chatbot component to build human-to-AI interactions.
Connect it to an LLM by handling the wf-chatbot-message
event, which is triggered every time the user sends a message.
You can add actions
to messages, which are buttons that trigger the wf-chatbot-action-click
.
See the stubs for more details.
Fields
Name | Type | Description | Options |
---|---|---|---|
Conversation | Object | An array with messages or a writer.ai.Conversation object. | - |
Assistant initials | Text | - | - |
User initials | Text | - | - |
Use Markdown | Boolean | If active, the output will be sanitized; unsafe elements will be removed. |
|
Enable file upload | Text | - |
|
Placeholder | Text | - | - |
Assistant role | Color | - | - |
User role | Color | - | - |
Avatar | Color | - | - |
Avatar text | Color | - | - |
Accent | Color | - | - |
Container background | Color | - | - |
Primary text | Color | - | - |
Secondary text | Color | - | - |
Separator | Color | - | - |
Button | Color | - | - |
Button text | Color | - | - |
Custom CSS classes | Text | CSS classes, separated by spaces. You can define classes in custom stylesheets. | - |
Events
Low code usage
This component can be declared directly in Python, using backend-driven UI.
A function, in this example handle_event
, should be implemented in your code to handle events.