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

This commit is contained in:
fengzai6 2024-02-27 15:02:58 +08:00
parent 44a51273be
commit c197962851
1 changed files with 4 additions and 0 deletions

View File

@ -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