361361 v-model:open =" functionCallingModalVisible"
362362 :title =" t('FUNCTION_VERIFICATION_MODAL_TITLE')"
363363 @ok =" handleFunctionCallingOk"
364- @cancel =" () => { functionCallingModalVisible.value = false; } "
364+ @cancel =" handleFunctionCallingCancel "
365365 :destroyOnClose =" true"
366366 >
367367 <a-form :model =" { a: functionCallingA, b: functionCallingB }" layout =" horizontal" >
368368 <a-row :gutter =" 16" >
369369 <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 }" >
371371 <a-input-number v-model:value =" functionCallingA" style =" width : 100% ;" />
372372 </a-form-item >
373373 </a-col >
374374 <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 }" >
376376 <a-input-number v-model:value =" functionCallingB" style =" width : 100% ;" />
377377 </a-form-item >
378378 </a-col >
379379 </a-row >
380380 </a-form >
381381 </a-modal >
382382
383-
384383 <a-modal
385384 v-model:open =" showAppSettingsModal"
386385 :title =" t('SETTINGS_PANEL')"
563562 <a-row :gutter =" 16" >
564563 <!-- 左侧:作者信息 -->
565564 <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 >
567566 <p style =" margin : 4px 0 ; font-size : 14px ;" >
568567 <a :href =" appInfo.author.url" target =" _blank" style =" color : #1890ff ;" >
569568 {{ appInfo.author.name }}
577576 </a-col >
578577 <!-- 右侧:赞助商信息 -->
579578 <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 >
581580 <ul style =" list-style-type : none ; padding : 0 ;" >
582581 <li v-for =" (sponsor, index) in appInfo.sponsors" :key =" index" style =" margin-bottom : 4px ;" >
583582 <a :href =" sponsor.url" target =" _blank" style =" color : #1890ff ;" >
590589 </a-row >
591590 <a-divider style =" margin : 16px 0 ;" ></a-divider >
592591 <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 >
594593 <div style =" display : flex ; flex-wrap : wrap ;" >
595594 <div
596595 v-for =" (contributor, index) in appInfo.contributors"
@@ -731,7 +730,8 @@ import ModelVerifier from '../utils/verify.js';
731730import {toggleTheme } from ' ../utils/theme.js' ;
732731import {createSVGDataURL } from ' ../utils/svg.js' ;
733732import {appInfo } from ' ../utils/info.js' ;
734- import {cantFunctionModelList , cantTemperatureModelList , cantOfficialModelList } from ' ../utils/models.js'
733+ import {cantFunctionModelList , cantTemperatureModelList , cantOfficialModelList } from " ../utils/models.js" ;
734+
735735// 注册必须的组件
736736echarts .use ([
737737 TitleComponent,
@@ -857,7 +857,6 @@ const setLanguage = (language) => {
857857const FUNCTION_VERIFICATION = computed (() => t (' FUNCTION_VERIFICATION' ));
858858const TEMPERATURE_VERIFICATION = computed (() => t (' TEMPERATURE_VERIFICATION' ));
859859const OFFICIAL_VERIFICATION = computed (() => t (' OFFICIAL_VERIFICATION' ));
860- const OFFICIAL_VERIFICATION_PENDING = computed (() => t (' OFFICIAL_VERIFICATION_PENDING' ));
861860
862861const buttonColors = {
863862 functionVerification: ' #1890ff' , // 蓝色
@@ -866,6 +865,10 @@ const buttonColors = {
866865 officialVerificationPending: ' #95de64' ,
867866};
868867
868+ function handleFunctionCallingCancel () {
869+ functionCallingModalVisible .value = false ;
870+ }
871+
869872// 页面加载时初始化主题和语言
870873onMounted (() => {
871874 const setVh = () => {
@@ -1222,7 +1225,35 @@ function computeTableData() {
12221225
12231226 // 处理 valid 模型
12241227 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+ }
12261257 // 针对 o1- 模型的特殊处理
12271258 let remark = ' ' ;
12281259 let fullRemark = ' ' ;
@@ -1249,7 +1280,36 @@ function computeTableData() {
12491280
12501281 // 处理 inconsistent 模型
12511282 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+
12531313 // 根据返回的模型名称,判断是模型映射还是未匹配
12541314 let status;
12551315 let remark;
@@ -1306,39 +1366,6 @@ function computeTableData() {
13061366 return data;
13071367}
13081368
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-
13421369function showSummary (results ) {
13431370 const summaryData = calculateSummaryData (results);
13441371 const {summaryHtml , radarChartOption } = summaryData;
@@ -1523,7 +1550,7 @@ function showOfficialVerificationResult(result) {
15231550 // 准备数据
15241551 const dataSource = result .texts .map ((text , index ) => ({
15251552 key: index,
1526- testNumber: ` 测试 ${ index + 1 } ` ,
1553+ testNumber: ` 测试${ index + 1 } ` ,
15271554 text,
15281555 fingerprint: result .fingerprints [index],
15291556 }));
@@ -1534,7 +1561,7 @@ function showOfficialVerificationResult(result) {
15341561 title: ' 测试' ,
15351562 dataIndex: ' testNumber' ,
15361563 key: ' testNumber' ,
1537- width: ' 20 %' , // 增大“测试”列的宽度
1564+ width: ' 25 %' ,
15381565 },
15391566 {
15401567 title: ' 文本' ,
@@ -1546,7 +1573,7 @@ function showOfficialVerificationResult(result) {
15461573 title: ' 系统指纹' ,
15471574 dataIndex: ' fingerprint' ,
15481575 key: ' fingerprint' ,
1549- width: ' 30 %' , // 缩小“系统指纹”列的宽度
1576+ width: ' 25 %' ,
15501577 },
15511578 ];
15521579
@@ -1557,23 +1584,23 @@ function showOfficialVerificationResult(result) {
15571584
15581585 Modal .info ({
15591586 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 } ` ),
15621589 h (' p' , {}, result .conclusion ),
15631590 h (
15641591 aTable,
15651592 {
15661593 dataSource,
15671594 columns,
15681595 pagination: false ,
1569- style: ' margin-top: 16px ;' ,
1596+ style: ' margin-top: 12px ;' ,
15701597 },
15711598 {}
15721599 ),
1573- h (' p' , {style: ' margin-top: 16px;' }, ' 相似度结果 :' ),
1600+ h (' p' , {style: ' margin-top: 16px;' }, t ( ' SIMILARITY_RESULTS ' ) + ' :' ),
15741601 h (
15751602 ' pre' ,
1576- {style: ' white-space: pre-wrap; font-size: 14px ;' },
1603+ {style: ' white-space: pre-wrap; font-size: 12px ;' },
15771604 similarityText
15781605 ),
15791606 ]),
@@ -1582,7 +1609,6 @@ function showOfficialVerificationResult(result) {
15821609 });
15831610}
15841611
1585-
15861612// 修改 verifyFunctionCalling 函数
15871613async function verifyFunctionCalling (model ) {
15881614 selectedModelForFunctionCalling .value = model;
@@ -1626,8 +1652,7 @@ async function performFunctionCallingVerification(model, a, b) {
16261652function showFunctionCallingResult (result ) {
16271653 Modal .info ({
16281654 title: t (' FUNCTION_VERIFICATION_RESULT' ),
1629- content: h (' div' , {}, [
1630- h (' h3' , {}, t (' FUNCTION_VERIFICATION_RESULT' )),
1655+ content : () => h (' div' , {}, [
16311656 h (' p' , {style: ' font-weight: bold;' }, ` ${ t (' MODEL' )} : ${ result .model } ` ),
16321657 h (' div' , {style: ' display: flex; justify-content: space-between;' }, [
16331658 h (' div' , {style: ' width: 48%;' }, [
0 commit comments