Forráskód Böngészése

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

fengzai6 1 éve
szülő
commit
c197962851
1 módosított fájl, 4 hozzáadás és 0 törlés
  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