Subscribe to Youtube channel

Create chatbot in few minutes using FloWiseAI open-source tool

In this article I am going to demonstrate how to design and create chatbot using FlowWiseAI tool. I will also demonstrate how you can integrate chatbots with your existing web application with minimal code. In this article I have used OpenAI as a LLM (large language model).


 

 

go to below FlowiseAI website which is Open source UI visual tool to build your customized LLM flow powered by LangchainJS, written in Node Typescript/Javascript

 https://flowiseai.com/

 in above webpage there is following link of GitHub

https://github.com/FlowiseAI/Flowise 

 There is three way we can use the flowwiseAI 

  1. Global installation of FlowiseAI using Node version Higher Than  18.15.0
  2. Using Docker image
  3. Using Developer after cloning the application in local using GitHub  

In this article i am going to talking about the global installation of FlowiseAI to create chatbot

Prerequisite:

Install NodeJS version 18.15.0 or above.

after installation of NodeJS open the powershell terminal and execute the following command to install FlowiseAI globally in the machine.

npm install -g flowise

 After installation completed, execute the below command to run the FlowiseAI application.

npx flowise start

 This will run the application and will be accessible using http://localhost:3000 as per image below.

 

FlowiseAi 1

 Now first add the OpenAI secret key in credential page of FlowiseAI as per shown in below images.

Click on add credentials button on credential page it will open one popup where search for OpenAI API option as shown in below figure.

flowise credential 1

 Now enter the credential name for OpenAI API and enter the secret key and click on Add button as shown in figure.

flowise credential 2

 Now you will see the credentials added in list page as shown in below figure.

flowise credential 3

 Now we have added the OpenAI API secret key in credentials so we can use this credentials in building the chat-bot in chaflows page.

Now navigate to ChatFlows page and add the below three components in canvas connect as per below images.

  1. ChatOpenAI - This will connect with openAI API and provide response to the given prompt in chat prompt template.
  2. Chat Prompt Template - This helps to setup persona of chat-bots using system prompt and human prompt
  3. LLM Chain - Its a connector between ChatOpenAI and Chat prompt Template

 

Now select the added credentials in ChatOpenAI component as shown in figure.

 

flowise ChatFlows 4


 

 Connect the components with each other by dragging the nodes to each component as per below images.

Update the system message and human message as per your requirement. 

flowise ChatFlows 1

Once settings done then save the chatflows by giving unique name to your chatbot.

 

flowise ChatFlows 2

Now click on right corner button to test the bot, it will open chat popup where you can ask questions to chat bot you have designed, below is the image which demonstrate the chat popup sample.

flowise ChatFlows 3

Now once your chatbot is got tested we can now integrate this chatbot to your existing website. You can get the code to integrate the chatbot by clicking code icon button in right top corner. as shown in below figures.

flowise ChatFlows 5

 Copy the code from above popup and paste it to the head section of html page as per below image.

flowise ChatFlows 6

 Now you have successfully integrated chat-bot to your website.

flowise ChatFlows 7

This way we can create chat-bots with minimal code to your existing websites.

 

 

Comments

Popular posts from this blog

Implement Logging in CSV file using Nlog in .net core MVC application- part 2

Implement Nlog in .Net core MVC application part 1

Disable backspace key using Jquery

Devexpress Datebox date formatting in angular 6 with example

Angular User Session Timeout example step by step

Restore the lost focus of Auto post back controls in asp.net update Panel control

How to Import CSV File and bind csv file data to gridview in asp.net using c#

Remove Owin from MVC 5 Application and use asp.net custom forms authentication

Configure archival and purging of log file in Nlog