Skip to content

Commit f7feeb1

Browse files
committed
AI Chatbot
1 parent c65d8a9 commit f7feeb1

File tree

174 files changed

+208
-1271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+208
-1271
lines changed

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ FLOWISE_API_KEY=
1616
# CHATFLOWS CONFIGURATION (required)
1717
# ==============================================
1818

19-
# Format: [identifier]=[chatflowId],[allowedDomain1],[allowedDomain2],...
19+
# Format: [identifier]=[chatbot],[allowedDomain1],[allowedDomain2],...
2020
#
2121
# Each entry consists of:
2222
# - identifier: Any name you choose (e.g., agent1, support, salesbot)
23-
# - chatflowId: The UUID of your Flowise chatflow
23+
# - chatbot: The chatbot name
2424
# - allowedDomains: Comma-separated list of domains where this chat can be embedded
2525
# Note: Wildcard domains (*) are not supported for security reasons
2626
#

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
.idea
3-
.env
3+
.env
4+
dist

README.md

Lines changed: 31 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
<!-- markdownlint-disable MD030 -->
22

3-
# Flowise Embed
4-
5-
Javascript library to display flowise chatbot on your website
6-
7-
![Flowise](https://github.com/FlowiseAI/FlowiseChatEmbed/blob/main/images/ChatEmbed.gif?raw=true)
3+
# aichatbot.com.vn Embed
84

95
Install:
106

@@ -18,15 +14,15 @@ Dev:
1814
yarn dev
1915
```
2016

21-
A development server will be running on http://localhost:5678 automatically. Update `public/index.html` to connect directly to Flowise:
17+
A development server will be running on http://localhost:5678 automatically. Update `public/index.html` to connect directly to aichatbot.com.vn:
2218

2319
```html
2420
<!-- public/index.html -->
2521
<script type="module">
2622
import Chatbot from 'https://localhost:5678/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
2723
Chatbot.init({
28-
chatflowid: '91e9c803-5169-4db9-8207-3c0915d71c5f', // Add your Flowise chatflowid
29-
apiHost: 'https://your-flowise-instance.com', // Add your Flowise apiHost
24+
chatbot: 'mitiga', // Add your chatbot name
25+
apiHost: 'https://aichatbot.com.vn',
3026
});
3127
</script>
3228
```
@@ -43,9 +39,9 @@ yarn build
4339

4440
```html
4541
<script type="module">
46-
import Chatbot from 'https://cdn.jsdelivr.net/npm/flowise-embed/dist/web.js';
42+
import Chatbot from 'https://aichatbot.com.vn/chatbox_v3.js';
4743
Chatbot.init({
48-
chatflowid: '<chatflowid>',
44+
chatbot: '<chatbot_name>',
4945
apiHost: 'http://localhost:3000',
5046
});
5147
</script>
@@ -55,23 +51,23 @@ yarn build
5551

5652
```html
5753
<script type="module">
58-
import Chatbot from 'https://cdn.jsdelivr.net/npm/flowise-embed/dist/web.js';
54+
import Chatbot from 'https://aichatbot.com.vn/chatbox_v3.js';
5955
Chatbot.initFull({
60-
chatflowid: '<chatflowid>',
56+
chatbot: '<chatbot_name>',
6157
apiHost: 'http://localhost:3000',
6258
});
6359
</script>
64-
<flowise-fullchatbot></flowise-fullchatbot>
60+
<ai-fullchatbot></ai-fullchatbot>
6561
```
6662

6763
To enable full screen, add `margin: 0` to <code>body</code> style, and confirm you don't set height and width
6864

6965
```html
7066
<body style="margin: 0">
7167
<script type="module">
72-
import Chatbot from 'https://cdn.jsdelivr.net/npm/flowise-embed/dist/web.js';
68+
import Chatbot from 'https://aichatbot.com.vn/chatbox_v3.js';
7369
Chatbot.initFull({
74-
chatflowid: '<chatflowid>',
70+
chatbot: '<chatbot_name>',
7571
apiHost: 'http://localhost:3000',
7672
theme: {
7773
chatWindow: {
@@ -90,11 +86,11 @@ You can also customize chatbot with different configuration
9086

9187
```html
9288
<script type="module">
93-
import Chatbot from 'https://cdn.jsdelivr.net/npm/flowise-embed/dist/web.js';
89+
import Chatbot from 'https://aichatbot.com.vn/chatbox_v3.js';
9490
Chatbot.init({
95-
chatflowid: '91e9c803-5169-4db9-8207-3c0915d71c5f',
91+
chatbot: 'mitiga',
9692
apiHost: 'http://localhost:3000',
97-
chatflowConfig: {
93+
config: {
9894
// topK: 2
9995
},
10096
observersConfig: {
@@ -136,7 +132,7 @@ You can also customize chatbot with different configuration
136132
},
137133
disclaimer: {
138134
title: 'Disclaimer',
139-
message: 'By using this chatbot, you agree to the <a target="_blank" href="https://flowiseai.com/terms">Terms & Condition</a>',
135+
message: 'By using this chatbot, you agree to the <a target="_blank" href="https://aichatbot.com.vn/terms">Terms & Condition</a>',
140136
textColor: 'black',
141137
buttonColor: '#3b82f6',
142138
buttonText: 'Start Chatting',
@@ -154,7 +150,7 @@ You can also customize chatbot with different configuration
154150
chatWindow: {
155151
showTitle: true,
156152
showAgentMessages: true,
157-
title: 'Flowise Bot',
153+
title: 'MITIGA AI',
158154
titleAvatarSrc: 'https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/svg/google-messages.svg',
159155
titleBackgroundColor: '#3B81F6',
160156
titleTextColor: '#ffffff',
@@ -205,8 +201,8 @@ You can also customize chatbot with different configuration
205201
footer: {
206202
textColor: '#303235',
207203
text: 'Powered by',
208-
company: 'Flowise',
209-
companyLink: 'https://flowiseai.com',
204+
company: 'MITIGA AI',
205+
companyLink: 'https://aichatbot.com.vn',
210206
},
211207
},
212208
},
@@ -216,7 +212,7 @@ You can also customize chatbot with different configuration
216212

217213
## (Experimental) Proxy Server Setup
218214

219-
The Flowise Embed Proxy Server enhances the security of your chatbot implementation by acting as a protective intermediary layer. This server eliminates the need to expose sensitive Flowise instance details in your frontend code and provides several key security benefits:
215+
The aichatbot.com.vn Embed Proxy Server enhances the security of your chatbot implementation by acting as a protective intermediary layer. This server eliminates the need to expose sensitive Flowise instance details in your frontend code and provides several key security benefits:
220216

221217
![Proxy Server](https://github.com/FlowiseAI/FlowiseChatEmbed/blob/main/images/proxyserver.png?raw=true)
222218

@@ -233,14 +229,14 @@ This proxy server can be deployed to any Node.js hosting platform.
233229

234230
```bash
235231
# Copy .env.example to .env and configure required settings:
236-
API_HOST=https://your-flowise-instance.com
237-
FLOWISE_API_KEY=your-api-key
232+
API_HOST=https://aichatbot.com.vn
233+
API_KEY=your-api-key
238234

239235
# Configure your chatflows:
240-
# Format: [identifier]=[chatflowId],[allowedDomain1],[allowedDomain2],...
236+
# Format: [identifier]=[chatbot],[allowedDomain1],[allowedDomain2],...
241237
#
242238
# identifier: Any name you choose (e.g., agent1, support, salesbot)
243-
# chatflowId: The UUID of your Flowise chatflow
239+
# chatbot: The chatbot name
244240
# allowedDomains: Comma-separated list of domains where this chat can be embedded
245241
#
246242
# Examples:
@@ -264,15 +260,15 @@ yarn start
264260
# - Cloud: [Your Platform URL] (e.g., https://your-app.herokuapp.com)
265261
```
266262

267-
4. Once the proxy server is running in production, you will be able to embed your chatbots safely without exposing your Flowise API host and chatflow IDs as below:
263+
4. Once the proxy server is running in production, you will be able to embed your chatbots safely without exposing your aichatbot.com.vn API host and chatbot name as below:
268264

269265
```html
270266
<script type="module">
271267
import Chatbot from 'your-proxy-server-url/web.js'; // Must be 'your-proxy-server-url/web.js'
272268
Chatbot.init({
273-
chatflowid: 'your-identifier-here', // Must match an identifier from your .env
269+
chatbot: 'your-identifier-here', // Must match an identifier from your .env
274270
apiHost: 'your-proxy-server-url', // Must match the URL of your proxy server
275-
chatflowConfig: {
271+
config: {
276272
// ...
277273
},
278274
});
@@ -283,7 +279,7 @@ yarn start
283279

284280
```html
285281
<!-- public/index.html -->
286-
chatflowid: 'your-identifier-here' // Must match an identifier from your .env
282+
chatbot: 'your-identifier-here' // Must match an identifier from your .env
287283
```
288284

289285
**Important Notes:**
@@ -311,14 +307,14 @@ yarn start
311307
3. Update the test page configuration:
312308

313309
- Open `public/index.html` in your code editor
314-
- Modify the `chatflowid` and `apiHost` to match your `.env` settings:
310+
- Modify the `chatbot` and `apiHost` to match your `.env` settings:
315311

316312
```html
317313
<!-- public/index.html -->
318314
<script type="module">
319315
import Chatbot from './web.js';
320316
Chatbot.init({
321-
chatflowid: 'agent1', // Must match an identifier from your .env
317+
chatbot: 'agent1', // Must match an identifier from your .env
322318
apiHost: 'http://localhost:3001', // Change this from window.location.origin to 'http://localhost:3001'
323319
});
324320
</script>
@@ -328,11 +324,11 @@ For full page testing, use this configuration instead:
328324

329325
```html
330326
<!-- public/index.html -->
331-
<flowise-fullchatbot></flowise-fullchatbot>
327+
<ai-fullchatbot></ai-fullchatbot>
332328
<script type="module">
333329
import Chatbot from './web.js';
334330
Chatbot.initFull({
335-
chatflowid: 'agent1', // Must match an identifier from your .env
331+
chatbot: 'agent1', // Must match an identifier from your .env
336332
apiHost: 'http://localhost:3001', // Change this from window.location.origin to 'http://localhost:3001'
337333
});
338334
</script>

dist/components/Badge.d.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

dist/components/Badge.d.ts.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/components/Bot.d.ts

Lines changed: 0 additions & 134 deletions
This file was deleted.

dist/components/Bot.d.ts.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/components/FeedbackContentDialog.d.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

dist/components/FeedbackContentDialog.d.ts.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)