Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved timeout setting out of HTTP config to ExternalHttpNode and Variable settings. #4

Merged
merged 5 commits into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "easyflow"
version = "1.17.6"
edition = "2024"
homepage = "https://dialogflowchatbot.github.io/"
homepage = "https://easyflow-ai.github.io/"
authors = ["dialogflowchatbot <dialogflow@yeah.net>"]

[lib]
Expand Down Expand Up @@ -79,7 +79,7 @@ lopdf = "0.36.0"
# lancedb = "0.13.0"
libsqlite3-sys = { version = "0.30", features = ["bundled"] }
validator = "0.20"
zip = "2.2.3"
zip = "2.4.1"
quick-xml = "0.37.2"
# usearch = "2.17"
# cxx = "1.0"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

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

> 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`

Expand All @@ -25,7 +25,7 @@
* 🎨 The **front end** of this application is [here](https://github.com/dialogflowchatbot/dialogflow-frontend) -->

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

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

### Binary release
1. From [Github release page](https://github.com/dialogflowchatbot/dialogflow/releases), depending on the operating system, download the application.
1. From [Github release page](https://github.com/easyflow-ai/easyflow/releases), depending on the operating system, download the application.
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`.
1. Open your browser and visit http://localhost:12715 (by default) or http://`new IP`:`new port` to see the application in action
1. Add a main flow and click its name into it
Expand Down
8 changes: 4 additions & 4 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@

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

> 默认情况下, 应用会监听: `127.0.0.1:12715`, 你可以使用 `-ip` 参数和 `-port` 参数, 来指定新的监听地址和端口, 例如: `dialogflow -ip 0.0.0.0 -port 8888`

<!-- # Releases and source code
* 💾 If you're looking for **binary releases**, please check [here](https://github.com/dialogflowchatbot/dialogflow/releases)
* 💾 If you're looking for **binary releases**, please check [here](https://github.com/easyflow-ai/easyflow/releases)
* 🎈 The **back end** of this application is [here](https://github.com/dialogflowchatbot/dialogflow-backend)
* 🎨 The **front end** of this application is [here](https://github.com/dialogflowchatbot/dialogflow-frontend) -->

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

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

### 发布版本
1. 从 [Github release page](https://github.com/dialogflowchatbot/dialogflow/releases), 选择不同系统并下载.
1. 从 [Github release page](https://github.com/easyflow-ai/easyflow/releases), 选择不同系统并下载.
1. 直接执行, 或者使用 `-ip` 和 `-port` 修改监听地址, 如: `dialogflow -ip 0.0.0.0 -port 8888`.
1. 打开浏览器并访问 http://localhost:12715 (默认) 或 http://`新的IP`:`新的端口` 打开应用界面
1. 进入一个机器人
Expand Down
8 changes: 4 additions & 4 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ Please check [html folder](./html)
### Java
You can refer to: [Java SDK](../sdk/java), in the file: `Main.java`.
```
git clone https://github.com/dialogflowchatbot/dialogflow
cd dialogflow
git clone https://github.com/easyflow-ai/easyflow
cd easyflow
cd sdk
cd java
# It's a Maven project
```

### Python
```
git clone https://github.com/dialogflowchatbot/dialogflow
cd dialogflow
git clone https://github.com/easyflow-ai/easyflow
cd easyflow
cd sdk
cd python
# pip install requests
Expand Down
6 changes: 3 additions & 3 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Setup a condition branch
---

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

## Recommended IDE Setup
Expand All @@ -20,8 +20,8 @@ It's built on Vue3
## Project Setup

```sh
git clone https://github.com/dialogflowchatbot/dialogflow
cd dialogflow
git clone https://github.com/easyflow-ai/easyflow
cd easyflow
cd frontend
npm install
```
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/assets/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export default {
btn3: 'Try demos',
dlTitle: 'Download',
dl1: 'You can download the latest releases on Github',
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>',
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>',
introTitle: 'What is this?',
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.',
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.',
Expand All @@ -169,7 +169,7 @@ export default {
demo2: 'Information collection',
demo3: 'Notification',
demoUnvailableTitle: 'Demos are not available on Github',
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',
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',
adv2Title: 'Tiny fast and portable',
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',
adv3Title: 'Deal with various issues',
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/assets/lang/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export default {
btn3: '查看演示Demo',
dlTitle: '下载',
dl1: '您可以从Github上下载到最新版',
dl2: '如果您有任何意见或建议, 请发邮件到: dialogflow(AT)yeah.net 或者创建一个 <a href="https://github.com/dialogflowchatbot/dialogflow/issues">帖子</a>',
dl2: '如果您有任何意见或建议, 请发邮件到: dialogflow(AT)yeah.net 或者创建一个 <a href="https://github.com/easyflow-ai/easyflow/issues">帖子</a>',
introTitle: '这是什么软件?',
intro1: '它类似 Google 的 Dialogflow, 但是多了一个流程画布编辑器,可以更好的设计流程. 它也像 Typebot, 但是多了一个完整的应答后端.',
intro2: '它拥有一个可视化的流程编辑器, 编辑完成后,可以测试流程, 并最终发布流程.',
Expand All @@ -170,7 +170,7 @@ export default {
demo2: '用户信息收集',
demo3: '一句话通知',
demoUnvailableTitle: '演示在Github上不可用Demos are not available on Github',
demoUnvailableContent: '由于目前没有服务器来托管后台.<br />但是可以<a href="https://github.com/dialogflowchatbot/dialogflow/releases">下载该软件</a>, 它包含了3个演示对话流程',
demoUnvailableContent: '由于目前没有服务器来托管后台.<br />但是可以<a href="https://github.com/easyflow-ai/easyflow/releases">下载该软件</a>, 它包含了3个演示对话流程',
adv2Title: '小巧、快速',
adv2: '只有两个文件(程序和数据库),部署非常方便。<br />依托AoT编译技术<br />可提供超高的并发数和超快的响应',
adv3Title: '解决各种问题',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/assets/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export function l(m) {

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

export function persistRobotDetail(robotDetail) {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Guide.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const toSettings = () => {
{{ item }}
</li>
</ol>
<a href="https://github.com/dialogflowchatbot/dialogflow/releases">Go to download</a>
<a href="https://github.com/easyflow-ai/easyflow/releases">Go to download</a>
</template>
</el-popover>
<el-alert v-show="checkUpdateResult == 2" title="You're using the latest verion." type="success"
Expand Down Expand Up @@ -223,7 +223,7 @@ const toSettings = () => {
<EpArrowRightBold />
</el-icon>
<!-- <router-link to="/docs">{{ $t('lang.guide.nav5') }}</router-link> -->
<a href="https://dialogflowchatbot.github.io/docs" target="_blank">
<a href="https://easyflow-ai.github.io/docs" target="_blank">
{{ $t('lang.guide.nav5') }}
<el-icon>
<BiBoxArrowUpRight />
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ const compareDifferentRobotTypeData = [
{{ item }}
</li>
</ol>
<a href="https://github.com/dialogflowchatbot/dialogflow/releases">Go to download</a>
<a href="https://github.com/easyflow-ai/easyflow/releases">Go to download</a>
</template>
</el-popover>
<el-alert v-show="checkUpdateResult == 2" title="You're using the latest verion." type="success"
Expand Down Expand Up @@ -283,7 +283,7 @@ const compareDifferentRobotTypeData = [
<EpArrowRightBold />
</el-icon>
<!-- <router-link to="/docs">{{ $t('lang.guide.nav5') }}</router-link> -->
<a href="https://dialogflowchatbot.github.io/doc" target="_blank">
<a href="https://easyflow-ai.github.io/doc" target="_blank">
{{ $t('lang.guide.nav5') }}
<el-icon>
<BiBoxArrowUpRight />
Expand All @@ -295,9 +295,9 @@ const compareDifferentRobotTypeData = [
<div>
<div class="text-center">
Version: {{ currentVersion }}<br />
<a href="https://dialogflowchatbot.github.io/" target="_blank">https://dialogflowchatbot.github.io/</a><br />
<a href="https://easyflow-ai.github.io/" target="_blank">https://easyflow-ai.github.io/</a><br />
If you have any questions or suggestions, please
create a <a href="https://github.com/dialogflowchatbot/dialogflow/discussions" target="_blank">discussion</a> on
create a <a href="https://github.com/easyflow-ai/easyflow/discussions" target="_blank">discussion</a> on
Github
or
email to: dialogflow@yeah.net
Expand Down
12 changes: 2 additions & 10 deletions frontend/src/components/external/HttpApiDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ const httpApiData = reactive({
protocol: 'http://',
method: 'GET',
address: '',
timeoutMilliseconds: '1500',
// timeoutMilliseconds: '1500',
postContentType: 'UrlEncoded',
headers: [],
queryParams: [],
formData: [],
requestBody: '',
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/123.0',
asyncReq: false,
// asyncReq: false,
})
const param = reactive({
name: '',
Expand Down Expand Up @@ -197,9 +197,6 @@ const changeTab = (v) => {
</el-form>
<el-text tag="b" size="large">Advanced</el-text>
<el-form :model="httpApiData" label-width="90px">
<el-form-item label="Timed out">
<el-input-number v-model="httpApiData.timeoutMilliseconds" :min="200" :max="600000" /> milliseconds
</el-form-item>
<el-form-item label="Parameters">
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="Header" name="h">
Expand Down Expand Up @@ -273,11 +270,6 @@ const changeTab = (v) => {
<el-form-item label="User agent">
<el-input v-model="httpApiData.userAgent" />
</el-form-item>
<el-form-item label="Sync/Async" :label-width="formLabelWidth">
<!-- <el-switch v-model="httpApiData.asyncReq" class="mb-2" active-text="Asynchronous" inactive-text="Synchronous" /> -->
<input type="checkbox" id="_asyncReq_" v-model="httpApiData.asyncReq" :checked="httpApiData.asyncReq" /><label
for="_asyncReq_">Asynchronous</label>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="save">Save</el-button>
<el-button type="info" disabled>Test (WIP)</el-button>
Expand Down
94 changes: 76 additions & 18 deletions frontend/src/components/flow/nodes/ExternalHttpNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ const formLabelWidth = '100px'
const apis = reactive([])
const nodeName = ref()
const apisRef = ref()
let originAsyncReqSetting = false;
const nodeData = reactive({
nodeName: 'ExternalHttpNode',
httpApiName: '',
httpApiId: '',
timeoutMilliseconds: 1500,
asyncReq: false,
valid: false,
invalidMessages: [],
newNode: true,
Expand All @@ -33,10 +36,11 @@ const validate = () => {
d.valid = m.length == 0;
}
const saveForm = () => {
const port = getNode().getPortAt(0);
const branch = nodeData.branches[0];
branch.branchName = 'Next';
branch.branchId = port.id;
// const port = getNode().getPortAt(0);
// const branch = nodeData.branches[0];
// branch.branchName = 'Next';
// branch.branchId = port.id;
addBranches();
validate();
// console.log(this.nodeData);
node.removeData({ silent: true });
Expand All @@ -56,7 +60,63 @@ const hideForm = () => {
}
node.on("change:data", ({ current }) => {
nodeSetFormVisible.value = true;
originAsyncReqSetting = node.getData().asyncReq;
});
const addBranches = () => {
if (originAsyncReqSetting == nodeData.asyncReq)
return;
node.removePorts();
nodeData.branches = [];
if (nodeData.asyncReq) {
node.addPort({
group: 'absolute',
args: { x: nodeName.value.offsetWidth - 15, y: nodeName.value.offsetHeight + 50 },
attrs: {
text: {
text: 'Next',
fontSize: 12,
},
},

});
nodeData.branches.push(getDefaultBranch())
const port = node.getPortAt(0);
const branch = nodeData.branches[0];
branch.branchName = port.attrs.text.text;
branch.branchId = port.id;
} else {
node.addPort({
group: 'absolute',
args: { x: nodeName.value.offsetWidth - 15, y: nodeName.value.offsetHeight + 40 },
attrs: {
text: {
text: 'Success',
fontSize: 12,
},
},
});
node.addPort({
group: 'absolute',
args: { x: nodeName.value.offsetWidth - 15, y: nodeName.value.offsetHeight + 56 },
attrs: {
text: {
text: 'Fail',
fontSize: 12,
},
},
});
nodeData.branches.push(getDefaultBranch())
nodeData.branches.push(getDefaultBranch())
let port = node.getPortAt(0);
let branch = nodeData.branches[0];
branch.branchName = port.attrs.text.text;
branch.branchId = port.id;
port = node.getPortAt(1);
branch = nodeData.branches[1];
branch.branchName = port.attrs.text.text;
branch.branchId = port.id;
}
}
onMounted(async () => {
// console.log('httpNode')
const t = await httpReq('GET', 'external/http', { robotId: robotId }, null, null);
Expand All @@ -69,18 +129,8 @@ onMounted(async () => {
}
}
}
node.addPort({
group: 'absolute',
args: { x: nodeName.value.offsetWidth - 15, y: nodeName.value.offsetHeight + 50 },
attrs: {
text: {
text: 'Next',
fontSize: 12,
},
},

});
nodeData.branches.push(getDefaultBranch())
nodeData.newNode = false;
addBranches()
})
</script>
<style scoped>
Expand Down Expand Up @@ -131,12 +181,20 @@ onMounted(async () => {
<el-option v-for="item in apis" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="" :label-width="formLabelWidth">
<el-form-item label="Timeout" :label-width="formLabelWidth">
<el-input-number v-model="nodeData.timeoutMilliseconds" :min="200" :max="600000" /> milliseconds
</el-form-item>
<el-form-item label="Sync/Async" :label-width="formLabelWidth">
<!-- <el-switch v-model="httpApiData.asyncReq" class="mb-2" active-text="Asynchronous" inactive-text="Synchronous" /> -->
<input type="checkbox" id="_asyncReq_" v-model="nodeData.asyncReq"
:checked="nodeData.asyncReq" /><label for="_asyncReq_">Asynchronous</label>
</el-form-item>
<!-- <el-form-item label="" :label-width="formLabelWidth">
<el-select ref="apisRef" v-model="nodeData.httpApiId" placeholder="Choose an http interface"
@change="(v) => showOptions(v)">
<el-option v-for="item in apis" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="" :label-width="formLabelWidth">
<el-text size="large">
<div><strong>Please note</strong> that this is just calling the interface, but the returned data
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/robot/RobotDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ async function deleteRobot() {
<EpArrowRightBold />
</el-icon>
<!-- <router-link to="/doc">{{ $t('lang.guide.nav5') }}</router-link> -->
<a href="https://dialogflowchatbot.github.io/doc" target="_blank">
<a href="https://easyflow-ai.github.io/doc" target="_blank">
{{ $t('lang.guide.nav5') }}
<el-icon>
<BiBoxArrowUpRight />
Expand Down
Loading