parent
b5d969b2bb
commit
27cb143fef
|
|
@ -121,7 +121,7 @@ Flowise has 3 different modules in a single mono repository.
|
||||||
Flowise support different environment variables to configure your instance. You can specify the following variables in the `.env` file inside `packages/server` folder. Read [more](https://docs.flowiseai.com/environment-variables)
|
Flowise support different environment variables to configure your instance. You can specify the following variables in the `.env` file inside `packages/server` folder. Read [more](https://docs.flowiseai.com/environment-variables)
|
||||||
|
|
||||||
| Variable | Description | Type | Default |
|
| Variable | Description | Type | Default |
|
||||||
| ---------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------ |-------------------------------------|
|
| ---------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------ | ----------------------------------- |
|
||||||
| PORT | The HTTP port Flowise runs on | Number | 3000 |
|
| PORT | The HTTP port Flowise runs on | Number | 3000 |
|
||||||
| CORS_ORIGINS | The allowed origins for all cross-origin HTTP calls | String | |
|
| CORS_ORIGINS | The allowed origins for all cross-origin HTTP calls | String | |
|
||||||
| IFRAME_ORIGINS | The allowed origins for iframe src embedding | String | |
|
| IFRAME_ORIGINS | The allowed origins for iframe src embedding | String | |
|
||||||
|
|
@ -133,7 +133,7 @@ Flowise support different environment variables to configure your instance. You
|
||||||
| LOG_PATH | Location where log files are stored | String | `your-path/Flowise/logs` |
|
| LOG_PATH | Location where log files are stored | String | `your-path/Flowise/logs` |
|
||||||
| LOG_LEVEL | Different levels of logs | Enum String: `error`, `info`, `verbose`, `debug` | `info` |
|
| LOG_LEVEL | Different levels of logs | Enum String: `error`, `info`, `verbose`, `debug` | `info` |
|
||||||
| LOG_JSON_SPACES | Spaces to beautify JSON logs | | 2 |
|
| LOG_JSON_SPACES | Spaces to beautify JSON logs | | 2 |
|
||||||
| APIKEY_STORAGE_TYPE | To store api keys on a JSON file or database. Default is `json` | Enum String: `json`, `db` | `json` |
|
| APIKEY_STORAGE_TYPE | To store api keys on a JSON file or database. Default is `json` | Enum String: `json`, `db` | `json` |
|
||||||
| APIKEY_PATH | Location where api keys are saved when `APIKEY_STORAGE_TYPE` is `json` | String | `your-path/Flowise/packages/server` |
|
| APIKEY_PATH | Location where api keys are saved when `APIKEY_STORAGE_TYPE` is `json` | String | `your-path/Flowise/packages/server` |
|
||||||
| TOOL_FUNCTION_BUILTIN_DEP | NodeJS built-in modules to be used for Tool Function | String | |
|
| TOOL_FUNCTION_BUILTIN_DEP | NodeJS built-in modules to be used for Tool Function | String | |
|
||||||
| TOOL_FUNCTION_EXTERNAL_DEP | External modules to be used for Tool Function | String | |
|
| TOOL_FUNCTION_EXTERNAL_DEP | External modules to be used for Tool Function | String | |
|
||||||
|
|
@ -157,6 +157,7 @@ Flowise support different environment variables to configure your instance. You
|
||||||
| S3_STORAGE_SECRET_ACCESS_KEY | AWS Secret Key | String | |
|
| S3_STORAGE_SECRET_ACCESS_KEY | AWS Secret Key | String | |
|
||||||
| S3_STORAGE_REGION | Region for S3 bucket | String | |
|
| S3_STORAGE_REGION | Region for S3 bucket | String | |
|
||||||
| S3_ENDPOINT_URL | Custom Endpoint for S3 | String | |
|
| S3_ENDPOINT_URL | Custom Endpoint for S3 | String | |
|
||||||
|
| SHOW_COMMUNITY_NODES | Show nodes created by community | Boolean | |
|
||||||
|
|
||||||
You can also specify the env variables when using `npx`. For example:
|
You can also specify the env variables when using `npx`. For example:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,3 +50,4 @@ BLOB_STORAGE_PATH=/root/.flowise/storage
|
||||||
# S3_ENDPOINT_URL=<custom-s3-endpoint-url>
|
# S3_ENDPOINT_URL=<custom-s3-endpoint-url>
|
||||||
|
|
||||||
# APIKEY_STORAGE_TYPE=json (json | db)
|
# APIKEY_STORAGE_TYPE=json (json | db)
|
||||||
|
# SHOW_COMMUNITY_NODES=true
|
||||||
|
|
@ -150,6 +150,7 @@ Flowise 支持不同的环境变量来配置您的实例。您可以在 `package
|
||||||
| S3_STORAGE_SECRET_ACCESS_KEY | AWS 密钥 (Secret Key) | 字符串 | |
|
| S3_STORAGE_SECRET_ACCESS_KEY | AWS 密钥 (Secret Key) | 字符串 | |
|
||||||
| S3_STORAGE_REGION | S3 存储地区 | 字符串 | |
|
| S3_STORAGE_REGION | S3 存储地区 | 字符串 | |
|
||||||
| S3_ENDPOINT_URL | S3 端点 URL | 字符串 | |
|
| S3_ENDPOINT_URL | S3 端点 URL | 字符串 | |
|
||||||
|
| SHOW_COMMUNITY_NODES | 显示由社区创建的节点 | 布尔值 | |
|
||||||
|
|
||||||
您也可以在使用 `npx` 时指定环境变量。例如:
|
您也可以在使用 `npx` 时指定环境变量。例如:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,7 @@ export interface INodeProperties {
|
||||||
badge?: string
|
badge?: string
|
||||||
deprecateMessage?: string
|
deprecateMessage?: string
|
||||||
hideOutput?: boolean
|
hideOutput?: boolean
|
||||||
|
author?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface INode extends INodeProperties {
|
export interface INode extends INodeProperties {
|
||||||
|
|
|
||||||
|
|
@ -50,3 +50,4 @@ PORT=3000
|
||||||
# S3_ENDPOINT_URL=<custom-s3-endpoint-url>
|
# S3_ENDPOINT_URL=<custom-s3-endpoint-url>
|
||||||
|
|
||||||
# APIKEY_STORAGE_TYPE=json (json | db)
|
# APIKEY_STORAGE_TYPE=json (json | db)
|
||||||
|
# SHOW_COMMUNITY_NODES=true
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
export const appConfig = {
|
export const appConfig = {
|
||||||
apiKeys: {
|
apiKeys: {
|
||||||
storageType: process.env.APIKEY_STORAGE_TYPE ? process.env.APIKEY_STORAGE_TYPE.toLowerCase() : 'json'
|
storageType: process.env.APIKEY_STORAGE_TYPE ? process.env.APIKEY_STORAGE_TYPE.toLowerCase() : 'json'
|
||||||
}
|
},
|
||||||
|
showCommunityNodes: process.env.SHOW_COMMUNITY_NODES ? process.env.SHOW_COMMUNITY_NODES.toLowerCase() === 'true' : false
|
||||||
// todo: add more config options here like database, log, storage, credential and allow modification from UI
|
// todo: add more config options here like database, log, storage, credential and allow modification from UI
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import { getNodeModulesPackagePath } from './utils'
|
||||||
import { promises } from 'fs'
|
import { promises } from 'fs'
|
||||||
import { ICommonObject } from 'flowise-components'
|
import { ICommonObject } from 'flowise-components'
|
||||||
import logger from './utils/logger'
|
import logger from './utils/logger'
|
||||||
|
import { appConfig } from './AppConfig'
|
||||||
|
|
||||||
export class NodesPool {
|
export class NodesPool {
|
||||||
componentNodes: IComponentNodes = {}
|
componentNodes: IComponentNodes = {}
|
||||||
|
|
@ -57,7 +58,14 @@ export class NodesPool {
|
||||||
}
|
}
|
||||||
|
|
||||||
const skipCategories = ['Analytic', 'SpeechToText']
|
const skipCategories = ['Analytic', 'SpeechToText']
|
||||||
if (!skipCategories.includes(newNodeInstance.category)) {
|
const conditionOne = !skipCategories.includes(newNodeInstance.category)
|
||||||
|
|
||||||
|
const isCommunityNodesAllowed = appConfig.showCommunityNodes
|
||||||
|
const isAuthorPresent = newNodeInstance.author
|
||||||
|
let conditionTwo = true
|
||||||
|
if (!isCommunityNodesAllowed && isAuthorPresent) conditionTwo = false
|
||||||
|
|
||||||
|
if (conditionOne && conditionTwo) {
|
||||||
this.componentNodes[newNodeInstance.name] = newNodeInstance
|
this.componentNodes[newNodeInstance.name] = newNodeInstance
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,8 @@ export default class Start extends Command {
|
||||||
S3_STORAGE_ACCESS_KEY_ID: Flags.string(),
|
S3_STORAGE_ACCESS_KEY_ID: Flags.string(),
|
||||||
S3_STORAGE_SECRET_ACCESS_KEY: Flags.string(),
|
S3_STORAGE_SECRET_ACCESS_KEY: Flags.string(),
|
||||||
S3_STORAGE_REGION: Flags.string(),
|
S3_STORAGE_REGION: Flags.string(),
|
||||||
S3_ENDPOINT_URL: Flags.string()
|
S3_ENDPOINT_URL: Flags.string(),
|
||||||
|
SHOW_COMMUNITY_NODES: Flags.string()
|
||||||
}
|
}
|
||||||
|
|
||||||
async stopProcess() {
|
async stopProcess() {
|
||||||
|
|
@ -97,6 +98,7 @@ export default class Start extends Command {
|
||||||
if (flags.DEBUG) process.env.DEBUG = flags.DEBUG
|
if (flags.DEBUG) process.env.DEBUG = flags.DEBUG
|
||||||
if (flags.NUMBER_OF_PROXIES) process.env.NUMBER_OF_PROXIES = flags.NUMBER_OF_PROXIES
|
if (flags.NUMBER_OF_PROXIES) process.env.NUMBER_OF_PROXIES = flags.NUMBER_OF_PROXIES
|
||||||
if (flags.DISABLE_CHATFLOW_REUSE) process.env.DISABLE_CHATFLOW_REUSE = flags.DISABLE_CHATFLOW_REUSE
|
if (flags.DISABLE_CHATFLOW_REUSE) process.env.DISABLE_CHATFLOW_REUSE = flags.DISABLE_CHATFLOW_REUSE
|
||||||
|
if (flags.SHOW_COMMUNITY_NODES) process.env.SHOW_COMMUNITY_NODES = flags.SHOW_COMMUNITY_NODES
|
||||||
|
|
||||||
// Authorization
|
// Authorization
|
||||||
if (flags.FLOWISE_USERNAME) process.env.FLOWISE_USERNAME = flags.FLOWISE_USERNAME
|
if (flags.FLOWISE_USERNAME) process.env.FLOWISE_USERNAME = flags.FLOWISE_USERNAME
|
||||||
|
|
|
||||||
|
|
@ -491,35 +491,49 @@ const AddNodes = ({ nodesData, node, isAgentCanvas }) => {
|
||||||
<ListItemText
|
<ListItemText
|
||||||
sx={{ ml: 1 }}
|
sx={{ ml: 1 }}
|
||||||
primary={
|
primary={
|
||||||
<div
|
<>
|
||||||
style={{
|
<div
|
||||||
display: 'flex',
|
style={{
|
||||||
flexDirection: 'row',
|
display: 'flex',
|
||||||
alignItems: 'center'
|
flexDirection: 'row',
|
||||||
}}
|
alignItems: 'center'
|
||||||
>
|
}}
|
||||||
<span>{node.label}</span>
|
>
|
||||||
|
<span>{node.label}</span>
|
||||||
{node.badge && (
|
|
||||||
<Chip
|
{node.badge && (
|
||||||
sx={{
|
<Chip
|
||||||
width: 'max-content',
|
sx={{
|
||||||
fontWeight: 700,
|
width: 'max-content',
|
||||||
|
fontWeight: 700,
|
||||||
|
fontSize: '0.65rem',
|
||||||
|
background:
|
||||||
|
node.badge === 'DEPRECATING'
|
||||||
|
? theme.palette.warning
|
||||||
|
.main
|
||||||
|
: theme.palette.teal
|
||||||
|
.main,
|
||||||
|
color:
|
||||||
|
node.badge !== 'DEPRECATING'
|
||||||
|
? 'white'
|
||||||
|
: 'inherit'
|
||||||
|
}}
|
||||||
|
size='small'
|
||||||
|
label={node.badge}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
{node.author && (
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
fontSize: '0.65rem',
|
fontSize: '0.65rem',
|
||||||
background:
|
fontWeight: 700
|
||||||
node.badge === 'DEPRECATING'
|
|
||||||
? theme.palette.warning.main
|
|
||||||
: theme.palette.teal.main,
|
|
||||||
color:
|
|
||||||
node.badge !== 'DEPRECATING'
|
|
||||||
? 'white'
|
|
||||||
: 'inherit'
|
|
||||||
}}
|
}}
|
||||||
size='small'
|
>
|
||||||
label={node.badge}
|
By {node.author}
|
||||||
/>
|
</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</>
|
||||||
}
|
}
|
||||||
secondary={node.description}
|
secondary={node.description}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue