Skip to content

Commit 5fb17f9

Browse files
Merge pull request #4 from songday/main
Moved timeout setting out of HTTP config to ExternalHttpNode and Variable settings.
2 parents 2761dc2 + 14366ba commit 5fb17f9

34 files changed

+627
-524
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "easyflow"
33
version = "1.17.6"
44
edition = "2024"
5-
homepage = "https://dialogflowchatbot.github.io/"
5+
homepage = "https://easyflow-ai.github.io/"
66
authors = ["dialogflowchatbot <dialogflow@yeah.net>"]
77

88
[lib]
@@ -79,7 +79,7 @@ lopdf = "0.36.0"
7979
# lancedb = "0.13.0"
8080
libsqlite3-sys = { version = "0.30", features = ["bundled"] }
8181
validator = "0.20"
82-
zip = "2.2.3"
82+
zip = "2.4.1"
8383
quick-xml = "0.37.2"
8484
# usearch = "2.17"
8585
# cxx = "1.0"

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# Give it a try!
1717
* 🐋 **Docker** We provided an image on Docker Hub at [dialogflowchatbot/demo](https://hub.docker.com/repository/docker/dialogflowchatbot/demo)
18-
* 💻 **Binary releases**, please check [here](https://github.com/dialogflowchatbot/dialogflow/releases)
18+
* 💻 **Binary releases**, please check [here](https://github.com/easyflow-ai/easyflow/releases)
1919

2020
> By default application will listen to `127.0.0.1:12715`, you can use `-ip` and `-port` specify new value, e.g.: `dialogflow -ip 0.0.0.0 -port 8888`
2121
@@ -25,7 +25,7 @@
2525
* 🎨 The **front end** of this application is [here](https://github.com/dialogflowchatbot/dialogflow-frontend) -->
2626

2727
# Check out introduction page
28-
[https://dialogflowchatbot.github.io/](https://dialogflowchatbot.github.io/#/)
28+
[https://easyflow-ai.github.io/](https://easyflow-ai.github.io/)
2929

3030
# Function nodes
3131
|Node|Name|
@@ -69,7 +69,7 @@ Using the different nodes above, to arrange and combine, you can get a conversat
6969
3. Open your browser and visit: http://127.0.0.1:12715/
7070

7171
### Binary release
72-
1. From [Github release page](https://github.com/dialogflowchatbot/dialogflow/releases), depending on the operating system, download the application.
72+
1. From [Github release page](https://github.com/easyflow-ai/easyflow/releases), depending on the operating system, download the application.
7373
1. Run it directly, or use the `-ip` and `-port` parameters to perform the listening IP address and port, e.g.: `dialogflow -ip 0.0.0.0 -port 8888`.
7474
1. Open your browser and visit http://localhost:12715 (by default) or http://`new IP`:`new port` to see the application in action
7575
1. Add a main flow and click its name into it

README_zh-CN.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717

1818
# 现在就尝试一下!
1919
* 🐋 **Docker** 我们提供了一个`Docker`镜像: [dialogflowchatbot/demo](https://hub.docker.com/repository/docker/dialogflowchatbot/demo)
20-
* 💻 **可直接执行的发布版本**, 请通过发布页: [点击这里](https://github.com/dialogflowchatbot/dialogflow/releases) , 根据不同的平台下载(支持:Windows、Linux、macOS)
20+
* 💻 **可直接执行的发布版本**, 请通过发布页: [点击这里](https://github.com/easyflow-ai/easyflow/releases) , 根据不同的平台下载(支持:Windows、Linux、macOS)
2121

2222
> 默认情况下, 应用会监听: `127.0.0.1:12715`, 你可以使用 `-ip` 参数和 `-port` 参数, 来指定新的监听地址和端口, 例如: `dialogflow -ip 0.0.0.0 -port 8888`
2323
2424
<!-- # Releases and source code
25-
* 💾 If you're looking for **binary releases**, please check [here](https://github.com/dialogflowchatbot/dialogflow/releases)
25+
* 💾 If you're looking for **binary releases**, please check [here](https://github.com/easyflow-ai/easyflow/releases)
2626
* 🎈 The **back end** of this application is [here](https://github.com/dialogflowchatbot/dialogflow-backend)
2727
* 🎨 The **front end** of this application is [here](https://github.com/dialogflowchatbot/dialogflow-frontend) -->
2828

2929
# 查看详细介绍, 了解更多信息
30-
[https://dialogflowchatbot.github.io/](https://dialogflowchatbot.github.io/#/)
30+
[https://easyflow-ai.github.io/](https://easyflow-ai.github.io/)
3131

3232
# 功能节点列表
3333
|节点|名称|
@@ -71,7 +71,7 @@
7171
3. 打开浏览器并访问: http://127.0.0.1:12715/ 打开应用界面
7272

7373
### 发布版本
74-
1.[Github release page](https://github.com/dialogflowchatbot/dialogflow/releases), 选择不同系统并下载.
74+
1.[Github release page](https://github.com/easyflow-ai/easyflow/releases), 选择不同系统并下载.
7575
1. 直接执行, 或者使用 `-ip``-port` 修改监听地址, 如: `dialogflow -ip 0.0.0.0 -port 8888`.
7676
1. 打开浏览器并访问 http://localhost:12715 (默认) 或 http://`新的IP`:`新的端口` 打开应用界面
7777
1. 进入一个机器人

examples/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ Please check [html folder](./html)
44
### Java
55
You can refer to: [Java SDK](../sdk/java), in the file: `Main.java`.
66
```
7-
git clone https://github.com/dialogflowchatbot/dialogflow
8-
cd dialogflow
7+
git clone https://github.com/easyflow-ai/easyflow
8+
cd easyflow
99
cd sdk
1010
cd java
1111
# It's a Maven project
1212
```
1313

1414
### Python
1515
```
16-
git clone https://github.com/dialogflowchatbot/dialogflow
17-
cd dialogflow
16+
git clone https://github.com/easyflow-ai/easyflow
17+
cd easyflow
1818
cd sdk
1919
cd python
2020
# pip install requests

frontend/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Setup a condition branch
1010
---
1111

1212
Hi there.
13-
This is a sub-project of [Dialog flow chat bot](https://github.com/dialogflowchatbot/dialogflow)
13+
This is a sub-project of [EasyFlow](https://github.com/easyflow-ai/easyflow)
1414
It's built on Vue3
1515

1616
## Recommended IDE Setup
@@ -20,8 +20,8 @@ It's built on Vue3
2020
## Project Setup
2121

2222
```sh
23-
git clone https://github.com/dialogflowchatbot/dialogflow
24-
cd dialogflow
23+
git clone https://github.com/easyflow-ai/easyflow
24+
cd easyflow
2525
cd frontend
2626
npm install
2727
```

frontend/src/assets/lang/en.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export default {
153153
btn3: 'Try demos',
154154
dlTitle: 'Download',
155155
dl1: 'You can download the latest releases on Github',
156-
dl2: 'If you have any issues or feedback, please email to: dialogflow(AT)yeah.net or create an <a href="https://github.com/dialogflowchatbot/dialogflow/issues">issue</a>',
156+
dl2: 'If you have any issues or feedback, please email to: dialogflow(AT)yeah.net or create an <a href="https://github.com/easyflow-ai/easyflow/issues">issue</a>',
157157
introTitle: 'What is this?',
158158
intro1: 'It\'s similar to Google\'s Dialogflow, but with an additional canvas for editing processes. It\'s also similar to Typebot, but it includes a full answering backend.',
159159
intro2: 'It has a feature called flow canvas that allows you to visually edit a conversation flow, test it, and finally publish it to the public.',
@@ -169,7 +169,7 @@ export default {
169169
demo2: 'Information collection',
170170
demo3: 'Notification',
171171
demoUnvailableTitle: 'Demos are not available on Github',
172-
demoUnvailableContent: 'Since there is currently no server to host the backend.<br />But you can <a href="https://github.com/dialogflowchatbot/dialogflow/releases">download</a> this software and try these 3 demonstration dialog flows',
172+
demoUnvailableContent: 'Since there is currently no server to host the backend.<br />But you can <a href="https://github.com/easyflow-ai/easyflow/releases">download</a> this software and try these 3 demonstration dialog flows',
173173
adv2Title: 'Tiny fast and portable',
174174
adv2: 'Only ONE executable file (database is generated automatically)<br />pretty easy for deployment<br />Relying on AoT compilation technology<br />Program provides high concurrency and blazingly fast responses',
175175
adv3Title: 'Deal with various issues',

frontend/src/assets/lang/zh.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export default {
154154
btn3: '查看演示Demo',
155155
dlTitle: '下载',
156156
dl1: '您可以从Github上下载到最新版',
157-
dl2: '如果您有任何意见或建议, 请发邮件到: dialogflow(AT)yeah.net 或者创建一个 <a href="https://github.com/dialogflowchatbot/dialogflow/issues">帖子</a>',
157+
dl2: '如果您有任何意见或建议, 请发邮件到: dialogflow(AT)yeah.net 或者创建一个 <a href="https://github.com/easyflow-ai/easyflow/issues">帖子</a>',
158158
introTitle: '这是什么软件?',
159159
intro1: '它类似 Google 的 Dialogflow, 但是多了一个流程画布编辑器,可以更好的设计流程. 它也像 Typebot, 但是多了一个完整的应答后端.',
160160
intro2: '它拥有一个可视化的流程编辑器, 编辑完成后,可以测试流程, 并最终发布流程.',
@@ -170,7 +170,7 @@ export default {
170170
demo2: '用户信息收集',
171171
demo3: '一句话通知',
172172
demoUnvailableTitle: '演示在Github上不可用Demos are not available on Github',
173-
demoUnvailableContent: '由于目前没有服务器来托管后台.<br />但是可以<a href="https://github.com/dialogflowchatbot/dialogflow/releases">下载该软件</a>, 它包含了3个演示对话流程',
173+
demoUnvailableContent: '由于目前没有服务器来托管后台.<br />但是可以<a href="https://github.com/easyflow-ai/easyflow/releases">下载该软件</a>, 它包含了3个演示对话流程',
174174
adv2Title: '小巧、快速',
175175
adv2: '只有两个文件(程序和数据库),部署非常方便。<br />依托AoT编译技术<br />可提供超高的并发数和超快的响应',
176176
adv3Title: '解决各种问题',

frontend/src/assets/tools.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export function l(m) {
136136

137137
export function isOnGithub() {
138138
const u = window.location.href;
139-
return u.indexOf('dialogflowchatbot.github.io') > -1;
139+
return u.indexOf('easyflow-ai.github.io') > -1;
140140
}
141141

142142
export function persistRobotDetail(robotDetail) {

frontend/src/components/Guide.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const toSettings = () => {
113113
{{ item }}
114114
</li>
115115
</ol>
116-
<a href="https://github.com/dialogflowchatbot/dialogflow/releases">Go to download</a>
116+
<a href="https://github.com/easyflow-ai/easyflow/releases">Go to download</a>
117117
</template>
118118
</el-popover>
119119
<el-alert v-show="checkUpdateResult == 2" title="You're using the latest verion." type="success"
@@ -223,7 +223,7 @@ const toSettings = () => {
223223
<EpArrowRightBold />
224224
</el-icon>
225225
<!-- <router-link to="/docs">{{ $t('lang.guide.nav5') }}</router-link> -->
226-
<a href="https://dialogflowchatbot.github.io/docs" target="_blank">
226+
<a href="https://easyflow-ai.github.io/docs" target="_blank">
227227
{{ $t('lang.guide.nav5') }}
228228
<el-icon>
229229
<BiBoxArrowUpRight />

frontend/src/components/Home.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ const compareDifferentRobotTypeData = [
203203
{{ item }}
204204
</li>
205205
</ol>
206-
<a href="https://github.com/dialogflowchatbot/dialogflow/releases">Go to download</a>
206+
<a href="https://github.com/easyflow-ai/easyflow/releases">Go to download</a>
207207
</template>
208208
</el-popover>
209209
<el-alert v-show="checkUpdateResult == 2" title="You're using the latest verion." type="success"
@@ -283,7 +283,7 @@ const compareDifferentRobotTypeData = [
283283
<EpArrowRightBold />
284284
</el-icon>
285285
<!-- <router-link to="/docs">{{ $t('lang.guide.nav5') }}</router-link> -->
286-
<a href="https://dialogflowchatbot.github.io/doc" target="_blank">
286+
<a href="https://easyflow-ai.github.io/doc" target="_blank">
287287
{{ $t('lang.guide.nav5') }}
288288
<el-icon>
289289
<BiBoxArrowUpRight />
@@ -295,9 +295,9 @@ const compareDifferentRobotTypeData = [
295295
<div>
296296
<div class="text-center">
297297
Version: {{ currentVersion }}<br />
298-
<a href="https://dialogflowchatbot.github.io/" target="_blank">https://dialogflowchatbot.github.io/</a><br />
298+
<a href="https://easyflow-ai.github.io/" target="_blank">https://easyflow-ai.github.io/</a><br />
299299
If you have any questions or suggestions, please
300-
create a <a href="https://github.com/dialogflowchatbot/dialogflow/discussions" target="_blank">discussion</a> on
300+
create a <a href="https://github.com/easyflow-ai/easyflow/discussions" target="_blank">discussion</a> on
301301
Github
302302
or
303303
email to: dialogflow@yeah.net

frontend/src/components/external/HttpApiDetail.vue

+2-10
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ const httpApiData = reactive({
2121
protocol: 'http://',
2222
method: 'GET',
2323
address: '',
24-
timeoutMilliseconds: '1500',
24+
// timeoutMilliseconds: '1500',
2525
postContentType: 'UrlEncoded',
2626
headers: [],
2727
queryParams: [],
2828
formData: [],
2929
requestBody: '',
3030
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/123.0',
31-
asyncReq: false,
31+
// asyncReq: false,
3232
})
3333
const param = reactive({
3434
name: '',
@@ -197,9 +197,6 @@ const changeTab = (v) => {
197197
</el-form>
198198
<el-text tag="b" size="large">Advanced</el-text>
199199
<el-form :model="httpApiData" label-width="90px">
200-
<el-form-item label="Timed out">
201-
<el-input-number v-model="httpApiData.timeoutMilliseconds" :min="200" :max="600000" /> milliseconds
202-
</el-form-item>
203200
<el-form-item label="Parameters">
204201
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
205202
<el-tab-pane label="Header" name="h">
@@ -273,11 +270,6 @@ const changeTab = (v) => {
273270
<el-form-item label="User agent">
274271
<el-input v-model="httpApiData.userAgent" />
275272
</el-form-item>
276-
<el-form-item label="Sync/Async" :label-width="formLabelWidth">
277-
<!-- <el-switch v-model="httpApiData.asyncReq" class="mb-2" active-text="Asynchronous" inactive-text="Synchronous" /> -->
278-
<input type="checkbox" id="_asyncReq_" v-model="httpApiData.asyncReq" :checked="httpApiData.asyncReq" /><label
279-
for="_asyncReq_">Asynchronous</label>
280-
</el-form-item>
281273
<el-form-item>
282274
<el-button type="primary" @click="save">Save</el-button>
283275
<el-button type="info" disabled>Test (WIP)</el-button>

frontend/src/components/flow/nodes/ExternalHttpNode.vue

+76-18
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ const formLabelWidth = '100px'
1313
const apis = reactive([])
1414
const nodeName = ref()
1515
const apisRef = ref()
16+
let originAsyncReqSetting = false;
1617
const nodeData = reactive({
1718
nodeName: 'ExternalHttpNode',
1819
httpApiName: '',
1920
httpApiId: '',
21+
timeoutMilliseconds: 1500,
22+
asyncReq: false,
2023
valid: false,
2124
invalidMessages: [],
2225
newNode: true,
@@ -33,10 +36,11 @@ const validate = () => {
3336
d.valid = m.length == 0;
3437
}
3538
const saveForm = () => {
36-
const port = getNode().getPortAt(0);
37-
const branch = nodeData.branches[0];
38-
branch.branchName = 'Next';
39-
branch.branchId = port.id;
39+
// const port = getNode().getPortAt(0);
40+
// const branch = nodeData.branches[0];
41+
// branch.branchName = 'Next';
42+
// branch.branchId = port.id;
43+
addBranches();
4044
validate();
4145
// console.log(this.nodeData);
4246
node.removeData({ silent: true });
@@ -56,7 +60,63 @@ const hideForm = () => {
5660
}
5761
node.on("change:data", ({ current }) => {
5862
nodeSetFormVisible.value = true;
63+
originAsyncReqSetting = node.getData().asyncReq;
5964
});
65+
const addBranches = () => {
66+
if (originAsyncReqSetting == nodeData.asyncReq)
67+
return;
68+
node.removePorts();
69+
nodeData.branches = [];
70+
if (nodeData.asyncReq) {
71+
node.addPort({
72+
group: 'absolute',
73+
args: { x: nodeName.value.offsetWidth - 15, y: nodeName.value.offsetHeight + 50 },
74+
attrs: {
75+
text: {
76+
text: 'Next',
77+
fontSize: 12,
78+
},
79+
},
80+
81+
});
82+
nodeData.branches.push(getDefaultBranch())
83+
const port = node.getPortAt(0);
84+
const branch = nodeData.branches[0];
85+
branch.branchName = port.attrs.text.text;
86+
branch.branchId = port.id;
87+
} else {
88+
node.addPort({
89+
group: 'absolute',
90+
args: { x: nodeName.value.offsetWidth - 15, y: nodeName.value.offsetHeight + 40 },
91+
attrs: {
92+
text: {
93+
text: 'Success',
94+
fontSize: 12,
95+
},
96+
},
97+
});
98+
node.addPort({
99+
group: 'absolute',
100+
args: { x: nodeName.value.offsetWidth - 15, y: nodeName.value.offsetHeight + 56 },
101+
attrs: {
102+
text: {
103+
text: 'Fail',
104+
fontSize: 12,
105+
},
106+
},
107+
});
108+
nodeData.branches.push(getDefaultBranch())
109+
nodeData.branches.push(getDefaultBranch())
110+
let port = node.getPortAt(0);
111+
let branch = nodeData.branches[0];
112+
branch.branchName = port.attrs.text.text;
113+
branch.branchId = port.id;
114+
port = node.getPortAt(1);
115+
branch = nodeData.branches[1];
116+
branch.branchName = port.attrs.text.text;
117+
branch.branchId = port.id;
118+
}
119+
}
60120
onMounted(async () => {
61121
// console.log('httpNode')
62122
const t = await httpReq('GET', 'external/http', { robotId: robotId }, null, null);
@@ -69,18 +129,8 @@ onMounted(async () => {
69129
}
70130
}
71131
}
72-
node.addPort({
73-
group: 'absolute',
74-
args: { x: nodeName.value.offsetWidth - 15, y: nodeName.value.offsetHeight + 50 },
75-
attrs: {
76-
text: {
77-
text: 'Next',
78-
fontSize: 12,
79-
},
80-
},
81-
82-
});
83-
nodeData.branches.push(getDefaultBranch())
132+
nodeData.newNode = false;
133+
addBranches()
84134
})
85135
</script>
86136
<style scoped>
@@ -131,12 +181,20 @@ onMounted(async () => {
131181
<el-option v-for="item in apis" :key="item.id" :label="item.name" :value="item.id" />
132182
</el-select>
133183
</el-form-item>
134-
<el-form-item label="" :label-width="formLabelWidth">
184+
<el-form-item label="Timeout" :label-width="formLabelWidth">
185+
<el-input-number v-model="nodeData.timeoutMilliseconds" :min="200" :max="600000" /> milliseconds
186+
</el-form-item>
187+
<el-form-item label="Sync/Async" :label-width="formLabelWidth">
188+
<!-- <el-switch v-model="httpApiData.asyncReq" class="mb-2" active-text="Asynchronous" inactive-text="Synchronous" /> -->
189+
<input type="checkbox" id="_asyncReq_" v-model="nodeData.asyncReq"
190+
:checked="nodeData.asyncReq" /><label for="_asyncReq_">Asynchronous</label>
191+
</el-form-item>
192+
<!-- <el-form-item label="" :label-width="formLabelWidth">
135193
<el-select ref="apisRef" v-model="nodeData.httpApiId" placeholder="Choose an http interface"
136194
@change="(v) => showOptions(v)">
137195
<el-option v-for="item in apis" :key="item.id" :label="item.name" :value="item.id" />
138196
</el-select>
139-
</el-form-item>
197+
</el-form-item> -->
140198
<el-form-item label="" :label-width="formLabelWidth">
141199
<el-text size="large">
142200
<div><strong>Please note</strong> that this is just calling the interface, but the returned data

frontend/src/components/robot/RobotDetail.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ async function deleteRobot() {
246246
<EpArrowRightBold />
247247
</el-icon>
248248
<!-- <router-link to="/doc">{{ $t('lang.guide.nav5') }}</router-link> -->
249-
<a href="https://dialogflowchatbot.github.io/doc" target="_blank">
249+
<a href="https://easyflow-ai.github.io/doc" target="_blank">
250250
{{ $t('lang.guide.nav5') }}
251251
<el-icon>
252252
<BiBoxArrowUpRight />

0 commit comments

Comments
 (0)