refactor: 移除默认 gpt-4o 模型,模型字段改为手动输入并列出可选视觉模型

This commit is contained in:
2026-07-18 18:23:13 +08:00
parent 8f7276ca1d
commit 26c6ad2c50
4 changed files with 23 additions and 8 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ npm run dist
支持兼容 OpenAI Chat Completions 格式的任意多模态模型: 支持兼容 OpenAI Chat Completions 格式的任意多模态模型:
- 默认接口:`https://api.siliconflow.cn/v1/chat/completions` - 默认接口:`https://api.siliconflow.cn/v1/chat/completions`
- 默认模型:`gpt-4o` - 默认模型:用户手动配置
- 返回格式:结构化 JSON(评分、置信度、扣分明细、评语) - 返回格式:结构化 JSON(评分、置信度、扣分明细、评语)
--- ---
+2 -2
View File
@@ -13,7 +13,7 @@ function getStore() {
defaults: { defaults: {
apiKey: '', apiKey: '',
baseUrl: 'https://api.siliconflow.cn/v1', baseUrl: 'https://api.siliconflow.cn/v1',
model: 'gpt-4o', model: '',
shortcut: 'Alt+Q', shortcut: 'Alt+Q',
theme: 'light', theme: 'light',
fontSize: 14, fontSize: 14,
@@ -167,7 +167,7 @@ export function setupIpc(win: BrowserWindow): void {
const apiMsg = res?.error?.message || res?.error || res?.message || '' const apiMsg = res?.error?.message || res?.error || res?.message || ''
const allMsg = (apiMsg + ' ' + (err.message || '')).toLowerCase() const allMsg = (apiMsg + ' ' + (err.message || '')).toLowerCase()
if (allMsg.includes('does not support image') || allMsg.includes('image input') || allMsg.includes('not support image')) { 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') throw new Error(apiMsg || err.message || 'AI grading failed')
} }
+19 -4
View File
@@ -10,10 +10,16 @@
</el-form-item> </el-form-item>
<el-form-item label="模型"> <el-form-item label="模型">
<el-select v-model="form.model" style="width: 100%"> <el-input v-model="form.model" placeholder="手动输入模型名称" />
<el-option label="Qwen/Qwen3.6-35B-A3B" value="Qwen/Qwen3.6-35B-A3B" /> <div style="margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px;">
<el-option label="Qwen/Qwen2.5-32B-Instruct" value="Qwen/Qwen2.5-32B-Instruct" /> <el-tag
</el-select> v-for="m in visionModels"
:key="m"
size="small"
style="cursor:pointer"
@click="form.model = m"
>{{ m }}</el-tag>
</div>
</el-form-item> </el-form-item>
<el-form-item label="快捷键"> <el-form-item label="快捷键">
@@ -60,6 +66,15 @@ import { ElMessage } from 'element-plus'
import { useAppStore } from '@/stores/app' import { useAppStore } from '@/stores/app'
import { useSettingsStore } from '@/stores/settings' 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 appStore = useAppStore()
const settingsStore = useSettingsStore() const settingsStore = useSettingsStore()
+1 -1
View File
@@ -6,7 +6,7 @@ export const useSettingsStore = defineStore('settings', () => {
const settings = ref<AppSettings>({ const settings = ref<AppSettings>({
apiKey: '', apiKey: '',
baseUrl: 'https://api.siliconflow.cn/v1', baseUrl: 'https://api.siliconflow.cn/v1',
model: 'gpt-4o', model: '',
shortcut: 'Alt+Q', shortcut: 'Alt+Q',
theme: 'light', theme: 'light',
fontSize: 14, fontSize: 14,