From a7d0adad5ca080423962b7c2fd63530a7ad69676 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Mon, 1 Jul 2024 17:14:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dinput-number=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/LimitDialog.vue | 1 + .../component/CreateApplicationDialog.vue | 3 ++- .../component/ParamSettingDialog.vue | 2 ++ .../component/ImportDocumentDialog.vue | 1 + ui/src/views/hit-test/index.vue | 3 ++- ui/src/views/log/index.vue | 2 ++ ui/src/workflow/nodes/ai-chat-node/index.vue | 23 ++++++++++++++++++- 7 files changed, 32 insertions(+), 3 deletions(-) diff --git a/ui/src/views/application-overview/component/LimitDialog.vue b/ui/src/views/application-overview/component/LimitDialog.vue index 69ec0ab83..6bdffd2fd 100644 --- a/ui/src/views/application-overview/component/LimitDialog.vue +++ b/ui/src/views/application-overview/component/LimitDialog.vue @@ -17,6 +17,7 @@ v-model="form.access_num" :min="0" :step="1" + :value-on-clear="0" controls-position="right" step-strictly /> diff --git a/ui/src/views/application/component/CreateApplicationDialog.vue b/ui/src/views/application/component/CreateApplicationDialog.vue index 61bf39e4b..39252b014 100644 --- a/ui/src/views/application/component/CreateApplicationDialog.vue +++ b/ui/src/views/application/component/CreateApplicationDialog.vue @@ -83,6 +83,7 @@ import { MsgSuccess } from '@/utils/message' import { isWorkFlow } from '@/utils/application' import { t } from '@/locales' const router = useRouter() +const emit = defineEmits(['refresh']) // @ts-ignore const defaultPrompt = t('views.application.prompt.defaultPrompt', { @@ -179,7 +180,7 @@ const submitHandle = async (formEl: FormInstance | undefined) => { } else { router.push({ path: `/application/${res.data.id}/${res.data.type}/setting` }) } - + emit('refresh') dialogVisible.value = false }) } diff --git a/ui/src/views/application/component/ParamSettingDialog.vue b/ui/src/views/application/component/ParamSettingDialog.vue index 1153bfeaa..9b81a9858 100644 --- a/ui/src/views/application/component/ParamSettingDialog.vue +++ b/ui/src/views/application/component/ParamSettingDialog.vue @@ -74,6 +74,7 @@ :max="form.search_mode === 'blend' ? 2 : 1" :precision="3" :step="0.1" + :value-on-clear="0" controls-position="right" class="w-full" /> @@ -87,6 +88,7 @@ v-model="form.top_n" :min="1" :max="100" + :value-on-clear="1" controls-position="right" class="w-full" /> diff --git a/ui/src/views/document/component/ImportDocumentDialog.vue b/ui/src/views/document/component/ImportDocumentDialog.vue index f230041eb..03662cbdf 100644 --- a/ui/src/views/document/component/ImportDocumentDialog.vue +++ b/ui/src/views/document/component/ImportDocumentDialog.vue @@ -65,6 +65,7 @@ :max="1" :precision="3" :step="0.1" + :value-on-clear="0" controls-position="right" size="small" class="ml-4 mr-4" diff --git a/ui/src/views/hit-test/index.vue b/ui/src/views/hit-test/index.vue index cf91a4c74..4d15793b4 100644 --- a/ui/src/views/hit-test/index.vue +++ b/ui/src/views/hit-test/index.vue @@ -37,7 +37,7 @@ shadow="hover" :title="item.title || '-'" :description="item.content" - class="document-card layout-bg layout-bg cursor " + class="document-card layout-bg layout-bg cursor" :class="item.is_active ? '' : 'disabled'" :showIcon="false" @click="editParagraph(item)" @@ -133,6 +133,7 @@ :max="cloneForm.search_mode === 'blend' ? 2 : 1" :precision="3" :step="0.1" + :value-on-clear="0" controls-position="right" class="w-full" /> diff --git a/ui/src/views/log/index.vue b/ui/src/views/log/index.vue index 51a82b4fb..468d1c4cd 100644 --- a/ui/src/views/log/index.vue +++ b/ui/src/views/log/index.vue @@ -56,6 +56,7 @@ v-model="filter.min_star" :min="0" :step="1" + :value-on-clear="0" controls-position="right" style="width: 100px" size="small" @@ -70,6 +71,7 @@ v-model="filter.min_trample" :min="0" :step="1" + :value-on-clear="0" controls-position="right" style="width: 100px" size="small" diff --git a/ui/src/workflow/nodes/ai-chat-node/index.vue b/ui/src/workflow/nodes/ai-chat-node/index.vue index ff90d4b20..5634fb229 100644 --- a/ui/src/workflow/nodes/ai-chat-node/index.vue +++ b/ui/src/workflow/nodes/ai-chat-node/index.vue @@ -169,7 +169,28 @@ const { } = app.config.globalProperties.$route as any // @ts-ignore -const defaultPrompt = ` +const defaultPrompt = `已知信息: + +{{知识库检索.data}} + +回答要求: + +- 请使用简洁且专业的语言来回答用户的问题。 + +- 如果你不知道答案,请回答“没有在知识库中查找到相关信息,建议咨询相关技术支持或参考官方文档进行操作”。 + +- 避免提及你是从已知信息中获得的知识。 + +- 请保证答案与已知信息中描述的一致。 + +- 请使用 Markdown 语法优化答案的格式。 + +- 已知信息中的图片、链接地址和脚本语言请直接返回。 + +- 请使用与问题相同的语言来回答。 + +问题: + {{开始.question}}` const form = { model_id: '',