CareerBot/templates/admin/llm-config.html
ln0422 96997daed0 Initial commit: CareerBot full-stack career showcase with AI chatbot
- FastAPI backend with SQLAlchemy ORM and SQLite
- AI chatbot with OpenAI-compatible LLM integration (SSE streaming)
- Admin panel for content management, LLM config, token management
- Anonymous access with 3-question limit, token-based access control
- Recruiter intent detection with admin notification
- Resume generator (JD-based, Markdown to Word export)
- Chinese localized public interface

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 20:36:38 +08:00

82 lines
4.0 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CareerBot Admin - LLM Configuration</title>
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<div class="admin-layout">
<aside class="admin-sidebar">
<div class="logo">CareerBot Admin</div>
<nav>
<a href="/admin/dashboard"><span class="icon">&#9632;</span> Dashboard</a>
<a href="/admin/profile"><span class="icon">&#9786;</span> Profile</a>
<a href="/admin/education"><span class="icon">&#9734;</span> Education</a>
<a href="/admin/experience"><span class="icon">&#9998;</span> Experience</a>
<a href="/admin/skills"><span class="icon">&#9733;</span> Skills</a>
<a href="/admin/tokens"><span class="icon">&#9911;</span> Access Tokens</a>
<a href="/admin/messages"><span class="icon">&#9993;</span> Messages <span class="nav-badge" id="nav-badge" style="display:none;"></span></a>
<a href="/admin/llm-config"><span class="icon">&#9881;</span> LLM Config</a>
<a href="/admin/resume"><span class="icon">&#9997;</span> Resume Gen</a>
<a href="#" onclick="adminLogout()"><span class="icon">&#8594;</span> Logout</a>
</nav>
</aside>
<main class="admin-content">
<div class="admin-header">
<h2>LLM Configuration</h2>
</div>
<div class="admin-card">
<p style="color:var(--text-secondary);margin-bottom:16px;">Quick presets:</p>
<div class="preset-buttons">
<button class="btn" onclick="setPreset('qwen')">Qwen (DashScope)</button>
<button class="btn" onclick="setPreset('deepseek')">DeepSeek</button>
<button class="btn" onclick="setPreset('zhipu')">Zhipu (GLM)</button>
<button class="btn" onclick="setPreset('openai')">OpenAI</button>
</div>
<div class="form-group">
<label>API URL</label>
<input type="text" id="llm-api_url" placeholder="https://api.deepseek.com">
</div>
<div class="form-group">
<label>API Key</label>
<input type="password" id="llm-api_key" placeholder="sk-...">
</div>
<div class="form-group">
<label>Model Name</label>
<input type="text" id="llm-model_name" placeholder="e.g. deepseek-chat, qwen-plus">
</div>
<div class="form-row">
<div class="form-group">
<label>Max Tokens</label>
<input type="number" id="llm-max_tokens" value="2048" min="256" max="8192">
</div>
<div class="form-group">
<label>Temperature: <span id="temp-value">0.7</span></label>
<input type="range" id="llm-temperature" min="0" max="2" step="0.1" value="0.7"
oninput="document.getElementById('temp-value').textContent=this.value">
</div>
</div>
<div class="form-group">
<label>Max Questions Per Session (chat question limit for visitors)</label>
<input type="number" id="llm-max_questions" value="10" min="1" max="100">
</div>
<div class="form-group">
<label>Custom System Prompt (optional, appended to default)</label>
<textarea id="llm-system_prompt" rows="4" placeholder="Additional instructions for the AI assistant..."></textarea>
</div>
<div style="display:flex;gap:8px;margin-top:16px;">
<button class="btn btn-primary" onclick="saveLLMConfig()">Save Configuration</button>
<button class="btn btn-success" onclick="testLLMConnection()">Test Connection</button>
</div>
</div>
</main>
</div>
<script src="/static/js/admin.js"></script>
</body>
</html>