chore: vision model message order

This commit is contained in:
Hk-Gosuto 2024-04-24 11:56:01 +08:00
parent f2b13848eb
commit 7c6a138e1f
1 changed files with 6 additions and 7 deletions

View File

@ -325,7 +325,12 @@ export const useChatStore = createPersistStore(
let mContent: string | MultimodalContent[] = userContent; let mContent: string | MultimodalContent[] = userContent;
if (attachImages && attachImages.length > 0) { if (attachImages && attachImages.length > 0) {
mContent = []; mContent = [
{
type: "text",
text: userContent,
},
];
mContent = mContent.concat( mContent = mContent.concat(
attachImages.map((url) => { attachImages.map((url) => {
return { return {
@ -336,12 +341,6 @@ export const useChatStore = createPersistStore(
}; };
}), }),
); );
mContent = mContent.concat([
{
type: "text",
text: userContent,
},
]);
} }
let userMessage: ChatMessage = createMessage({ let userMessage: ChatMessage = createMessage({
role: "user", role: "user",