backup: 完成 HR_position_ 表格前綴重命名與欄位對照表整理
變更內容: - 所有資料表加上 HR_position_ 前綴 - 整理完整欄位顯示名稱與 ID 對照表 - 模組化 JS 檔案 (admin.js, ai.js, csv.js 等) - 專案結構優化 (docs/, scripts/, tests/ 等) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -355,7 +355,8 @@ class LLMConfig:
|
||||
"temperature": 0.7
|
||||
}
|
||||
|
||||
response = requests.post(url, json=data, headers=headers, timeout=60, verify=False)
|
||||
# 增加逾時時間到 180 秒,處理大模型較慢的情況
|
||||
response = requests.post(url, json=data, headers=headers, timeout=180, verify=False)
|
||||
|
||||
if response.status_code == 200:
|
||||
result = response.json()
|
||||
@@ -364,6 +365,10 @@ class LLMConfig:
|
||||
else:
|
||||
return False, f"生成失敗 (HTTP {response.status_code}): {response.text}"
|
||||
|
||||
except requests.exceptions.Timeout:
|
||||
return False, f"連線逾時 (180秒),伺服器可能過載或網路不穩定。建議:1) 稍後重試 2) 使用本地 Ollama (localhost:11434) 3) 切換到 Gemini API"
|
||||
except requests.exceptions.ConnectionError:
|
||||
return False, "無法連接到 Ollama 伺服器,請確認伺服器地址正確且服務已啟動"
|
||||
except Exception as e:
|
||||
return False, f"錯誤: {str(e)}"
|
||||
|
||||
@@ -395,7 +400,8 @@ class LLMConfig:
|
||||
"temperature": 0.7
|
||||
}
|
||||
|
||||
response = requests.post(url, json=data, headers=headers, timeout=60, verify=False)
|
||||
# 增加逾時時間到 180 秒
|
||||
response = requests.post(url, json=data, headers=headers, timeout=180, verify=False)
|
||||
|
||||
if response.status_code == 200:
|
||||
result = response.json()
|
||||
@@ -404,6 +410,10 @@ class LLMConfig:
|
||||
else:
|
||||
return False, f"生成失敗 (HTTP {response.status_code}): {response.text}"
|
||||
|
||||
except requests.exceptions.Timeout:
|
||||
return False, f"連線逾時 (180秒),伺服器可能過載或網路不穩定。建議:1) 稍後重試 2) 使用本地 Ollama (localhost:11434) 3) 切換到 Gemini API"
|
||||
except requests.exceptions.ConnectionError:
|
||||
return False, "無法連接到 GPT-OSS 伺服器,請確認伺服器地址正確且服務已啟動"
|
||||
except Exception as e:
|
||||
return False, f"錯誤: {str(e)}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user