You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

148 lines
6.7 KiB

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Alpha Transformer - </title>
<link rel="stylesheet" href="/styles.css">
</head>
<body>
<div class="container">
<div class="header">
<h1>Alpha Transformer</h1>
<p> - AI驱动的Alpha变种生成器</p>
</div>
<div class="content">
<div class="instructions">
<h3>使用说明</h3>
<ul>
<li>输入您的种子Alpha ID,系统将基于BRAIN平台生成多个变种</li>
<li>配置您的LLM(支持OpenAI兼容接口)和BRAIN凭证</li>
<li>点击生成按钮,系统将自动完成所有处理并返回结果</li>
</ul>
</div>
<form id="transformerForm">
<div class="form-section">
<h2>BRAIN 凭证</h2>
<div class="form-row">
<div class="form-group">
<label for="brainUsername">用户名 *</label>
<input type="text" id="brainUsername" name="brain_username" required
placeholder="BRAIN平台用户名">
</div>
<div class="form-group">
<label for="brainPassword">密码 *</label>
<input type="password" id="brainPassword" name="brain_password" required
placeholder="BRAIN平台密码">
</div>
</div>
<button type="button" class="btn" id="loginAndFetchBtn" style="margin-top: 10px;">
登录BRAIN并获取选项
</button>
</div>
<div class="form-section">
<h2>基本信息</h2>
<div class="form-group">
<label for="alphaId">Alpha ID *</label>
<input type="text" id="alphaId" name="alpha_id" required
placeholder="例如: ak2YPVxv">
</div>
</div>
<div class="form-section">
<h2>LLM 配置</h2>
<div class="form-row">
<div class="form-group">
<label for="llmApiKey">API Key *</label>
<input type="password" id="llmApiKey" name="llm_api_key" required
placeholder="您的LLM API密钥">
</div>
<div class="form-group">
<label for="llmBaseUrl">Base URL *</label>
<input type="text" id="llmBaseUrl" name="llm_base_url" required
value="https://api.moonshot.cn/v1"
placeholder="例如: https://api.moonshot.cn/v1">
</div>
</div>
<div class="form-group">
<label for="llmModel">模型名称 *</label>
<input type="text" id="llmModel" name="llm_model" required
value="kimi-k2.5"
placeholder="例如: kimi-k2.5, gpt-4">
</div>
</div>
<div class="form-section">
<h2>高级选项(可选)</h2>
<div class="form-group">
<label for="topNDatafield">Datafield Top N (候选数量,建议低于50)</label>
<input type="number" id="topNDatafield" name="top_n_datafield"
value="50" min="1" max="100">
</div>
<div class="form-group">
<label for="dataType">数据类型 (Data Type)</label>
<select id="dataType" name="data_type">
<option value="MATRIX" selected>MATRIX</option>
<option value="VECTOR">VECTOR</option>
</select>
</div>
<div class="form-group">
<label>目标地区 (可选 - 留空则使用种子Alpha的默认值)</label>
<select id="region" name="region" disabled>
<option value="">-- 登录后获取选项 --</option>
</select>
</div>
<div class="form-group">
<label for="delay">目标Delay (可选 - 留空则使用种子Alpha的默认值)</label>
<select id="delay" name="delay" disabled>
<option value="">-- 先选择地区 --</option>
</select>
</div>
<div class="form-group">
<label for="universe">目标股票池 (可选 - 留空则使用种子Alpha的默认值)</label>
<select id="universe" name="universe" disabled>
<option value="">-- 先选择Delay --</option>
</select>
</div>
<div class="form-group">
<label>目标数据类别 (可多选)</label>
<div id="category-buttons">
<button type="button" class="btn" id="cat-all" data-value="" onclick="toggleCategory(this)">
不筛选 (默认)
</button>
</div>
</div>
</div>
<button type="submit" class="btn submit-btn" id="submitBtn">
生成变种
</button>
<button type="button" class="btn download-btn" id="downloadBtn" style="display: none; margin-top: 10px; background: linear-gradient(135deg, var(--monokai-cyan) 0%, #4fc3f7 100%);">
下载结果 (ZIP)
</button>
</form>
</div>
</div>
<script src="/app.js"></script>
</body>
</html>