瀏覽代碼

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

fengzai6 1 年之前
父節點
當前提交
c197962851
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      app/components/chat.tsx

+ 4 - 0
app/components/chat.tsx

@@ -459,6 +459,10 @@ export function ChatActions(props: {
     if (!show) {
     if (!show) {
       props.setAttachImages([]);
       props.setAttachImages([]);
       props.setUploading(false);
       props.setUploading(false);
+    } else {
+      // 为visionModel时不附带历史消息
+      const newModelConfig = chatStore.currentSession().mask.modelConfig;
+      newModelConfig.historyMessageCount = 0;
     }
     }
 
 
     // if current model is not available
     // if current model is not available