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:
62
tests/test_deepseek_reasoner.py
Normal file
62
tests/test_deepseek_reasoner.py
Normal file
@@ -0,0 +1,62 @@
|
||||
"""
|
||||
Test deepseek-reasoner model on Ollama API
|
||||
"""
|
||||
import requests
|
||||
import json
|
||||
import urllib3
|
||||
import sys
|
||||
import codecs
|
||||
|
||||
# Set UTF-8 encoding for output
|
||||
if sys.platform == 'win32':
|
||||
sys.stdout = codecs.getwriter('utf-8')(sys.stdout.buffer, 'strict')
|
||||
|
||||
# Disable SSL warnings
|
||||
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
||||
|
||||
API_URL = "https://ollama_pjapi.theaken.com"
|
||||
|
||||
print("=" * 60)
|
||||
print("Testing deepseek-reasoner model")
|
||||
print("=" * 60)
|
||||
print()
|
||||
|
||||
# Test chat completion with deepseek-reasoner
|
||||
print("Sending test prompt to deepseek-reasoner...")
|
||||
try:
|
||||
chat_request = {
|
||||
"model": "deepseek-reasoner",
|
||||
"messages": [
|
||||
{"role": "user", "content": "請用中文簡單地說明什麼是人工智慧"}
|
||||
]
|
||||
}
|
||||
|
||||
response = requests.post(
|
||||
f"{API_URL}/v1/chat/completions",
|
||||
json=chat_request,
|
||||
headers={'Content-Type': 'application/json'},
|
||||
timeout=60,
|
||||
verify=False
|
||||
)
|
||||
|
||||
print(f"Status Code: {response.status_code}")
|
||||
|
||||
if response.status_code == 200:
|
||||
result = response.json()
|
||||
text = result['choices'][0]['message']['content']
|
||||
print("\nResponse:")
|
||||
print("-" * 60)
|
||||
print(text)
|
||||
print("-" * 60)
|
||||
|
||||
# Save to file
|
||||
with open('deepseek_reasoner_output.txt', 'w', encoding='utf-8') as f:
|
||||
f.write(text)
|
||||
print("\n✓ Response saved to: deepseek_reasoner_output.txt")
|
||||
else:
|
||||
print(f"Error: {response.text}")
|
||||
except Exception as e:
|
||||
print(f"Error: {str(e)}")
|
||||
|
||||
print()
|
||||
print("=" * 60)
|
||||
Reference in New Issue
Block a user