Skip to content

Commit 92baffc

Browse files
committed
增加chatgpt/o1前缀的gpt判定规则
1 parent aedeb6f commit 92baffc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ <h3>(适配 oneapi/newapi 等中转格式)</h3>
736736
model: model,
737737
messages: [{role: "user", content: "写一个10个字的冷笑话"}]
738738
};
739-
if (model.startsWith('gpt-')) {
739+
if (/^(gpt-|chatgpt-|o1-)/.test(model)) {
740740
requestBody.seed = 331;
741741
}
742742
const response = await fetch(`${apiUrl}/v1/chat/completions`, {
@@ -757,7 +757,7 @@ <h3>(适配 oneapi/newapi 等中转格式)</h3>
757757
const returnedModel = data.model;
758758
if (returnedModel === model) {
759759
results.valid.push({model, responseTime});
760-
if (model.startsWith('gpt-')) {
760+
if (/^(gpt-|chatgpt-|o1-)/.test(model)) {
761761
if (data.system_fingerprint) {
762762
results.awaitOfficialVerification.push({
763763
model,
@@ -869,13 +869,13 @@ <h3>(适配 oneapi/newapi 等中转格式)</h3>
869869
函数验证
870870
</button>
871871
`;
872-
if (r.model.startsWith('gpt-') || r.model.startsWith('claude-')) {
872+
if (/^(gpt-|chatgpt-|o1-)/.test(r.model) || r.model.startsWith('claude-')) {
873873
let officialButtonClass = results.awaitOfficialVerification.some(item => item.model === r.model) ? "green" : "yellow";
874874
verifyButtons += `
875875
<button class="verify-btn blue" data-tooltip="低温度参数下预测序列下一个值,将发起4次请求" onclick="verifyTemperature('${r.model}')">
876876
温度验证
877877
</button>
878-
${r.model.startsWith('gpt-') ? `
878+
${/^(gpt-|chatgpt-|o1-)/.test(r.model) ? `
879879
<button class="verify-btn ${officialButtonClass}" data-tooltip="相同种子参数下校验回复相似性和系统指纹,将发起4次请求" onclick="verifyOfficial('${r.model}')">
880880
官转验证
881881
</button>
@@ -889,13 +889,13 @@ <h3>(适配 oneapi/newapi 等中转格式)</h3>
889889
let verifyButtons = `<button class="verify-btn cyan" data-tooltip="校验函数功能是否可用,将发起1次请求" onclick="verifyFunctionCalling('${r.model}')">
890890
函数验证
891891
</button>`
892-
if (r.model.startsWith('gpt-') || r.model.startsWith('claude-')) {
892+
if (/^(gpt-|chatgpt-|o1-)/.test(r.model) || r.model.startsWith('claude-')) {
893893
let officialButtonClass = results.awaitOfficialVerification.some(item => item.model === r.model) ? "green" : "yellow";
894894
verifyButtons += `
895895
<button class="verify-btn blue" data-tooltip="低温度参数下预测序列下一个值,将发起4次请求" onclick="verifyTemperature('${r.model}')">
896896
温度验证
897897
</button>
898-
${r.model.startsWith('gpt-') ? `
898+
${/^(gpt-|chatgpt-|o1-)/.test(r.model) ? `
899899
<button class="verify-btn ${officialButtonClass}" data-tooltip="相同种子参数下校验回复相似性和系统指纹,将发起4次请求" onclick="verifyOfficial('${r.model}')">
900900
官转验证
901901
</button>

0 commit comments

Comments
 (0)