diff --git a/ui/src/assets/fx/bochaai/detail.md b/ui/src/assets/fx/bochaai/detail.md new file mode 100644 index 000000000..729dd233d --- /dev/null +++ b/ui/src/assets/fx/bochaai/detail.md @@ -0,0 +1,16 @@ +## 概述 + +博查工具是一个支持自然语言搜索的 Web Search API,从近百亿网页和生态内容源中搜索高质量世界知识,包括新闻、图片、视频、百科、机酒、学术等. + + +## 配置 + +1. 获取API Key  +在[博查开放平台](https://open.bochaai.com/overview) 上申请 API 密钥。 +![API Key](/src/assets/fx/img/bocha_APIKey.jpg) +1. 在函数库中配置 +在函数库的博查函数面板中,点击 … > 启用参数,填写 API 密钥,并启用博查函数。 +![启动参数](/src/assets/fx/img/bocha_setting.jpg) +1. 在应用中使用 +在高级编排应用中,点击添加组件->函数库->博查,设置使用参数。 +![应用中使用](/src/assets/fx/img/bocha_app_used.jpg) \ No newline at end of file diff --git a/ui/src/assets/fx/bochaai/index.vue b/ui/src/assets/fx/bochaai/index.vue deleted file mode 100644 index c03b178d7..000000000 --- a/ui/src/assets/fx/bochaai/index.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - \ No newline at end of file diff --git a/ui/src/assets/fx/google_search/detail.md b/ui/src/assets/fx/google_search/detail.md new file mode 100644 index 000000000..e6daef902 --- /dev/null +++ b/ui/src/assets/fx/google_search/detail.md @@ -0,0 +1,23 @@ +## 概述 + +Google 搜索工具是一个实时 API,可提取搜索引擎结果,提供来自 Google 的结构化数据。它支持各种搜索类型,包括 Web、图像、新闻和地图。 + +## 配置 + +1. 创建 Google Custom Search Engine +在[Programmable Search Engine](https://programmablesearchengine.google.com/)中 添加 Search Engine +![google 创建引擎](/src/assets/fx/img/google_AddSearchEngine.jpg) +2. 获取cx参数 +进入添加引擎,在【基本】菜单中获取搜索引擎的ID,即cx。 +![google cx ](/src/assets/fx/img/google_cx.jpg) +3.获取 API Key +打开 https://developers.google.com/custom-search/v1/overview?hl=zh-cn,获取API Key。 +![google API Key](/src/assets/fx/img/google_APIKey.jpg) + +4. 配置启动参数 +在Google搜索函数的启动参数中填写配置以上参数。 +![启动参数](/src/assets/fx/img/google_setting.jpg) + +5. 在应用中使用 +在高级编排应用中,点击添加组件->函数库->博查,设置使用参数。 +![应用中使用](/src/assets/fx/img/google_app_used.jpg) diff --git a/ui/src/assets/fx/google_search/index.vue b/ui/src/assets/fx/google_search/index.vue deleted file mode 100644 index c03b178d7..000000000 --- a/ui/src/assets/fx/google_search/index.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - \ No newline at end of file diff --git a/ui/src/assets/fx/img/bocha_APIKey.jpg b/ui/src/assets/fx/img/bocha_APIKey.jpg new file mode 100644 index 000000000..998aa06f0 Binary files /dev/null and b/ui/src/assets/fx/img/bocha_APIKey.jpg differ diff --git a/ui/src/assets/fx/img/bocha_app_used.jpg b/ui/src/assets/fx/img/bocha_app_used.jpg new file mode 100644 index 000000000..2feeaeee0 Binary files /dev/null and b/ui/src/assets/fx/img/bocha_app_used.jpg differ diff --git a/ui/src/assets/fx/img/bocha_setting.jpg b/ui/src/assets/fx/img/bocha_setting.jpg new file mode 100644 index 000000000..9224d7139 Binary files /dev/null and b/ui/src/assets/fx/img/bocha_setting.jpg differ diff --git a/ui/src/assets/fx/img/google_APIKey.jpg b/ui/src/assets/fx/img/google_APIKey.jpg new file mode 100644 index 000000000..4b6e069e0 Binary files /dev/null and b/ui/src/assets/fx/img/google_APIKey.jpg differ diff --git a/ui/src/assets/fx/img/google_AddSearchEngine.jpg b/ui/src/assets/fx/img/google_AddSearchEngine.jpg new file mode 100644 index 000000000..c0182b406 Binary files /dev/null and b/ui/src/assets/fx/img/google_AddSearchEngine.jpg differ diff --git a/ui/src/assets/fx/img/google_app_used.jpg b/ui/src/assets/fx/img/google_app_used.jpg new file mode 100644 index 000000000..9b4654bf2 Binary files /dev/null and b/ui/src/assets/fx/img/google_app_used.jpg differ diff --git a/ui/src/assets/fx/img/google_cx.jpg b/ui/src/assets/fx/img/google_cx.jpg new file mode 100644 index 000000000..ce13b5c4a Binary files /dev/null and b/ui/src/assets/fx/img/google_cx.jpg differ diff --git a/ui/src/assets/fx/img/google_setting.jpg b/ui/src/assets/fx/img/google_setting.jpg new file mode 100644 index 000000000..c55be5549 Binary files /dev/null and b/ui/src/assets/fx/img/google_setting.jpg differ diff --git a/ui/src/assets/fx/img/langsearch_APIKey.jpg b/ui/src/assets/fx/img/langsearch_APIKey.jpg new file mode 100644 index 000000000..0705d54a3 Binary files /dev/null and b/ui/src/assets/fx/img/langsearch_APIKey.jpg differ diff --git a/ui/src/assets/fx/img/langsearch_app_used.jpg b/ui/src/assets/fx/img/langsearch_app_used.jpg new file mode 100644 index 000000000..e10b57861 Binary files /dev/null and b/ui/src/assets/fx/img/langsearch_app_used.jpg differ diff --git a/ui/src/assets/fx/img/langsearch_setting.jpg b/ui/src/assets/fx/img/langsearch_setting.jpg new file mode 100644 index 000000000..9224d7139 Binary files /dev/null and b/ui/src/assets/fx/img/langsearch_setting.jpg differ diff --git a/ui/src/assets/fx/langsearch/detail.md b/ui/src/assets/fx/langsearch/detail.md new file mode 100644 index 000000000..75347e1da --- /dev/null +++ b/ui/src/assets/fx/langsearch/detail.md @@ -0,0 +1,17 @@ +## 概述 + +博查工具是一个支持自然语言搜索的 Web Search API,从近百亿网页和生态内容源中搜索高质量世界知识,包括新闻、图片、视频、百科、机酒、学术等. + + +## 配置 + +1. 获取API Key  +在[博查开放平台](https://open.bochaai.com/overview) 上申请 API 密钥。 +![API Key](/src/assets/fx/img/langsearch_APIKey.jpg) +2. 在函数库中配置 +在函数库的博查函数面板中,点击 … > 启用参数,填写 API 密钥,并启用博查函数。 +![启动参数](/src/assets/fx/img/langsearch_setting.jpg) +1. 在应用中使用 +在高级编排应用中,点击添加组件->函数库->博查,设置使用参数。 + ![应用中使用](/src/assets/fx/img/langsearch_app_used.jpg) + \ No newline at end of file diff --git a/ui/src/assets/fx/langsearch/index.vue b/ui/src/assets/fx/langsearch/index.vue deleted file mode 100644 index c03b178d7..000000000 --- a/ui/src/assets/fx/langsearch/index.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - \ No newline at end of file diff --git a/ui/src/assets/fx/mysql/index.vue b/ui/src/assets/fx/mysql/index.vue deleted file mode 100644 index c03b178d7..000000000 --- a/ui/src/assets/fx/mysql/index.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - \ No newline at end of file diff --git a/ui/src/assets/fx/postgresql/index.vue b/ui/src/assets/fx/postgresql/index.vue deleted file mode 100644 index c03b178d7..000000000 --- a/ui/src/assets/fx/postgresql/index.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - \ No newline at end of file diff --git a/ui/src/assets/icon_mcp.svg b/ui/src/assets/icon_mcp.svg new file mode 100644 index 000000000..1544370a2 --- /dev/null +++ b/ui/src/assets/icon_mcp.svg @@ -0,0 +1,4 @@ + + + + diff --git a/ui/src/views/application-workflow/component/DropdownMenu.vue b/ui/src/views/application-workflow/component/DropdownMenu.vue index 859763dca..1a7c49b99 100644 --- a/ui/src/views/application-workflow/component/DropdownMenu.vue +++ b/ui/src/views/application-workflow/component/DropdownMenu.vue @@ -55,7 +55,13 @@ @click.stop="clickNodes(functionLibNode, item, 'function')" @mousedown.stop="onmousedown(functionLibNode, item, 'function')" > - + +
{{ item.name }}

@@ -127,7 +133,7 @@ import { ref, onMounted, computed } from 'vue' import { menuNodes, functionLibNode, functionNode, applicationNode } from '@/workflow/common/data' import { iconComponent } from '@/workflow/icons/utils' import applicationApi from '@/api/application' -import { isWorkFlow } from '@/utils/application' +import { isWorkFlow, isAppIcon } from '@/utils/application' const search_text = ref('') const props = defineProps({ show: { diff --git a/ui/src/views/function-lib/component/InternalDescDrawer.vue b/ui/src/views/function-lib/component/InternalDescDrawer.vue new file mode 100644 index 000000000..d85d49702 --- /dev/null +++ b/ui/src/views/function-lib/component/InternalDescDrawer.vue @@ -0,0 +1,100 @@ + + + + diff --git a/ui/src/views/function-lib/index.vue b/ui/src/views/function-lib/index.vue index e7a9867fa..0d397bca0 100644 --- a/ui/src/views/function-lib/index.vue +++ b/ui/src/views/function-lib/index.vue @@ -105,7 +105,7 @@ style="background: none" class="mr-8" > - + - + -

- -
+
+ diff --git a/ui/src/workflow/icons/mcp-node-icon.vue b/ui/src/workflow/icons/mcp-node-icon.vue index a7b580ff3..7dc36f22c 100644 --- a/ui/src/workflow/icons/mcp-node-icon.vue +++ b/ui/src/workflow/icons/mcp-node-icon.vue @@ -1,6 +1,6 @@ diff --git a/ui/src/workflow/nodes/mcp-node/index.vue b/ui/src/workflow/nodes/mcp-node/index.vue index e504b9901..b01834fb3 100644 --- a/ui/src/workflow/nodes/mcp-node/index.vue +++ b/ui/src/workflow/nodes/mcp-node/index.vue @@ -25,14 +25,14 @@
{{ $t('views.applicationWorkflow.nodes.mcpNode.tool') }} + + + {{ $t('views.applicationWorkflow.nodes.mcpNode.getTool') }}
- +
- {{ $t('views.applicationWorkflow.nodes.mcpNode.toolParam') }}
-
+ {{ $t('views.applicationWorkflow.nodes.mcpNode.toolParam') }} + +
{ - form_data.value.mcp_tools = res.data - MsgSuccess(t('views.applicationWorkflow.nodes.mcpNode.getToolsSuccess')) - }) + applicationApi + .getMcpTools({ mcp_servers: form_data.value.mcp_servers }, loading) + .then((res: any) => { + form_data.value.mcp_tools = res.data + MsgSuccess(t('views.applicationWorkflow.nodes.mcpNode.getToolsSuccess')) + }) } function changeTool() { - form_data.value.mcp_server = form_data.value.mcp_tools.filter((item: any) => item.name === form_data.value.mcp_tool)[0].server + form_data.value.mcp_server = form_data.value.mcp_tools.filter( + (item: any) => item.name === form_data.value.mcp_tool + )[0].server // console.log(form_data.value.mcp_server) - const args_schema = form_data.value.mcp_tools.filter((item: any) => item.name === form_data.value.mcp_tool)[0].args_schema + const args_schema = form_data.value.mcp_tools.filter( + (item: any) => item.name === form_data.value.mcp_tool + )[0].args_schema form_data.value.tool_form_field = [] for (const item in args_schema.properties) { let params = args_schema.properties[item].properties @@ -201,7 +210,10 @@ function changeTool() { // if (form_data.value.params_nested) { form_data.value.tool_params = { [form_data.value.params_nested]: {} } - dynamicsFormRef.value?.render(form_data.value.tool_form_field, form_data.value.tool_params[form_data.value.params_nested]) + dynamicsFormRef.value?.render( + form_data.value.tool_form_field, + form_data.value.tool_params[form_data.value.params_nested] + ) } else { form_data.value.tool_params = {} dynamicsFormRef.value?.render(form_data.value.tool_form_field, form_data.value.tool_params) @@ -223,14 +235,10 @@ const form_data = computed({ } }) - const replyNodeFormRef = ref() const validate = async () => { - let ps = [ - replyNodeFormRef.value?.validate(), - dynamicsFormRef.value?.validate() - ] + let ps = [replyNodeFormRef.value?.validate(), dynamicsFormRef.value?.validate()] return Promise.all(ps).catch((err: any) => { return Promise.reject({ node: props.nodeModel, errMessage: err }) })