From 7c6a138e1f8c146b7a8495fca20aaaca73a3d117 Mon Sep 17 00:00:00 2001 From: Hk-Gosuto Date: Wed, 24 Apr 2024 11:56:01 +0800 Subject: [PATCH] chore: vision model message order --- app/store/chat.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/app/store/chat.ts b/app/store/chat.ts index 69fffe0d5..77c16df3a 100644 --- a/app/store/chat.ts +++ b/app/store/chat.ts @@ -325,7 +325,12 @@ export const useChatStore = createPersistStore( let mContent: string | MultimodalContent[] = userContent; if (attachImages && attachImages.length > 0) { - mContent = []; + mContent = [ + { + type: "text", + text: userContent, + }, + ]; mContent = mContent.concat( attachImages.map((url) => { return { @@ -336,12 +341,6 @@ export const useChatStore = createPersistStore( }; }), ); - mContent = mContent.concat([ - { - type: "text", - text: userContent, - }, - ]); } let userMessage: ChatMessage = createMessage({ role: "user",