This repository contains a third-party, node for the Node-RED Dashboard to provide an interactive chat window widget.
Easily build a chat-based user interface, and seamlessly integrate it with the vast collection of other Node-RED nodes available, including many for well-known AI services and offerings like OpenAI or ollama.
Below is a demonstration of the chat widget in action, integrated with an OpenAI node to provide a chatbot interface, one trained on
Here, an OpenAI agent was prompted that it is an expert in Node-RED, and should assist users with flow-building and answering general questions:
This agent was provisioned to provide coordinate data alongside it's text-based answers, which are then rendered onto a World Map, also rendered within FlowFuse Dashboard.
- Navigate to a Node-RED Editor
- Click on the "Manage Palette" option int eh Node-RED menu
- Switch to the "Install" tab
- Search for "@flowfuse/node-red-dashboard-2-ui-chat"
- Click on the "Install" button
npm install @flowfuse/node-red-dashboard-2-ui-chat
Anything sent into the node will be considered as a received message. Any messages typed into the chat will be sent out of the node as a sent message.
You can create placeholder items in your chat, like a "Typing" message by using different msg.topic values.
By assigning a msg.topic of _typing, then a placeholder "Typing..." message will be shown in the chat. This is automatically removed when the next message is received.
Any other msg.topic values used are assumed to be the name of the "author" of the message.
To get started, clone this repository:
# if using HTTPS:
git clone https://github.com/FlowFuse/node-red-dashboard-2-ui-chat.git
# if using SSH:
git clone git@github.com:FlowFuse/node-red-dashboard-2-ui-chat.gitInstall dependencies:
npm installInstall the node to your Node-RED instance for development:
# Change directory to your Node-RED user directory - typically ~/.node-red or c:\Users\<username>\.node-red
cd ~/.node-red
# Install the cloned node package - using the path to where you cloned the repo
npm install /path/to/cloned/repo/node-red-dashboard-2-ui-chatDuring development, you can use the following command to build the frontend code:
npm run build:devFor production builds, use:
npm run buildAfter running a build for front-end changes, you can simply refresh the Node-RED Dashboard to see your changes.
If changes to the Node-RED backend code or the nodes HTML, then you will need to restart Node-RED itself
In this project, the Release Please is used to automatically determine the next release version based on the commit messages in the codebase.
By using the Conventional Commits, the project adheres to a standardized format for commit messages, which Release Please uses to determine whether the next release should be a major, minor, or patch release.
-
The
Prepare releaseGitHub Action workflow:- A Release Please action that analyzes commit messages to determine the type of release required (major, minor, patch) based on the Conventional Commits specification
- Creates a pre-release pull request with the proposed version bump and changelog
- Once merged, automatically updates the version number in
package.jsonand creates a new release on GitHub with the appropriate changelog
-
The
Lint Pull Request TitleGitHub Action workflow:- A workflow that runs on pull request creation and uses the
amannn/action-semantic-pull-requestaction to validate that pull request titles follow the Conventional Commits format - Together with adjusted default merge commit message, this ensures that all commits merged into the main branch adhere to the expected format, allowing Release Please to function correctly
- A workflow that runs on pull request creation and uses the
-
The
Publish ReleaseGitHub Action workflow:- A workflow that runs when a new git tag in
v*.*.*format is pushed, builds the package and publishes the new version to the public npm registry using theJS-DevTools/npm-publishaction - Once package is published, the workflow updates the package version in the Node-RED Flow Library catalogue
- A workflow that runs when a new git tag in
The Conventional Commits preset expects pull request titles to be in the following format:
<type>(<scope>): <subject>
- Type: Describes the category of the commit. Examples include:
feat: A new feature (triggers a minor version bump).fix: A bug fix (triggers a patch version bump).perf: A code change that improves performance (triggers a patch version bump).refactor: A code change that neither fixes a bug nor adds a feature (does not trigger a release unless it's accompanied by a BREAKING CHANGE).docs: Documentation-only changes (does not trigger a release).chore: Changes to the build process or auxiliary tools and libraries (does not trigger a release).
- Scope: An optional part that provides additional context about what was changed (e.g., module, component).
- Subject: A brief description of the changes.
To indicate a breaking change, the exclamation mark ! should be used immediately after the type/scope:
feat!:fix!:refactor!:

