From ac75d03a65a559101fa7516473ef4bcc442ac357 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Mon, 26 Feb 2024 11:46:11 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20=E5=BA=94=E7=94=A8=E5=88=9B?= =?UTF-8?q?=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/views/application/CreateAndSetting.vue | 64 ++++++++----------- 1 file changed, 26 insertions(+), 38 deletions(-) diff --git a/ui/src/views/application/CreateAndSetting.vue b/ui/src/views/application/CreateAndSetting.vue index d1acfe29f..b8cf115d8 100644 --- a/ui/src/views/application/CreateAndSetting.vue +++ b/ui/src/views/application/CreateAndSetting.vue @@ -44,14 +44,31 @@ show-word-limit /> - + + + + - - - -

通过调整提示词内容,可以引导大模型聊天方向,该提示词会被固定在上下文的开头。

-

可以使用变量:{data} 是携带知识库中已知信息;{question}是用户提出的问题。

-
- - -
+ ({ max_paragraph_char_number: 5000 }, model_setting: { - prompt: defaultPrompt + prompt: '' }, problem_optimization: false }) @@ -390,14 +389,12 @@ const rules = reactive>({ message: '请选择模型', trigger: 'change' } - ] + ], + 'model_setting.prompt': [{ required: true, message: '请输入提示词', trigger: 'blur' }] }) const modelOptions = ref(null) const providerOptions = ref>([]) const datasetList = ref([]) -const dialogFormVisible = ref(false) - -const model_setting_prompt = ref('') const dataset_setting = ref({}) function datasetSettingChange(val: string) { @@ -410,15 +407,6 @@ function datasetSettingChange(val: string) { } } -function promptChange(val: string) { - if (val === 'open') { - dialogFormVisible.value = true - model_setting_prompt.value = applicationForm.value.model_setting.prompt - } else if (val === 'close') { - dialogFormVisible.value = false - applicationForm.value.model_setting.prompt = model_setting_prompt.value - } -} const submit = async (formEl: FormInstance | undefined) => { if (!formEl) return From 6061358efed5126c1825f2b9b22d7ccdcb7ce72c Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Mon, 26 Feb 2024 14:02:24 +0800 Subject: [PATCH 2/4] feat: --- ui/src/views/dataset/DatasetSetting.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/src/views/dataset/DatasetSetting.vue b/ui/src/views/dataset/DatasetSetting.vue index 535fbd75b..3801c54cf 100644 --- a/ui/src/views/dataset/DatasetSetting.vue +++ b/ui/src/views/dataset/DatasetSetting.vue @@ -117,6 +117,7 @@ async function submit() { const obj = detail.value.type === '1' ? { + application_id_list: application_id_list.value, ...BaseFormRef.value.form, ...form.value } From 866d15728f1fb95934e023537ff3696dd481d252 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Mon, 26 Feb 2024 15:34:21 +0800 Subject: [PATCH 3/4] =?UTF-8?q?feat:=20=E6=A0=B7=E5=BC=8F=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/components/common-list/index.vue | 1 + ui/src/components/icons/index.ts | 81 ++++++++++++++++++- ui/src/styles/app.scss | 5 ++ ui/src/styles/element-plus.scss | 9 ++- ui/src/views/application/CreateAndSetting.vue | 41 ++++------ ui/src/views/dataset/step/StepSecond.vue | 6 +- ui/src/views/hit-test/index.vue | 56 ++++++------- ui/src/views/log/index.vue | 3 +- ui/src/views/template/index.vue | 2 +- 9 files changed, 140 insertions(+), 64 deletions(-) diff --git a/ui/src/components/common-list/index.vue b/ui/src/components/common-list/index.vue index 01b44acdc..fd7979b32 100644 --- a/ui/src/components/common-list/index.vue +++ b/ui/src/components/common-list/index.vue @@ -18,6 +18,7 @@