feat: Gemini

This commit is contained in:
fit2cloud-chenyw
2025-08-05 14:48:57 +08:00
parent 5654c732ce
commit 7df8d49d48
5 changed files with 64 additions and 9 deletions
+42 -1
View File
@@ -3,6 +3,7 @@ import icon_bdyzn_colorful from '@/assets/model/icon_bdyzn_colorful.png'
import icon_deepseek_colorful from '@/assets/model/icon_deepseek_colorful.png'
import icon_txy_colorful from '@/assets/model/icon_txy_colorful.png'
import icon_xfhx_colorful from '@/assets/model/icon_xfhx_colorful.png'
import icon_gemini_colorful from '@/assets/model/icon_gemini_colorful.png'
type ModelArg = { key: string; val?: string | number; type: string; range?: string }
type ModelOption = { name: string; api_domain?: string; args?: ModelArg[] }
@@ -24,7 +25,29 @@ export const supplierList: Array<{
model_config: {
0: {
api_domain: 'https://dashscope.aliyuncs.com/compatible-mode/v1',
model_options: [{ name: 'qwen-plus' }],
common_args: [
{ key: 'temperature', val: 1.0, type: 'number', range: '[0, 2)' },
{ key: 'extra_body', val: '{"enable_thinking": true}', type: 'json' },
],
model_options: [
{ name: 'qwen-plus' },
{ name: 'qwen-plus-latest' },
{ name: 'qwen-max' },
{ name: 'qwen-max-latest' },
{ name: 'qwen-turbo' },
{ name: 'qwen-turbo-latest' },
{ name: 'qwq-plus' },
{ name: 'qwq-plus-latest' },
{ name: 'qwen-long' },
{ name: 'qwen-long-latest' },
{ name: 'qwen-omni-turbo' },
{ name: 'qwen-omni-turbo-realtime' },
{ name: 'qwen-omni-turbo-realtime-latest' },
{ name: 'qvq-max' },
{ name: 'qvq-max-latest' },
{ name: 'qvq-plus' },
{ name: 'qvq-plus-latest' },
],
},
},
},
@@ -114,6 +137,24 @@ export const supplierList: Array<{
},
},
},
{
id: 6,
name: 'Gemini',
icon: icon_gemini_colorful,
model_config: {
0: {
api_domain: 'https://generativelanguage.googleapis.com/v1beta/openai/',
common_args: [{ key: 'temperature', val: 1.0, type: 'number', range: '[0, 2]' }],
model_options: [
{ name: 'gemini-2.5-pro' },
{ name: 'gemini-2.5-flash' },
{ name: 'gemini-2.5-flash-lite' },
{ name: 'gemini-2.0-flash' },
{ name: 'gemini-2.0-flash-lite' },
],
},
},
},
]
export const base_model_options = (supplier_id: number, model_type?: number) => {
@@ -374,7 +374,7 @@ defineExpose({
<el-table :data="advancedSettingPagination" style="width: 100%">
<el-table-column prop="key" :label="t('model.parameters')" width="280" />
<el-table-column prop="name" :label="t('model.display_name')" width="280" />
<el-table-column prop="val" :label="t('model.parameter_value')" />
<el-table-column prop="val" show-overflow-tooltip :label="t('model.parameter_value')" />
<el-table-column
fixed="right"
width="80"