From c5221e16243bfb368d0a37c5e62956e60f43ecfc Mon Sep 17 00:00:00 2001 From: caoxiaozhu Date: Sat, 11 Jul 2026 14:49:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8E=A8=E7=90=86=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E7=94=9F=E6=88=90=E5=8F=82=E6=95=B0=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 设置面板新增 Temperature、Top P、Max Tokens 滑块,参数随对话请求实时下发,替换原先硬编码默认值。 --- .../src/views/inference/InferenceChatView.vue | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/inference/InferenceChatView.vue b/frontend/src/views/inference/InferenceChatView.vue index 1be69a5..679a0ce 100644 --- a/frontend/src/views/inference/InferenceChatView.vue +++ b/frontend/src/views/inference/InferenceChatView.vue @@ -30,6 +30,9 @@ const task = ref(null) const messages = ref([]) const inputQuestion = ref('') const systemPrompt = ref('') +const temperature = ref(0.7) +const top_p = ref(0.95) +const maxTokens = ref(2048) const contentRef = ref() /** 设置面板抽屉 */ const showSettings = ref(false) @@ -104,8 +107,9 @@ async function handleSend() { model_path: '', system_prompt: systemPrompt.value, user_question: question, - temperature: 0.7, - max_tokens: 2048, + temperature: temperature.value, + top_p: top_p.value, + max_tokens: maxTokens.value, }) // 完成后同步最终内容 @@ -288,8 +292,21 @@ onMounted(loadTask) resize="none" /> + + + + + + + + + + + + + - + 清空当前对话