From ac75d03a65a559101fa7516473ef4bcc442ac357 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Mon, 26 Feb 2024 11:46:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BA=94=E7=94=A8=E5=88=9B=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