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