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.
161 lines
7.3 KiB
161 lines
7.3 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">
|
|
<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>
|
|
|
|
<button type="button" class="btn" id="testLLMBtn" style="margin-top: 10px;">
|
|
测试 LLM 连接
|
|
</button>
|
|
</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="10" min="1" max="100">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="maxRetries">LLM 重试次数 (模板生成失败时重试)</label>
|
|
<input type="number" id="maxRetries" name="max_retries"
|
|
value="20" 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="universe">目标股票池 (可选 - 留空则使用种子Alpha的默认值)</label>
|
|
<select id="universe" name="universe" disabled>
|
|
<option value="">-- 先选择Delay --</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="delay">目标Delay</label>
|
|
<select id="delay" name="delay">
|
|
<option value="1" selected>1</option>
|
|
<option value="0">0</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>目标数据类别 (可多选)</label>
|
|
<div id="category-buttons">
|
|
<button type="button" class="btn" id="cat-all" data-value="" onclick="toggleAllCategories()">
|
|
全选/反选
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<button type="button" class="btn" id="downloadDatafieldsBtn" style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); margin-bottom: 10px;">
|
|
下载数据字段缓存
|
|
</button>
|
|
|
|
<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 class="instructions">
|
|
<h3>使用说明</h3>
|
|
<ul>
|
|
<li>输入您的种子Alpha ID,系统将基于BRAIN平台生成多个变种</li>
|
|
<li>配置您的LLM(支持OpenAI兼容接口)和BRAIN凭证</li>
|
|
<li>点击生成按钮,系统将自动完成所有处理并返回结果</li>
|
|
</ul>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<script src="/app.js"></script>
|
|
</body>
|
|
</html>
|
|
|