From 26c6ad2c50e8a732dcaa2e32d757cb0221cdb31a Mon Sep 17 00:00:00 2001 From: brianling Date: Sat, 18 Jul 2026 18:23:13 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=20gpt-4o=20=E6=A8=A1=E5=9E=8B=EF=BC=8C=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E5=AD=97=E6=AE=B5=E6=94=B9=E4=B8=BA=E6=89=8B=E5=8A=A8?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E5=B9=B6=E5=88=97=E5=87=BA=E5=8F=AF=E9=80=89?= =?UTF-8?q?=E8=A7=86=E8=A7=89=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- electron/main/ipc.ts | 4 ++-- src/components/SettingDialog.vue | 23 +++++++++++++++++++---- src/stores/settings.ts | 2 +- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 202450a..2175c16 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ npm run dist 支持兼容 OpenAI Chat Completions 格式的任意多模态模型: - 默认接口:`https://api.siliconflow.cn/v1/chat/completions` -- 默认模型:`gpt-4o` +- 默认模型:用户手动配置 - 返回格式:结构化 JSON(评分、置信度、扣分明细、评语) --- diff --git a/electron/main/ipc.ts b/electron/main/ipc.ts index 019e1df..870d910 100644 --- a/electron/main/ipc.ts +++ b/electron/main/ipc.ts @@ -13,7 +13,7 @@ function getStore() { defaults: { apiKey: '', baseUrl: 'https://api.siliconflow.cn/v1', - model: 'gpt-4o', + model: '', shortcut: 'Alt+Q', theme: 'light', fontSize: 14, @@ -167,7 +167,7 @@ export function setupIpc(win: BrowserWindow): void { const apiMsg = res?.error?.message || res?.error || res?.message || '' const allMsg = (apiMsg + ' ' + (err.message || '')).toLowerCase() if (allMsg.includes('does not support image') || allMsg.includes('image input') || allMsg.includes('not support image')) { - throw new Error('当前模型不支持图片输入,请在设置中更换为支持多模态的模型(如 gpt-4o、qwen-vl 等)') + throw new Error('当前模型不支持图片输入,请在设置中更换为支持多模态的视觉模型') } throw new Error(apiMsg || err.message || 'AI grading failed') } diff --git a/src/components/SettingDialog.vue b/src/components/SettingDialog.vue index 23b685d..1c83f6d 100644 --- a/src/components/SettingDialog.vue +++ b/src/components/SettingDialog.vue @@ -10,10 +10,16 @@ - - - - + +
+ {{ m }} +
@@ -60,6 +66,15 @@ import { ElMessage } from 'element-plus' import { useAppStore } from '@/stores/app' import { useSettingsStore } from '@/stores/settings' +const visionModels = [ + 'Qwen/Qwen2.5-32B-Instruct', + 'Qwen/Qwen3.6-35B-A3B', + 'gpt-4o', + 'claude-3-5-sonnet-20241022', + 'gemini-2.0-flash-exp', + 'deepseek-vl2' +] + const appStore = useAppStore() const settingsStore = useSettingsStore() diff --git a/src/stores/settings.ts b/src/stores/settings.ts index 45b24c6..0573cc8 100644 --- a/src/stores/settings.ts +++ b/src/stores/settings.ts @@ -6,7 +6,7 @@ export const useSettingsStore = defineStore('settings', () => { const settings = ref({ apiKey: '', baseUrl: 'https://api.siliconflow.cn/v1', - model: 'gpt-4o', + model: '', shortcut: 'Alt+Q', theme: 'light', fontSize: 14,