From c197962851be820469bf2e8624f9b6edd37b13e1 Mon Sep 17 00:00:00 2001 From: fengzai6 Date: Tue, 27 Feb 2024 15:02:58 +0800 Subject: [PATCH] fix: No history message attached when for gemini-pro-vision --- app/components/chat.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 9144f9a5f45..32431c69347 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -459,6 +459,10 @@ export function ChatActions(props: { if (!show) { props.setAttachImages([]); props.setUploading(false); + } else { + // 为visionModel时不附带历史消息 + const newModelConfig = chatStore.currentSession().mask.modelConfig; + newModelConfig.historyMessageCount = 0; } // if current model is not available