Browse Source

fix: No history message attached when for gemini-pro-vision

fengzai6 2 năm trước cách đây
mục cha
commit
c197962851
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      app/components/chat.tsx

+ 4 - 0
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