فهرست منبع

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) {
       props.setAttachImages([]);
       props.setUploading(false);
+    } else {
+      // 为visionModel时不附带历史消息
+      const newModelConfig = chatStore.currentSession().mask.modelConfig;
+      newModelConfig.historyMessageCount = 0;
     }
 
     // if current model is not available