From 7dfa3f6f6d3283db3fdae58d83c0ed5198d2c270 Mon Sep 17 00:00:00 2001 From: LeafSummer Date: Tue, 4 Apr 2023 07:53:37 +0800 Subject: [PATCH] fix: requestOptions (#1188) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复页面上重复执行onRegenerate操作,会丢失上下文的问题 --- src/views/chat/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/chat/index.vue b/src/views/chat/index.vue index e6e7a51eae..880ec99820 100644 --- a/src/views/chat/index.vue +++ b/src/views/chat/index.vue @@ -236,7 +236,7 @@ async function onRegenerate(index: number) { error: false, loading: true, conversationOptions: null, - requestOptions: { prompt: message, ...options }, + requestOptions: { prompt: message, options: { ...options } }, }, ) @@ -270,7 +270,7 @@ async function onRegenerate(index: number) { error: false, loading: true, conversationOptions: { conversationId: data.conversationId, parentMessageId: data.id }, - requestOptions: { prompt: message, ...options }, + requestOptions: { prompt: message, options: { ...options } }, }, ) @@ -314,7 +314,7 @@ async function onRegenerate(index: number) { error: true, loading: false, conversationOptions: null, - requestOptions: { prompt: message, ...options }, + requestOptions: { prompt: message, options: { ...options } }, }, ) }