361
361
v-model:open =" functionCallingModalVisible"
362
362
:title =" t('FUNCTION_VERIFICATION_MODAL_TITLE')"
363
363
@ok =" handleFunctionCallingOk"
364
- @cancel =" () => { functionCallingModalVisible.value = false; } "
364
+ @cancel =" handleFunctionCallingCancel "
365
365
:destroyOnClose =" true"
366
366
>
367
367
<a-form :model =" { a: functionCallingA, b: functionCallingB }" layout =" horizontal" >
368
368
<a-row :gutter =" 16" >
369
369
<a-col :span =" 12" >
370
- <a-form-item :label =" t('VALUE_A')" label-col =" { span: 6 }" wrapper-col =" { span: 18 }" >
370
+ <a-form-item :label =" t('VALUE_A')" : label-col =" { span: 6 }" : wrapper-col =" { span: 18 }" >
371
371
<a-input-number v-model:value =" functionCallingA" style =" width : 100% ;" />
372
372
</a-form-item >
373
373
</a-col >
374
374
<a-col :span =" 12" >
375
- <a-form-item :label =" t('VALUE_B')" label-col =" { span: 6 }" wrapper-col =" { span: 18 }" >
375
+ <a-form-item :label =" t('VALUE_B')" : label-col =" { span: 6 }" : wrapper-col =" { span: 18 }" >
376
376
<a-input-number v-model:value =" functionCallingB" style =" width : 100% ;" />
377
377
</a-form-item >
378
378
</a-col >
379
379
</a-row >
380
380
</a-form >
381
381
</a-modal >
382
382
383
-
384
383
<a-modal
385
384
v-model:open =" showAppSettingsModal"
386
385
:title =" t('SETTINGS_PANEL')"
563
562
<a-row :gutter =" 16" >
564
563
<!-- 左侧:作者信息 -->
565
564
<a-col :xs =" 12" :sm =" 12" >
566
- <h3 style =" font-size : 18 px ; margin-bottom : 8px ;" >{{ t('AUTHORS') }}</h3 >
565
+ <h3 style =" font-size : 16 px ; margin-bottom : 8px ;" >{{ t('AUTHORS') }}</h3 >
567
566
<p style =" margin : 4px 0 ; font-size : 14px ;" >
568
567
<a :href =" appInfo.author.url" target =" _blank" style =" color : #1890ff ;" >
569
568
{{ appInfo.author.name }}
577
576
</a-col >
578
577
<!-- 右侧:赞助商信息 -->
579
578
<a-col :xs =" 12" :sm =" 12" >
580
- <h3 style =" font-size : 18 px ; margin-bottom : 8px ;" >{{ t('SPONSORS') }}</h3 >
579
+ <h3 style =" font-size : 16 px ; margin-bottom : 8px ;" >{{ t('SPONSORS') }}</h3 >
581
580
<ul style =" list-style-type : none ; padding : 0 ;" >
582
581
<li v-for =" (sponsor, index) in appInfo.sponsors" :key =" index" style =" margin-bottom : 4px ;" >
583
582
<a :href =" sponsor.url" target =" _blank" style =" color : #1890ff ;" >
590
589
</a-row >
591
590
<a-divider style =" margin : 16px 0 ;" ></a-divider >
592
591
<div v-if =" appInfo.contributors && appInfo.contributors.length" >
593
- <h3 style =" font-size : 18 px ; margin : 16px 0 8px 0 ;" >{{ t('CONTRIBUTORS') }}</h3 >
592
+ <h3 style =" font-size : 14 px ; margin : 16px 0 8px 0 ;" >{{ t('CONTRIBUTORS') }}</h3 >
594
593
<div style =" display : flex ; flex-wrap : wrap ;" >
595
594
<div
596
595
v-for =" (contributor, index) in appInfo.contributors"
@@ -731,7 +730,8 @@ import ModelVerifier from '../utils/verify.js';
731
730
import {toggleTheme } from ' ../utils/theme.js' ;
732
731
import {createSVGDataURL } from ' ../utils/svg.js' ;
733
732
import {appInfo } from ' ../utils/info.js' ;
734
- import {cantFunctionModelList , cantTemperatureModelList , cantOfficialModelList } from ' ../utils/models.js'
733
+ import {cantFunctionModelList , cantTemperatureModelList , cantOfficialModelList } from " ../utils/models.js" ;
734
+
735
735
// 注册必须的组件
736
736
echarts .use ([
737
737
TitleComponent,
@@ -857,7 +857,6 @@ const setLanguage = (language) => {
857
857
const FUNCTION_VERIFICATION = computed (() => t (' FUNCTION_VERIFICATION' ));
858
858
const TEMPERATURE_VERIFICATION = computed (() => t (' TEMPERATURE_VERIFICATION' ));
859
859
const OFFICIAL_VERIFICATION = computed (() => t (' OFFICIAL_VERIFICATION' ));
860
- const OFFICIAL_VERIFICATION_PENDING = computed (() => t (' OFFICIAL_VERIFICATION_PENDING' ));
861
860
862
861
const buttonColors = {
863
862
functionVerification: ' #1890ff' , // 蓝色
@@ -866,6 +865,10 @@ const buttonColors = {
866
865
officialVerificationPending: ' #95de64' ,
867
866
};
868
867
868
+ function handleFunctionCallingCancel () {
869
+ functionCallingModalVisible .value = false ;
870
+ }
871
+
869
872
// 页面加载时初始化主题和语言
870
873
onMounted (() => {
871
874
const setVh = () => {
@@ -1222,7 +1225,35 @@ function computeTableData() {
1222
1225
1223
1226
// 处理 valid 模型
1224
1227
results .valid .forEach ((item , index ) => {
1225
- const buttons = pushButtons ();
1228
+ const buttons = [];
1229
+ if (! cantFunctionModelList .includes (item .model )) {
1230
+ buttons .push ({
1231
+ label: FUNCTION_VERIFICATION .value ,
1232
+ type: ' default' ,
1233
+ key: ' functionVerification' ,
1234
+ onClick : () => verifyFunctionCalling (item .model ),
1235
+ });
1236
+ }
1237
+ if (! cantTemperatureModelList .includes (item .model )) {
1238
+ if (isGpt (item .model ) || isClaude (item .model )) {
1239
+ buttons .push ({
1240
+ label: TEMPERATURE_VERIFICATION .value ,
1241
+ type: ' default' ,
1242
+ key: ' temperatureVerification' ,
1243
+ onClick : () => verifyTemperature (item .model ),
1244
+ });
1245
+ }
1246
+ }
1247
+ if (! cantOfficialModelList .includes (item .model )) {
1248
+ if (isGpt (item .model )) {
1249
+ buttons .push ({
1250
+ label: OFFICIAL_VERIFICATION .value ,
1251
+ type: ' default' ,
1252
+ key: ' officialVerification' ,
1253
+ onClick : () => verifyOfficial (item .model ),
1254
+ });
1255
+ }
1256
+ }
1226
1257
// 针对 o1- 模型的特殊处理
1227
1258
let remark = ' ' ;
1228
1259
let fullRemark = ' ' ;
@@ -1249,7 +1280,36 @@ function computeTableData() {
1249
1280
1250
1281
// 处理 inconsistent 模型
1251
1282
results .inconsistent .forEach ((item , index ) => {
1252
- const buttons = pushButtons ();
1283
+ const buttons = [];
1284
+ if (! cantFunctionModelList .includes (item .model )) {
1285
+ buttons .push ({
1286
+ label: FUNCTION_VERIFICATION .value ,
1287
+ type: ' default' ,
1288
+ key: ' functionVerification' ,
1289
+ onClick : () => verifyFunctionCalling (item .model ),
1290
+ });
1291
+ }
1292
+ if (! cantTemperatureModelList .includes (item .model )) {
1293
+ if (isGpt (item .model ) || isClaude (item .model )) {
1294
+ buttons .push ({
1295
+ label: TEMPERATURE_VERIFICATION .value ,
1296
+ type: ' default' ,
1297
+ key: ' temperatureVerification' ,
1298
+ onClick : () => verifyTemperature (item .model ),
1299
+ });
1300
+ }
1301
+ }
1302
+ if (! cantOfficialModelList .includes (item .model )) {
1303
+ if (isGpt (item .model )) {
1304
+ buttons .push ({
1305
+ label: OFFICIAL_VERIFICATION .value ,
1306
+ type: ' default' ,
1307
+ key: ' officialVerification' ,
1308
+ onClick : () => verifyOfficial (item .model ),
1309
+ });
1310
+ }
1311
+ }
1312
+
1253
1313
// 根据返回的模型名称,判断是模型映射还是未匹配
1254
1314
let status;
1255
1315
let remark;
@@ -1306,39 +1366,6 @@ function computeTableData() {
1306
1366
return data;
1307
1367
}
1308
1368
1309
- function pushButtons (item ) {
1310
- const buttons = [];
1311
- if (! cantFunctionModelList .includes (item .model )) {
1312
- buttons .push ({
1313
- label: FUNCTION_VERIFICATION .value ,
1314
- type: ' default' ,
1315
- key: ' functionVerification' ,
1316
- onClick : () => verifyFunctionCalling (item .model ),
1317
- });
1318
- }
1319
- if (! cantTemperatureModelList .includes (item .model )) {
1320
- if (isGpt (item .model ) || isClaude (item .model )) {
1321
- buttons .push ({
1322
- label: TEMPERATURE_VERIFICATION .value ,
1323
- type: ' default' ,
1324
- key: ' temperatureVerification' ,
1325
- onClick : () => verifyTemperature (item .model ),
1326
- });
1327
- }
1328
- }
1329
- if (! cantOfficialModelList .includes (item .model )) {
1330
- if (isGpt (item .model ) && ! isClaude (item .model )) {
1331
- buttons .push ({
1332
- label: OFFICIAL_VERIFICATION .value ,
1333
- type: ' default' ,
1334
- key: ' officialVerification' ,
1335
- onClick : () => verifyOfficial (item .model ),
1336
- });
1337
- }
1338
- }
1339
- return buttons;
1340
- }
1341
-
1342
1369
function showSummary (results ) {
1343
1370
const summaryData = calculateSummaryData (results);
1344
1371
const {summaryHtml , radarChartOption } = summaryData;
@@ -1523,7 +1550,7 @@ function showOfficialVerificationResult(result) {
1523
1550
// 准备数据
1524
1551
const dataSource = result .texts .map ((text , index ) => ({
1525
1552
key: index,
1526
- testNumber: ` 测试 ${ index + 1 } ` ,
1553
+ testNumber: ` 测试${ index + 1 } ` ,
1527
1554
text,
1528
1555
fingerprint: result .fingerprints [index],
1529
1556
}));
@@ -1534,7 +1561,7 @@ function showOfficialVerificationResult(result) {
1534
1561
title: ' 测试' ,
1535
1562
dataIndex: ' testNumber' ,
1536
1563
key: ' testNumber' ,
1537
- width: ' 20 %' , // 增大“测试”列的宽度
1564
+ width: ' 25 %' ,
1538
1565
},
1539
1566
{
1540
1567
title: ' 文本' ,
@@ -1546,7 +1573,7 @@ function showOfficialVerificationResult(result) {
1546
1573
title: ' 系统指纹' ,
1547
1574
dataIndex: ' fingerprint' ,
1548
1575
key: ' fingerprint' ,
1549
- width: ' 30 %' , // 缩小“系统指纹”列的宽度
1576
+ width: ' 25 %' ,
1550
1577
},
1551
1578
];
1552
1579
@@ -1557,23 +1584,23 @@ function showOfficialVerificationResult(result) {
1557
1584
1558
1585
Modal .info ({
1559
1586
title: t (' OFFICIAL_VERIFICATION_RESULT' ),
1560
- content: h (' div' , {}, [
1561
- h (' p' , {style: ' font-weight: bold;' }, ` 模型: ${ result .model } ` ),
1587
+ content : () => h (' div' , {}, [
1588
+ h (' p' , {style: ' font-weight: bold;' }, ` ${ t ( ' MODEL ' ) } : ${ result .model } ` ),
1562
1589
h (' p' , {}, result .conclusion ),
1563
1590
h (
1564
1591
aTable,
1565
1592
{
1566
1593
dataSource,
1567
1594
columns,
1568
1595
pagination: false ,
1569
- style: ' margin-top: 16px ;' ,
1596
+ style: ' margin-top: 12px ;' ,
1570
1597
},
1571
1598
{}
1572
1599
),
1573
- h (' p' , {style: ' margin-top: 16px;' }, ' 相似度结果 :' ),
1600
+ h (' p' , {style: ' margin-top: 16px;' }, t ( ' SIMILARITY_RESULTS ' ) + ' :' ),
1574
1601
h (
1575
1602
' pre' ,
1576
- {style: ' white-space: pre-wrap; font-size: 14px ;' },
1603
+ {style: ' white-space: pre-wrap; font-size: 12px ;' },
1577
1604
similarityText
1578
1605
),
1579
1606
]),
@@ -1582,7 +1609,6 @@ function showOfficialVerificationResult(result) {
1582
1609
});
1583
1610
}
1584
1611
1585
-
1586
1612
// 修改 verifyFunctionCalling 函数
1587
1613
async function verifyFunctionCalling (model ) {
1588
1614
selectedModelForFunctionCalling .value = model;
@@ -1626,8 +1652,7 @@ async function performFunctionCallingVerification(model, a, b) {
1626
1652
function showFunctionCallingResult (result ) {
1627
1653
Modal .info ({
1628
1654
title: t (' FUNCTION_VERIFICATION_RESULT' ),
1629
- content: h (' div' , {}, [
1630
- h (' h3' , {}, t (' FUNCTION_VERIFICATION_RESULT' )),
1655
+ content : () => h (' div' , {}, [
1631
1656
h (' p' , {style: ' font-weight: bold;' }, ` ${ t (' MODEL' )} : ${ result .model } ` ),
1632
1657
h (' div' , {style: ' display: flex; justify-content: space-between;' }, [
1633
1658
h (' div' , {style: ' width: 48%;' }, [
0 commit comments