Spaces:
Running
Running
Update index.html
Browse files- index.html +10 -9
index.html
CHANGED
|
@@ -108,7 +108,7 @@
|
|
| 108 |
|
| 109 |
<!-- API Key -->
|
| 110 |
<div class="space-y-2">
|
| 111 |
-
<label id="apiKeyLabel" class="text-xs font-semibold text-purple-400 uppercase ml-1">1. ใส่คีย์สมอง (
|
| 112 |
<div class="relative">
|
| 113 |
<svg class="absolute left-3 top-3.5 h-4 w-4 text-slate-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
| 114 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"/>
|
|
@@ -290,7 +290,7 @@
|
|
| 290 |
reset: "ล้างข้อมูล",
|
| 291 |
introTitle: "ระบบคำนวณดวงเกมตกกุ้ง",
|
| 292 |
introText: "ระบบ AI ผสานศาสตร์ปาจื้อและจื่อเวยฯ วิเคราะห์เกมชั่งน้ำหนักกุ้งลาดพร้าว คำนวณดัชนีโชคลาภและฟันธง 'คู่' หรือ 'คี่' ตามเวลาจริง",
|
| 293 |
-
apiKeyLabel: "1. ใส่คีย์สมอง (
|
| 294 |
apiKeyPlaceholder: "sk-...",
|
| 295 |
apiKeyNote: "*คีย์ใช้ส่งข้อมูลหา AI เท่านั้น ไม่มีการบันทึก",
|
| 296 |
userInfoLabel: "2. ข้อมูลเจ้าชะตา (กรอกครั้งเดียว)",
|
|
@@ -320,7 +320,7 @@
|
|
| 320 |
},
|
| 321 |
'zh-TW': {
|
| 322 |
title: "曼谷運勢智囊",
|
| 323 |
-
subtitle: "
|
| 324 |
reset: "重置",
|
| 325 |
introTitle: "命理融合預測系統",
|
| 326 |
introText: "本系統結合八字與紫微斗數,專門針對曼谷 Ladprao 釣蝦場的秤重遊戲進行分析。AI 將計算您的偏財指數與最佳下注策略(單/雙)。",
|
|
@@ -358,7 +358,7 @@
|
|
| 358 |
reset: "Reset",
|
| 359 |
introTitle: "Prediction System",
|
| 360 |
introText: "Combines BaZi and ZiWei DouShu to analyze the Ladprao Shrimp weighing game. AI calculates Odd/Even strategy based on time.",
|
| 361 |
-
apiKeyLabel: "1.
|
| 362 |
apiKeyPlaceholder: "sk-...",
|
| 363 |
apiKeyNote: "*Key is not stored.",
|
| 364 |
userInfoLabel: "2. Your Details",
|
|
@@ -645,14 +645,14 @@ Based on birth data and betting time, calculate the windfall luck.
|
|
| 645 |
const controller = new AbortController();
|
| 646 |
const timeoutId = setTimeout(() => controller.abort(), 30000); // 30 second timeout
|
| 647 |
|
| 648 |
-
const response = await fetch('https://api.
|
| 649 |
method: 'POST',
|
| 650 |
headers: {
|
| 651 |
'Content-Type': 'application/json',
|
| 652 |
'Authorization': `Bearer ${apiKey}`
|
| 653 |
},
|
| 654 |
body: JSON.stringify({
|
| 655 |
-
model: "
|
| 656 |
messages: [
|
| 657 |
{ role: "system", content: systemPrompt },
|
| 658 |
{ role: "user", content: userPrompt }
|
|
@@ -682,8 +682,8 @@ Based on birth data and betting time, calculate the windfall luck.
|
|
| 682 |
errorMsg = state.lang === 'th' ? 'หมดเวลาเชื่อมต่อ กรุณาลองใหม่' : 'Connection timeout. Please try again.';
|
| 683 |
} else if (error.message === 'Failed to fetch' || error.message.includes('load failed')) {
|
| 684 |
errorMsg = state.lang === 'th'
|
| 685 |
-
? '❌ ไม่สามารถเชื่อมต่อ API ได้\n\nสาเหตุที่เป็นไปได้:\n1. API Key ไม่ถูกต้อง\n2. ปัญหาการเชื่อมต่ออินเทอร์เน็ต\n3.
|
| 686 |
-
: '❌ Cannot connect to API\n\nPossible causes:\n1. Invalid API Key\n2. Network connection issue\n3.
|
| 687 |
}
|
| 688 |
state.chatHistory.push({ role: 'assistant', content: errorMsg });
|
| 689 |
} finally {
|
|
@@ -745,4 +745,5 @@ Based on birth data and betting time, calculate the windfall luck.
|
|
| 745 |
updateLanguage();
|
| 746 |
</script>
|
| 747 |
</body>
|
| 748 |
-
</html>
|
|
|
|
|
|
| 108 |
|
| 109 |
<!-- API Key -->
|
| 110 |
<div class="space-y-2">
|
| 111 |
+
<label id="apiKeyLabel" class="text-xs font-semibold text-purple-400 uppercase ml-1">1. ใส่คีย์สมอง (GPT-5-Nano API)</label>
|
| 112 |
<div class="relative">
|
| 113 |
<svg class="absolute left-3 top-3.5 h-4 w-4 text-slate-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
| 114 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"/>
|
|
|
|
| 290 |
reset: "ล้างข้อมูล",
|
| 291 |
introTitle: "ระบบคำนวณดวงเกมตกกุ้ง",
|
| 292 |
introText: "ระบบ AI ผสานศาสตร์ปาจื้อและจื่อเวยฯ วิเคราะห์เกมชั่งน้ำหนักกุ้งลาดพร้าว คำนวณดัชนีโชคลาภและฟันธง 'คู่' หรือ 'คี่' ตามเวลาจริง",
|
| 293 |
+
apiKeyLabel: "1. ใส่คีย์สมอง (GPT-5-Nano API)",
|
| 294 |
apiKeyPlaceholder: "sk-...",
|
| 295 |
apiKeyNote: "*คีย์ใช้ส่งข้อมูลหา AI เท่านั้น ไม่มีการบันทึก",
|
| 296 |
userInfoLabel: "2. ข้อมูลเจ้าชะตา (กรอกครั้งเดียว)",
|
|
|
|
| 320 |
},
|
| 321 |
'zh-TW': {
|
| 322 |
title: "曼谷運勢智囊",
|
| 323 |
+
subtitle: "GPT-5-Nano AI 驅動 - 釣蝦場單雙預測",
|
| 324 |
reset: "重置",
|
| 325 |
introTitle: "命理融合預測系統",
|
| 326 |
introText: "本系統結合八字與紫微斗數,專門針對曼谷 Ladprao 釣蝦場的秤重遊戲進行分析。AI 將計算您的偏財指數與最佳下注策略(單/雙)。",
|
|
|
|
| 358 |
reset: "Reset",
|
| 359 |
introTitle: "Prediction System",
|
| 360 |
introText: "Combines BaZi and ZiWei DouShu to analyze the Ladprao Shrimp weighing game. AI calculates Odd/Even strategy based on time.",
|
| 361 |
+
apiKeyLabel: "1. GPT-5-Nano API Key",
|
| 362 |
apiKeyPlaceholder: "sk-...",
|
| 363 |
apiKeyNote: "*Key is not stored.",
|
| 364 |
userInfoLabel: "2. Your Details",
|
|
|
|
| 645 |
const controller = new AbortController();
|
| 646 |
const timeoutId = setTimeout(() => controller.abort(), 30000); // 30 second timeout
|
| 647 |
|
| 648 |
+
const response = await fetch('https://api.gpt-5-nano.com/v1/chat/completions', {
|
| 649 |
method: 'POST',
|
| 650 |
headers: {
|
| 651 |
'Content-Type': 'application/json',
|
| 652 |
'Authorization': `Bearer ${apiKey}`
|
| 653 |
},
|
| 654 |
body: JSON.stringify({
|
| 655 |
+
model: "gpt-5-nano",
|
| 656 |
messages: [
|
| 657 |
{ role: "system", content: systemPrompt },
|
| 658 |
{ role: "user", content: userPrompt }
|
|
|
|
| 682 |
errorMsg = state.lang === 'th' ? 'หมดเวลาเชื่อมต่อ กรุณาลองใหม่' : 'Connection timeout. Please try again.';
|
| 683 |
} else if (error.message === 'Failed to fetch' || error.message.includes('load failed')) {
|
| 684 |
errorMsg = state.lang === 'th'
|
| 685 |
+
? '❌ ไม่สามารถเชื่อมต่อ API ได้\n\nสาเหตุที่เป็นไปได้:\n1. API Key ไม่ถูกต้อง\n2. ปัญหาการเชื่อมต่ออินเทอร์เน็ต\n3. GPT-5-Nano API อาจมีปัญหาชั่วคราว\n\n💡 ลองตรวจสอบ API Key หรือลองใหม่อีกครั้ง'
|
| 686 |
+
: '❌ Cannot connect to API\n\nPossible causes:\n1. Invalid API Key\n2. Network connection issue\n3. GPT-5-Nano API temporary issue\n\n💡 Please check your API Key or try again.';
|
| 687 |
}
|
| 688 |
state.chatHistory.push({ role: 'assistant', content: errorMsg });
|
| 689 |
} finally {
|
|
|
|
| 745 |
updateLanguage();
|
| 746 |
</script>
|
| 747 |
</body>
|
| 748 |
+
</html>
|
| 749 |
+
|