vision_model_only

This commit is contained in:
Snow Kawashiro 2024-02-28 20:38:00 +08:00 committed by GitHub
parent bd19e97cf8
commit e7051353eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -1102,6 +1102,8 @@ function _Chat() {
}, []);
const handlePaste = useCallback(
const currentModel = chatStore.currentSession().mask.modelConfig.model;
if(!isVisionModel(currentModel)){return;}
async (event: React.ClipboardEvent<HTMLTextAreaElement>) => {
const items = (event.clipboardData || window.clipboardData).items;
for (const item of items) {
@ -1137,7 +1139,7 @@ function _Chat() {
}
}
},
[attachImages],
[attachImages, chatStore],
);
async function uploadImage() {