v1.1.0 新增大模型配置管理:页面可配置分析网页的LLM接口(名称/BaseURL/Key/模型/温度/超时/默认),支持视觉标记——视觉模型走截图视觉分析路线,非视觉模型走DOM快照文本分析路线;任务创建可选模型并记录使用情况
This commit is contained in:
+59
-1
@@ -28,13 +28,27 @@
|
||||
<label>最大步数</label>
|
||||
<input id="max_steps" type="number" value="30" min="1" max="100">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>分析模型 <span class="tag" id="model-tag"></span></label>
|
||||
<select id="llm_config_id"></select>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>超时(秒)</label>
|
||||
<input id="timeout" type="number" value="600" min="30" max="3600">
|
||||
</div>
|
||||
</div>
|
||||
<button id="submit" class="btn primary">🚀 开始测试</button>
|
||||
<div class="hint">测试由 AI 自动驱动浏览器执行:打开页面 → 逐步操作 → 断言验证 → 生成报告(含截图)</div>
|
||||
<div class="hint">测试由 AI 自动驱动浏览器执行:打开页面 → 逐步操作 → 断言验证 → 生成报告(含截图)。
|
||||
<b>🖼️ 视觉模型</b>:通过截图直接观察页面视觉状态分析;<b>📄 文本模型</b>:通过 DOM 元素快照分析。</div>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h2>🔌 大模型配置 <button id="add-llm" class="btn small primary">+ 新增配置</button></h2>
|
||||
<table id="llm-table">
|
||||
<thead><tr><th>名称</th><th>模型</th><th>Base URL</th><th>分析方式</th><th>温度</th><th>超时</th><th>默认</th><th>操作</th></tr></thead>
|
||||
<tbody><tr><td colspan="8" class="empty">加载中...</td></tr></tbody>
|
||||
</table>
|
||||
<div class="hint">配置 OpenAI 兼容接口的大模型。支持视觉的模型(如 GPT-4o、豆包视觉版)用截图分析网页,不支持视觉的模型用 DOM 快照分析。</div>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
@@ -80,6 +94,50 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="llm-modal" class="modal hidden">
|
||||
<div class="modal-body llm-modal-body">
|
||||
<div class="modal-head"><span id="llm-modal-title">新增模型配置</span><button id="llm-modal-close" class="btn small">关闭</button></div>
|
||||
<div class="llm-form">
|
||||
<div class="field">
|
||||
<label>配置名称</label>
|
||||
<input id="llm-name" type="text" placeholder="例如:火山引擎豆包视觉版">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Base URL(OpenAI 兼容接口地址)</label>
|
||||
<input id="llm-base-url" type="text" placeholder="https://ark.cn-beijing.volces.com/api/plan/v3">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>API Key</label>
|
||||
<input id="llm-api-key" type="password" placeholder="sk-...">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>模型名</label>
|
||||
<input id="llm-model" type="text" placeholder="例如:doubao-seed-evolving">
|
||||
</div>
|
||||
<div class="field span2 llm-opts">
|
||||
<label class="check"><input id="llm-vision" type="checkbox"> 🖼️ 支持视觉分析(通过页面截图观察分析)</label>
|
||||
<label class="check"><input id="llm-default" type="checkbox"> ⭐ 设为默认配置</label>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>温度(0~1)</label>
|
||||
<input id="llm-temperature" type="number" value="0.2" min="0" max="1" step="0.1">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>超时(秒)</label>
|
||||
<input id="llm-timeout" type="number" value="120" min="10" max="600">
|
||||
</div>
|
||||
<div class="llm-actions">
|
||||
<button id="llm-test" class="btn small">🔌 测试连接</button>
|
||||
<span id="llm-test-result" class="llm-test-result"></span>
|
||||
</div>
|
||||
<div class="llm-actions">
|
||||
<button id="llm-save" class="btn primary">💾 保存</button>
|
||||
<button id="llm-cancel" class="btn small">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user