From df1fd3f89e81683d647f217d96c53c5108b5bcdd Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Fri, 13 Sep 2024 15:47:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BA=94=E7=94=A8=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=AF=AD=E9=9F=B3=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ai-chat/LogOperationButton.vue | 55 ++- ui/src/components/ai-chat/OperationButton.vue | 55 ++- ui/src/components/ai-chat/index.vue | 180 ++++------ ui/src/components/icons/index.ts | 21 ++ .../views/application/ApplicationSetting.vue | 34 +- .../base-node/component/FieldFormDialog.vue | 28 +- ui/src/workflow/nodes/base-node/index.vue | 337 +++++++++--------- 7 files changed, 397 insertions(+), 313 deletions(-) diff --git a/ui/src/components/ai-chat/LogOperationButton.vue b/ui/src/components/ai-chat/LogOperationButton.vue index 7a6dcb74d..4e3296c3c 100644 --- a/ui/src/components/ai-chat/LogOperationButton.vue +++ b/ui/src/components/ai-chat/LogOperationButton.vue @@ -5,6 +5,15 @@
+ + + + + + + + + @@ -38,6 +47,8 @@ + +
diff --git a/ui/src/components/ai-chat/index.vue b/ui/src/components/ai-chat/index.vue index 6cfc3e58d..83e29bcbf 100644 --- a/ui/src/components/ai-chat/index.vue +++ b/ui/src/components/ai-chat/index.vue @@ -108,7 +108,11 @@
- +
@@ -127,6 +131,7 @@
- -
- - - - - -
@@ -159,19 +156,22 @@ :maxlength="100000" @keydown.enter="sendChatHandle($event)" /> -
- - - - - - - - - - -
-
+ +
+ + + + + + + + + + + + + + -
- - diff --git a/ui/src/workflow/nodes/base-node/index.vue b/ui/src/workflow/nodes/base-node/index.vue index 19c0e6fc9..d618d4a2a 100644 --- a/ui/src/workflow/nodes/base-node/index.vue +++ b/ui/src/workflow/nodes/base-node/index.vue @@ -50,164 +50,16 @@ - + - - - - - -
- - {{ item.name }} - 公用 - -
- - - -
- - -
- - {{ item.name }} - {{ - $t('views.application.applicationForm.form.aiModel.unavailable') - }} -
- - - -
-
-
-
- - - - - - - - - -
- - {{ item.name }} - 公用 - -
- - - -
- - -
- - {{ item.name }} - {{ - $t('views.application.applicationForm.form.aiModel.unavailable') - }} -
- - - -
-
-
-
- -
- 全局变量 - - 添加 - -
- +
+
输入变量
+ + 添加 + +
+ @@ -248,6 +100,152 @@ + + + + + +
+ + {{ item.name }} + 公用 + +
+ + + +
+ + +
+ + {{ item.name }} + {{ + $t('views.application.applicationForm.form.aiModel.unavailable') + }} +
+ + + +
+
+
+
+ + + + 浏览器播放(免费) + TTS模型 + + + + +
+ + {{ item.name }} + 公用 + +
+ + + +
+ + +
+ + {{ item.name }} + {{ + $t('views.application.applicationForm.form.aiModel.unavailable') + }} +
+ + + +
+
+
+
+ + @@ -335,28 +333,21 @@ const validate = () => { } function getProvider() { - model - .asyncGetProvider() - .then((res: any) => { - providerOptions.value = res?.data - }) + model.asyncGetProvider().then((res: any) => { + providerOptions.value = res?.data + }) } - function getSTTModel() { - applicationApi - .getApplicationSTTModel(id) - .then((res: any) => { - sttModelOptions.value = groupBy(res?.data, 'provider') - }) + applicationApi.getApplicationSTTModel(id).then((res: any) => { + sttModelOptions.value = groupBy(res?.data, 'provider') + }) } function getTTSModel() { - applicationApi - .getApplicationTTSModel(id) - .then((res: any) => { - ttsModelOptions.value = groupBy(res?.data, 'provider') - }) + applicationApi.getApplicationTTSModel(id).then((res: any) => { + ttsModelOptions.value = groupBy(res?.data, 'provider') + }) } const currentIndex = ref(null) @@ -391,7 +382,6 @@ function refreshFieldList(data: any) { FieldFormDialogRef.value.close() } - onMounted(() => { set(props.nodeModel, 'validate', validate) if (props.nodeModel.properties.input_field_list) { @@ -403,7 +393,6 @@ onMounted(() => { getProvider() getTTSModel() getSTTModel() - })