-
-
Notifications
You must be signed in to change notification settings - Fork 17.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hansika Asthana
committed
Mar 11, 2024
1 parent
305a585
commit 69283ad
Showing
399 changed files
with
6,369 additions
and
9,571 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: '3.8' | ||
|
||
services: | ||
fusionflow: | ||
image: registry.digitalocean.com/maslow--registry/flowise:1.0.2 | ||
ports: | ||
- "3000:3000" | ||
networks: | ||
- fusionflow_network | ||
|
||
chromaDB: | ||
image: registry.digitalocean.com/maslow--registry/chroma:latest | ||
ports: | ||
- "8000:8000" | ||
networks: | ||
- fusionflow_network | ||
|
||
networks: | ||
fusionflow_network: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier', 'plugin:solid/typescript'], | ||
plugins: ['@typescript-eslint', 'solid'], | ||
parser: '@typescript-eslint/parser', | ||
ignorePatterns: ['**/*.md'], | ||
rules: { | ||
'@next/next/no-img-element': 'off', | ||
'@next/next/no-html-link-for-pages': 'off', | ||
'solid/no-innerhtml': 'off', | ||
'@typescript-eslint/no-namespace': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
set -e # Exit on any error | ||
|
||
echo "Running ESLint for linting..." | ||
npm run lint | ||
|
||
echo "Running ESLint for fixing issues..." | ||
npm run lint-fix | ||
|
||
echo "Formatting code..." | ||
npm run format | ||
|
||
echo "Checking formatting..." | ||
npm run format:check | ||
|
||
echo "Pre-commit checks passed." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src | ||
rollup.config.js | ||
tailwind.config.cjs | ||
tsconfig.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
build | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"printWidth": 150, | ||
"endOfLine": "lf" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
<!-- markdownlint-disable MD030 --> | ||
|
||
# Flowise Embed | ||
|
||
Javascript library to display flowise chatbot on your website | ||
|
||
![Flowise](https://github.com/FlowiseAI/FlowiseChatEmbed/blob/main/images/ChatEmbed.gif?raw=true) | ||
|
||
Install: | ||
|
||
```bash | ||
yarn install | ||
``` | ||
|
||
Dev: | ||
|
||
```bash | ||
yarn dev | ||
``` | ||
|
||
Build: | ||
|
||
```bash | ||
yarn build | ||
``` | ||
|
||
## Embed in your HTML | ||
|
||
### PopUp | ||
|
||
```html | ||
<script type="module"> | ||
import Chatbot from 'https://cdn.jsdelivr.net/npm/flowise-embed/dist/web.js'; | ||
Chatbot.init({ | ||
chatflowid: '<chatflowid>', | ||
apiHost: 'http://localhost:3000', | ||
}); | ||
</script> | ||
``` | ||
|
||
### FullPage | ||
|
||
```html | ||
<script type="module"> | ||
import Chatbot from './web.js'; | ||
Chatbot.initFull({ | ||
chatflowid: '<chatflowid>', | ||
apiHost: 'http://localhost:3000', | ||
}); | ||
</script> | ||
<flowise-fullchatbot></flowise-fullchatbot> | ||
``` | ||
|
||
To enable full screen, add `margin: 0` to <code>body</code> style, and confirm you don't set height and width | ||
|
||
```html | ||
<body style="margin: 0"> | ||
<script type="module"> | ||
import Chatbot from './web.js'; | ||
Chatbot.initFull({ | ||
chatflowid: '<chatflowid>', | ||
apiHost: 'http://localhost:3000', | ||
theme: { | ||
chatWindow: { | ||
// height: 700, don't set height | ||
// width: 400, don't set width | ||
}, | ||
}, | ||
}); | ||
</script> | ||
</body> | ||
``` | ||
|
||
## Configuration | ||
|
||
You can also customize chatbot with different configuration | ||
|
||
```html | ||
<script type="module"> | ||
import Chatbot from 'https://cdn.jsdelivr.net/npm/flowise-embed/dist/web.js'; | ||
Chatbot.init({ | ||
chatflowid: '91e9c803-5169-4db9-8207-3c0915d71c5f', | ||
apiHost: 'http://localhost:3000', | ||
chatflowConfig: { | ||
// topK: 2 | ||
}, | ||
observersConfig: { | ||
// (optional) Allows you to execute code in parent based upon signal observations within the chatbot. | ||
// The userinput field submitted to bot ("" when reset by bot) | ||
observeUserInput: (userInput) => { | ||
console.log({ userInput }); | ||
}, | ||
// The bot message stack has changed | ||
observeMessages: (messages) => { | ||
console.log({ messages }); | ||
}, | ||
// The bot loading signal changed | ||
observeLoading: (loading) => { | ||
console.log({ loading }); | ||
}, | ||
}, | ||
theme: { | ||
button: { | ||
backgroundColor: '#3B81F6', | ||
right: 20, | ||
bottom: 20, | ||
size: 'medium', | ||
iconColor: 'white', | ||
customIconSrc: 'https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/svg/google-messages.svg', | ||
}, | ||
chatWindow: { | ||
showTitle: true, // show/hide the title bar | ||
title: 'Flowise Bot', | ||
titleAvatarSrc: 'https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/svg/google-messages.svg', | ||
welcomeMessage: 'Hello! This is custom welcome message', | ||
backgroundColor: '#ffffff', | ||
height: 700, | ||
width: 400, | ||
fontSize: 16, | ||
poweredByTextColor: '#303235', | ||
botMessage: { | ||
backgroundColor: '#f7f8ff', | ||
textColor: '#303235', | ||
showAvatar: true, | ||
avatarSrc: 'https://raw.githubusercontent.com/zahidkhawaja/langchain-chat-nextjs/main/public/parroticon.png', | ||
}, | ||
userMessage: { | ||
backgroundColor: '#3B81F6', | ||
textColor: '#ffffff', | ||
showAvatar: true, | ||
avatarSrc: 'https://raw.githubusercontent.com/zahidkhawaja/langchain-chat-nextjs/main/public/usericon.png', | ||
}, | ||
textInput: { | ||
placeholder: 'Type your question', | ||
backgroundColor: '#ffffff', | ||
textColor: '#303235', | ||
sendButtonColor: '#3B81F6', | ||
}, | ||
}, | ||
}, | ||
}); | ||
</script> | ||
``` | ||
|
||
## License | ||
|
||
Source code in this repository is made available under the [MIT License](https://github.com/FlowiseAI/Flowise/blob/master/LICENSE.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/tsconfig", | ||
"display": "Default", | ||
"compilerOptions": { | ||
"composite": false, | ||
"declaration": true, | ||
"declarationMap": true, | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"inlineSources": false, | ||
"isolatedModules": true, | ||
"moduleResolution": "node", | ||
"noUnusedLocals": false, | ||
"noUnusedParameters": false, | ||
"preserveWatchOutput": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"downlevelIteration": true | ||
}, | ||
"exclude": ["node_modules"] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.