chore: vision model message order

This commit is contained in:
Hk-Gosuto 2024-04-24 11:56:01 +08:00
parent f2b13848eb
commit 7c6a138e1f

View File

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