Skip to content

Commit 847686f

Browse files
committed
Merge remote-tracking branch 'flowise/main' into main
# Conflicts: # package.json # packages/server/marketplaces/chatflows/Flowise Docs QnA.json # packages/ui/public/index.html # packages/ui/src/views/marketplaces/index.js
2 parents 7f8e884 + 2290ba9 commit 847686f

File tree

297 files changed

+8506
-1286
lines changed

Some content is hidden

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

297 files changed

+8506
-1286
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
name: autoSyncMergedPullRequest
22
on:
3-
pull_request_target:
4-
types:
5-
- closed
6-
branches: [ "main" ]
3+
pull_request_target:
4+
types:
5+
- closed
6+
branches: ['main']
77
jobs:
8-
autoSyncMergedPullRequest:
9-
if: github.event.pull_request.merged == true
10-
runs-on: ubuntu-latest
11-
permissions:
12-
contents: write
13-
steps:
14-
- uses: actions/checkout@v3
15-
- name: Show PR info
16-
env:
17-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18-
run: |
19-
echo The PR #${{ github.event.pull_request.number }} was merged on main branch!
20-
- name: Repository Dispatch
21-
uses: peter-evans/repository-dispatch@v2
22-
with:
23-
token: ${{ secrets.AUTOSYNC_TOKEN }}
24-
repository: ${{ secrets.AUTOSYNC_CH_URL }}
25-
event-type: ${{ secrets.AUTOSYNC_PR_EVENT_TYPE }}
26-
client-payload: >-
27-
{
28-
"ref": "${{ github.ref }}",
29-
"prNumber": "${{ github.event.pull_request.number }}",
30-
"prTitle": "${{ github.event.pull_request.title }}",
31-
"prDescription": "${{ github.event.pull_request.description }}",
32-
"sha": "${{ github.sha }}"
33-
}
8+
autoSyncMergedPullRequest:
9+
if: github.event.pull_request.merged == true
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Show PR info
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
run: |
19+
echo The PR #${{ github.event.pull_request.number }} was merged on main branch!
20+
- name: Repository Dispatch
21+
uses: peter-evans/repository-dispatch@v2
22+
with:
23+
token: ${{ secrets.AUTOSYNC_TOKEN }}
24+
repository: ${{ secrets.AUTOSYNC_CH_URL }}
25+
event-type: ${{ secrets.AUTOSYNC_PR_EVENT_TYPE }}
26+
client-payload: >-
27+
{
28+
"ref": "${{ github.ref }}",
29+
"prNumber": "${{ github.event.pull_request.number }}",
30+
"prTitle": "${{ github.event.pull_request.title }}",
31+
"prDescription": "${{ github.event.pull_request.description }}",
32+
"sha": "${{ github.sha }}"
33+
}
+33-33
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
name: autoSyncSingleCommit
22
on:
3-
push:
4-
branches:
5-
- main
3+
push:
4+
branches:
5+
- main
66
jobs:
7-
doNotAutoSyncSingleCommit:
8-
if: github.event.commits[1] != null
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/checkout@v3
12-
- name: IGNORE autoSyncSingleCommit
13-
run: |
14-
echo This single commit has came from a merged commit. We will ignore it. This case is handled in autoSyncMergedPullRequest workflow for merge commits comming from merged pull requests only! Beware, the regular merge commits are not handled by any workflow for the moment.
15-
autoSyncSingleCommit:
16-
if: github.event.commits[1] == null
17-
runs-on: ubuntu-latest
18-
steps:
19-
- uses: actions/checkout@v3
20-
- name: autoSyncSingleCommit
21-
env:
22-
GITHUB_CONTEXT: ${{ toJSON(github) }}
23-
run: |
24-
echo Autosync a single commit with id: ${{ github.sha }} from openSource main branch towards cloud hosted version.
25-
- name: Repository Dispatch
26-
uses: peter-evans/repository-dispatch@v2
27-
with:
28-
token: ${{ secrets.AUTOSYNC_TOKEN }}
29-
repository: ${{ secrets.AUTOSYNC_CH_URL }}
30-
event-type: ${{ secrets.AUTOSYNC_SC_EVENT_TYPE }}
31-
client-payload: >-
32-
{
33-
"ref": "${{ github.ref }}",
34-
"sha": "${{ github.sha }}",
35-
"commitMessage": "${{ github.event.commits[0].message }}"
36-
}
7+
doNotAutoSyncSingleCommit:
8+
if: github.event.commits[1] != null
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: IGNORE autoSyncSingleCommit
13+
run: |
14+
echo This single commit has came from a merged commit. We will ignore it. This case is handled in autoSyncMergedPullRequest workflow for merge commits comming from merged pull requests only! Beware, the regular merge commits are not handled by any workflow for the moment.
15+
autoSyncSingleCommit:
16+
if: github.event.commits[1] == null
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: autoSyncSingleCommit
21+
env:
22+
GITHUB_CONTEXT: ${{ toJSON(github) }}
23+
run: |
24+
echo Autosync a single commit with id: ${{ github.sha }} from openSource main branch towards cloud hosted version.
25+
- name: Repository Dispatch
26+
uses: peter-evans/repository-dispatch@v2
27+
with:
28+
token: ${{ secrets.AUTOSYNC_TOKEN }}
29+
repository: ${{ secrets.AUTOSYNC_CH_URL }}
30+
event-type: ${{ secrets.AUTOSYNC_SC_EVENT_TYPE }}
31+
client-payload: >-
32+
{
33+
"ref": "${{ github.ref }}",
34+
"sha": "${{ github.sha }}",
35+
"commitMessage": "${{ github.event.commits[0].message }}"
36+
}

CONTRIBUTING-ZH.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
不确定要贡献什么?一些想法:
3232

33-
-Langchain 创建新组件
33+
-`packages/components` 创建新组件
3434
- 更新现有组件,如扩展功能、修复错误
3535
- 添加新的 Chatflow 想法
3636

@@ -40,7 +40,7 @@ Flowise 在一个单一的单体存储库中有 3 个不同的模块。
4040

4141
- `server`:用于提供 API 逻辑的 Node 后端
4242
- `ui`:React 前端
43-
- `components`:Langchain 组件
43+
- `components`:Langchain/LlamaIndex 组件
4444

4545
#### 先决条件
4646

@@ -123,6 +123,7 @@ Flowise 支持不同的环境变量来配置您的实例。您可以在 `package
123123
| PORT | Flowise 运行的 HTTP 端口 | 数字 | 3000 |
124124
| FLOWISE_USERNAME | 登录用户名 | 字符串 | |
125125
| FLOWISE_PASSWORD | 登录密码 | 字符串 | |
126+
| FLOWISE_FILE_SIZE_LIMIT | 上传文件大小限制 | 字符串 | 50mb |
126127
| DEBUG | 打印组件的日志 | 布尔值 | |
127128
| LOG_PATH | 存储日志文件的位置 | 字符串 | `your-path/Flowise/logs` |
128129
| LOG_LEVEL | 日志的不同级别 | 枚举字符串: `error`, `info`, `verbose`, `debug` | `info` |

CONTRIBUTING.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Found an issue? [Report it](https://github.com/FlowiseAI/Flowise/issues/new/choo
3030

3131
Not sure what to contribute? Some ideas:
3232

33-
- Create new components from Langchain
33+
- Create new components from `packages/components`
3434
- Update existing components such as extending functionality, fixing bugs
3535
- Add new chatflow ideas
3636

@@ -40,7 +40,7 @@ Flowise has 3 different modules in a single mono repository.
4040

4141
- `server`: Node backend to serve API logics
4242
- `ui`: React frontend
43-
- `components`: Langchain components
43+
- `components`: Third-party nodes integrations
4444

4545
#### Prerequisite
4646

@@ -127,6 +127,7 @@ Flowise support different environment variables to configure your instance. You
127127
| IFRAME_ORIGINS | The allowed origins for iframe src embedding | String | |
128128
| FLOWISE_USERNAME | Username to login | String | |
129129
| FLOWISE_PASSWORD | Password to login | String | |
130+
| FLOWISE_FILE_SIZE_LIMIT | Upload File Size Limit | String | 50mb |
130131
| DEBUG | Print logs from components | Boolean | |
131132
| LOG_PATH | Location where log files are stored | String | `your-path/Flowise/logs` |
132133
| LOG_LEVEL | Different levels of logs | Enum String: `error`, `info`, `verbose`, `debug` | `info` |

README-ZH.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Flowise 在一个单一的代码库中有 3 个不同的模块。
7171

7272
- `server`:用于提供 API 逻辑的 Node 后端
7373
- `ui`:React 前端
74-
- `components`Langchain 组件
74+
- `components`第三方节点集成
7575

7676
### 先决条件
7777

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Flowise has 3 different modules in a single mono repository.
7171

7272
- `server`: Node backend to serve API logics
7373
- `ui`: React frontend
74-
- `components`: Langchain components
74+
- `components`: Third-party nodes integrations
7575

7676
### Prerequisite
7777

docker/.env.example

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ LOG_PATH=/root/.flowise/logs
2121
# FLOWISE_USERNAME=user
2222
# FLOWISE_PASSWORD=1234
2323
# FLOWISE_SECRETKEY_OVERWRITE=myencryptionkey
24+
# FLOWISE_FILE_SIZE_LIMIT=50mb
2425
# DEBUG=true
2526
# LOG_LEVEL=debug (error | warn | info | verbose | debug)
2627
# TOOL_FUNCTION_BUILTIN_DEP=crypto,fs

docker/docker-compose.yml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ services:
1010
- IFRAME_ORIGINS=${IFRAME_ORIGINS}
1111
- FLOWISE_USERNAME=${FLOWISE_USERNAME}
1212
- FLOWISE_PASSWORD=${FLOWISE_PASSWORD}
13+
- FLOWISE_FILE_SIZE_LIMIT=${FLOWISE_FILE_SIZE_LIMIT}
1314
- DEBUG=${DEBUG}
1415
- DATABASE_PATH=${DATABASE_PATH}
1516
- DATABASE_TYPE=${DATABASE_TYPE}

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flowise",
3-
"version": "1.4.11",
3+
"version": "1.5.1",
44
"private": true,
55
"homepage": "https://langflux.space",
66
"workspaces": [
@@ -56,5 +56,8 @@
5656
},
5757
"dependencies": {
5858
"firebase": "10.1.0"
59+
},
60+
"resolutions": {
61+
"@qdrant/openapi-typescript-fetch": "1.2.1"
5962
}
6063
}
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
import { INodeParams, INodeCredential } from '../src/Interface'
22

3-
class LLMonitorApi implements INodeCredential {
3+
class LunaryApi implements INodeCredential {
44
label: string
55
name: string
66
version: number
77
description: string
88
inputs: INodeParams[]
99

1010
constructor() {
11-
this.label = 'LLMonitor API'
12-
this.name = 'llmonitorApi'
11+
this.label = 'Lunary API'
12+
this.name = 'lunaryApi'
1313
this.version = 1.0
14-
this.description = 'Refer to <a target="_blank" href="https://llmonitor.com/docs">official guide</a> to get APP ID'
14+
this.description = 'Refer to <a target="_blank" href="https://lunary.ai/docs">official guide</a> to get APP ID'
1515
this.inputs = [
1616
{
1717
label: 'APP ID',
18-
name: 'llmonitorAppId',
18+
name: 'lunaryAppId',
1919
type: 'password',
20-
placeholder: '<LLMonitor_APP_ID>'
20+
placeholder: '<Lunary_APP_ID>'
2121
},
2222
{
2323
label: 'Endpoint',
24-
name: 'llmonitorEndpoint',
24+
name: 'lunaryEndpoint',
2525
type: 'string',
26-
default: 'https://app.llmonitor.com'
26+
default: 'https://app.lunary.ai'
2727
}
2828
]
2929
}
3030
}
3131

32-
module.exports = { credClass: LLMonitorApi }
32+
module.exports = { credClass: LunaryApi }

packages/components/nodes/agents/AirtableAgent/AirtableAgent.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { ICommonObject, INode, INodeData, INodeParams, PromptTemplate } from '../../../src/Interface'
1+
import axios from 'axios'
2+
import { BaseLanguageModel } from '@langchain/core/language_models/base'
23
import { AgentExecutor } from 'langchain/agents'
3-
import { getBaseClasses, getCredentialData, getCredentialParam } from '../../../src/utils'
4-
import { LoadPyodide, finalSystemPrompt, systemPrompt } from './core'
54
import { LLMChain } from 'langchain/chains'
6-
import { BaseLanguageModel } from 'langchain/base_language'
5+
import { ICommonObject, INode, INodeData, INodeParams, PromptTemplate } from '../../../src/Interface'
6+
import { getBaseClasses, getCredentialData, getCredentialParam } from '../../../src/utils'
77
import { ConsoleCallbackHandler, CustomChainHandler, additionalCallbacks } from '../../../src/handler'
8-
import axios from 'axios'
8+
import { LoadPyodide, finalSystemPrompt, systemPrompt } from './core'
99

1010
class Airtable_Agents implements INode {
1111
label: string

packages/components/nodes/agents/AutoGPT/AutoGPT.ts

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
import { INode, INodeData, INodeParams } from '../../../src/Interface'
2-
import { BaseChatModel } from 'langchain/chat_models/base'
3-
import { AutoGPT } from 'langchain/experimental/autogpt'
4-
import { Tool } from 'langchain/tools'
5-
import { AIMessage, HumanMessage, SystemMessage } from 'langchain/schema'
6-
import { VectorStoreRetriever } from 'langchain/vectorstores/base'
71
import { flatten } from 'lodash'
8-
import { StructuredTool } from 'langchain/tools'
2+
import { Tool, StructuredTool } from '@langchain/core/tools'
3+
import { BaseChatModel } from '@langchain/core/language_models/chat_models'
4+
import { AIMessage, HumanMessage, SystemMessage } from '@langchain/core/messages'
5+
import { VectorStoreRetriever } from '@langchain/core/vectorstores'
6+
import { PromptTemplate } from '@langchain/core/prompts'
7+
import { AutoGPT } from 'langchain/experimental/autogpt'
98
import { LLMChain } from 'langchain/chains'
10-
import { PromptTemplate } from 'langchain/prompts'
9+
import { INode, INodeData, INodeParams } from '../../../src/Interface'
1110

1211
type ObjectTool = StructuredTool
1312
const FINISH_NAME = 'finish'

packages/components/nodes/agents/BabyAGI/BabyAGI.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import { BaseChatModel } from '@langchain/core/language_models/chat_models'
2+
import { VectorStore } from '@langchain/core/vectorstores'
13
import { INode, INodeData, INodeParams } from '../../../src/Interface'
24
import { BabyAGI } from './core'
3-
import { BaseChatModel } from 'langchain/chat_models/base'
4-
import { VectorStore } from 'langchain/vectorstores/base'
55

66
class BabyAGI_Agents implements INode {
77
label: string

packages/components/nodes/agents/BabyAGI/core.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import { BaseChatModel } from '@langchain/core/language_models/chat_models'
2+
import { VectorStore } from '@langchain/core/vectorstores'
3+
import { Document } from '@langchain/core/documents'
4+
import { PromptTemplate } from '@langchain/core/prompts'
15
import { LLMChain } from 'langchain/chains'
2-
import { BaseChatModel } from 'langchain/chat_models/base'
3-
import { VectorStore } from 'langchain/dist/vectorstores/base'
4-
import { Document } from 'langchain/document'
5-
import { PromptTemplate } from 'langchain/prompts'
66

77
class TaskCreationChain extends LLMChain {
88
constructor(prompt: PromptTemplate, llm: BaseChatModel) {

packages/components/nodes/agents/CSVAgent/CSVAgent.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { ICommonObject, INode, INodeData, INodeParams, PromptTemplate } from '../../../src/Interface'
1+
import { BaseLanguageModel } from '@langchain/core/language_models/base'
22
import { AgentExecutor } from 'langchain/agents'
3-
import { getBaseClasses } from '../../../src/utils'
4-
import { LoadPyodide, finalSystemPrompt, systemPrompt } from './core'
53
import { LLMChain } from 'langchain/chains'
6-
import { BaseLanguageModel } from 'langchain/base_language'
74
import { ConsoleCallbackHandler, CustomChainHandler, additionalCallbacks } from '../../../src/handler'
5+
import { ICommonObject, INode, INodeData, INodeParams, PromptTemplate } from '../../../src/Interface'
6+
import { getBaseClasses } from '../../../src/utils'
7+
import { LoadPyodide, finalSystemPrompt, systemPrompt } from './core'
88

99
class CSV_Agents implements INode {
1010
label: string

packages/components/nodes/agents/ConversationalAgent/ConversationalAgent.ts

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
import { Tool } from 'langchain/tools'
2-
import { BaseChatModel } from 'langchain/chat_models/base'
31
import { flatten } from 'lodash'
4-
import { AgentStep, BaseMessage, ChainValues, AIMessage, HumanMessage } from 'langchain/schema'
5-
import { RunnableSequence } from 'langchain/schema/runnable'
2+
import { Tool } from '@langchain/core/tools'
3+
import { BaseChatModel } from '@langchain/core/language_models/chat_models'
4+
import { AIMessage, BaseMessage, HumanMessage } from '@langchain/core/messages'
5+
import { ChainValues } from '@langchain/core/utils/types'
6+
import { AgentStep } from '@langchain/core/agents'
7+
import { renderTemplate } from '@langchain/core/prompts'
8+
import { RunnableSequence } from '@langchain/core/runnables'
9+
import { ChatConversationalAgent } from 'langchain/agents'
610
import { getBaseClasses } from '../../../src/utils'
711
import { ConsoleCallbackHandler, CustomChainHandler, additionalCallbacks } from '../../../src/handler'
812
import { FlowiseMemory, ICommonObject, IMessage, INode, INodeData, INodeParams } from '../../../src/Interface'
913
import { AgentExecutor } from '../../../src/agents'
10-
import { ChatConversationalAgent } from 'langchain/agents'
11-
import { renderTemplate } from '@langchain/core/prompts'
1214

1315
const DEFAULT_PREFIX = `Assistant is a large language model trained by OpenAI.
1416

packages/components/nodes/agents/ConversationalRetrievalAgent/ConversationalRetrievalAgent.ts

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
import { ChainValues, AgentStep, BaseMessage } from 'langchain/schema'
21
import { flatten } from 'lodash'
3-
import { ChatOpenAI } from 'langchain/chat_models/openai'
4-
import { ChatPromptTemplate, MessagesPlaceholder } from 'langchain/prompts'
5-
import { formatToOpenAIFunction } from 'langchain/tools'
6-
import { RunnableSequence } from 'langchain/schema/runnable'
2+
import { BaseMessage } from '@langchain/core/messages'
3+
import { ChainValues } from '@langchain/core/utils/types'
4+
import { AgentStep } from '@langchain/core/agents'
5+
import { RunnableSequence } from '@langchain/core/runnables'
6+
import { ChatOpenAI, formatToOpenAIFunction } from '@langchain/openai'
7+
import { ChatPromptTemplate, MessagesPlaceholder } from '@langchain/core/prompts'
8+
import { OpenAIFunctionsAgentOutputParser } from 'langchain/agents/openai/output_parser'
79
import { FlowiseMemory, ICommonObject, IMessage, INode, INodeData, INodeParams } from '../../../src/Interface'
810
import { getBaseClasses } from '../../../src/utils'
911
import { ConsoleCallbackHandler, CustomChainHandler, additionalCallbacks } from '../../../src/handler'
10-
import { OpenAIFunctionsAgentOutputParser } from 'langchain/agents/openai/output_parser'
1112
import { AgentExecutor, formatAgentSteps } from '../../../src/agents'
1213

1314
const defaultMessage = `Do your best to answer the questions. Feel free to use any tools available to look up relevant information, only if necessary.`

0 commit comments

Comments
 (0)