ToiBot is a chatbot application built with Node.js that showcases the capabilities of the Flowise SDK.
ToiBot is a chatbot application built with Node.js and the Flowise SDK. It provides a web interface that enables users to interact with their Flowise workflows.
https://github.com/user-attachments/assets/62676708-778e-42e9-8224-a88c015a73e6
This project is intended as a starting point for inexperienced users looking to explore and learn about the Flowise SDK. It provides a basic foundation for building applications using the SDK but is not intended for production use and will not be actively maintained. Users are encouraged to fork the project and adapt it to their specific needs and use cases. Please note that ongoing support or updates should not be expected.
Clone the repository:
git clone https://github.com/toi500/ToiBot.git
cd ToiBot
Install the dependencies:
npm install
Create a .env
file in the root directory and add your Flowise API credentials:
FLOWISE_API_KEY=your_api_key_here
FLOWISE_BASE_URL=your_base_url_here
FLOWISE_CHATFLOW_ID=your_chatflow_id_here
Start the server:
npm start
Open a web browser and navigate to http://localhost:3000
to interact with the chatbot.
The application uses a .env
file to manage sensitive information such as API keys and URLs. Ensure you have the dotenv
package installed to load these variables into your application.
The ToiBot chatbot uses the Flowise SDK to interact with the Flowise API. The SDK manages communication with the Flowise API, including session IDs to maintain context across multiple interactions.
The session ID feature is essential for maintaining context in conversations. Each session is identified by a unique session ID, allowing the chatbot to remember previous interactions and provide more relevant responses. This feature is particularly useful for applications requiring continuity in user interactions.
You can monitor the chatbot's data flow directly in the terminal. When you start the server, the terminal will display real-time logs of the interactions, including received chunks and metadata. This feature helps in debugging and understanding the chatbot's behavior during conversations.
server.js
: The main server file that sets up the Express application and handles API requests.public/
: Contains static files served by the Express application, including HTML, CSS, and client-side JavaScript.package.json
: Lists the project dependencies and scripts.express
: Web framework for Node.jsflowise-sdk
: SDK for interacting with the Flowise APInode-fetch
: A lightweight module that brings window.fetch
to Node.jsreadline
: Provides an interface for reading data from a Readable streammarked
: A markdown parser and compilerdotenv
: Loads environment variables from a .env
file into process.env
This project is licensed under the ISC License. Use it as you see fit.