From e7051353eb8aff0e89a5e0a5da13cfcc5bcb4b6f Mon Sep 17 00:00:00 2001 From: Snow Kawashiro Date: Wed, 28 Feb 2024 20:38:00 +0800 Subject: [PATCH] vision_model_only --- app/components/chat.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 22acb8e4f..d730a4a10 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -1102,6 +1102,8 @@ function _Chat() { }, []); const handlePaste = useCallback( + const currentModel = chatStore.currentSession().mask.modelConfig.model; + if(!isVisionModel(currentModel)){return;} async (event: React.ClipboardEvent) => { const items = (event.clipboardData || window.clipboardData).items; for (const item of items) { @@ -1137,7 +1139,7 @@ function _Chat() { } } }, - [attachImages], + [attachImages, chatStore], ); async function uploadImage() {