From 9b66fed26efc507ce0e9bc13c225f15cfff8dcce 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 5c97070..39df1dc 100644 --- a/src/views/chat/index.vue +++ b/src/views/chat/index.vue @@ -233,7 +233,7 @@ async function onRegenerate(index: number) { error: false, loading: true, conversationOptions: null, - requestOptions: { prompt: message, ...options }, + requestOptions: { prompt: message, options: { ...options } }, }, ) @@ -264,7 +264,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 } }, }, ) @@ -308,7 +308,7 @@ async function onRegenerate(index: number) { error: true, loading: false, conversationOptions: null, - requestOptions: { prompt: message, ...options }, + requestOptions: { prompt: message, options: { ...options } }, }, ) }