mirror of
https://github.com/SilenceLurker/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 17:05:50 +00:00
182 lines
9.3 KiB
HTML
182 lines
9.3 KiB
HTML
<div class="amily2-header">
|
||
<div class="additional-features-title">
|
||
<i class="fas fa-book"></i> 术语表 (Sybd 系统)
|
||
</div>
|
||
<button id="amily2_back_to_main_from_glossary" class="menu_button secondary small_button interactable">
|
||
返回主殿 <i class="fas fa-arrow-right"></i>
|
||
</button>
|
||
</div>
|
||
<hr class="header-divider">
|
||
|
||
<!-- 标签页导航 -->
|
||
<div class="glossary-tabs">
|
||
<button class="glossary-tab active" data-tab="api">
|
||
<i class="fas fa-bolt"></i> API 设置
|
||
</button>
|
||
<button class="glossary-tab" data-tab="novel-process">
|
||
<i class="fas fa-file-invoice"></i> 小说处理
|
||
</button>
|
||
<button class="glossary-tab" data-tab="prompts">
|
||
<i class="fas fa-edit"></i> 待开发
|
||
</button>
|
||
<button class="glossary-tab" data-tab="context">
|
||
<i class="fas fa-book-open"></i> 世界书条目
|
||
</button>
|
||
</div>
|
||
|
||
<!-- 标签页内容容器 -->
|
||
<div class="glossary-content-container">
|
||
|
||
<!-- API 设置面板 -->
|
||
<div id="glossary-content-api" class="glossary-content active">
|
||
<div class="settings-group">
|
||
<div class="legend"><i class="fas fa-satellite-dish"></i> Sybd API 调用系统</div>
|
||
<small class="notes" style="text-align: center; display: block; margin-bottom: 15px;">
|
||
独立的API调用系统,可与主系统并行使用,支持全兼容和SillyTavern预设两种模式。
|
||
</small>
|
||
|
||
<div class="amily2_settings_block" id="amily2_sybd_content">
|
||
<div class="control-group">
|
||
<label for="amily2_sybd_api_mode">API调用模式:</label>
|
||
<select id="amily2_sybd_api_mode" class="text_pole" data-setting-key="sybdApiMode" data-type="string">
|
||
<option value="openai_test">全兼容模式</option>
|
||
<option value="sillytavern_preset">SillyTavern预设模式</option>
|
||
</select>
|
||
</div>
|
||
|
||
<div id="amily2_sybd_config_panel" style="margin-top: 15px;">
|
||
<!-- 全兼容模式配置 -->
|
||
<div id="amily2_sybd_compatible_config">
|
||
<div class="control-group">
|
||
<label for="amily2_sybd_api_url">API地址:</label>
|
||
<input type="text" id="amily2_sybd_api_url" class="text_pole" placeholder="https://api.openai.com/v1" data-setting-key="sybdApiUrl" data-type="string" />
|
||
</div>
|
||
<div class="control-group">
|
||
<label for="amily2_sybd_api_key">API密钥:</label>
|
||
<input type="password" id="amily2_sybd_api_key" class="text_pole" placeholder="sk-..." data-setting-key="sybdApiKey" data-type="string" />
|
||
</div>
|
||
<div class="control-group">
|
||
<label for="amily2_sybd_model">模型:</label>
|
||
<div class="select-with-refresh">
|
||
<select id="amily2_sybd_model_select" class="text_pole" style="flex-grow: 1; display: none;">
|
||
<option value="">-- 请选择模型 --</option>
|
||
</select>
|
||
<input type="text" id="amily2_sybd_model" class="text_pole" placeholder="gpt-4" style="flex-grow: 1;" data-setting-key="sybdModel" data-type="string" />
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- SillyTavern预设模式配置 -->
|
||
<div id="amily2_sybd_preset_config" style="display: none;">
|
||
<div class="control-group">
|
||
<label for="amily2_sybd_tavern_profile">选择SillyTavern预设:</label>
|
||
<select id="amily2_sybd_tavern_profile" class="text_pole" data-setting-key="sybdTavernProfile" data-type="string">
|
||
<option value="">-- 请选择预设 --</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 通用参数配置 -->
|
||
<div class="control-group">
|
||
<label for="amily2_sybd_max_tokens">最大令牌数:<span id="amily2_sybd_max_tokens_value">4000</span></label>
|
||
<input type="range" id="amily2_sybd_max_tokens" min="100" max="100000" step="100" value="4000" data-setting-key="sybdMaxTokens" data-type="integer" />
|
||
</div>
|
||
<div class="control-group">
|
||
<label for="amily2_sybd_temperature">温度:<span id="amily2_sybd_temperature_value">0.7</span></label>
|
||
<input type="range" id="amily2_sybd_temperature" min="0" max="2" step="0.1" value="0.7" data-setting-key="sybdTemperature" data-type="float" />
|
||
</div>
|
||
|
||
<!-- 测试按钮组 - 水平排列 -->
|
||
<div class="sybd-button-row" style="display: flex; gap: 10px; justify-content: center; margin-top: 15px;">
|
||
<button id="amily2_sybd_test_connection" class="menu_button primary small_button interactable">
|
||
<i class="fas fa-plug"></i> 测试连接
|
||
</button>
|
||
<button id="amily2_sybd_fetch_models" class="menu_button secondary small_button interactable" title="获取可用模型列表">
|
||
<i class="fas fa-download"></i> 获取模型
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 提示词指令面板 -->
|
||
<div id="glossary-content-prompts" class="glossary-content">
|
||
<div class="settings-group">
|
||
<div class="legend"><i class="fas fa-edit"></i> 待开发</div>
|
||
<p style="text-align: center; margin-top: 20px;">待开发</p>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 世界书条目面板 -->
|
||
<div id="glossary-content-context" class="glossary-content">
|
||
<div class="settings-group">
|
||
<div class="legend"><i class="fas fa-book-open"></i> 世界书条目预览</div>
|
||
<small class="notes" style="text-align: center; display: block; margin-bottom: 15px;">
|
||
此处将显示在“小说处理”标签页中选定世界书的条目。
|
||
</small>
|
||
<div class="amily2-glossary-toolbar" style="text-align: center; margin-bottom: 15px;">
|
||
|
||
</div>
|
||
<div id="world-book-entries-display" class="world-book-entries-container">
|
||
<!-- 条目将在这里动态生成 -->
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 小说处理面板 -->
|
||
<div id="glossary-content-novel-process" class="glossary-content">
|
||
<div class="settings-group">
|
||
<div class="legend"><i class="fas fa-file-upload"></i> 小说文件处理流程</div>
|
||
|
||
<!-- 使用 horizontal-group 来确保标签和控件水平对齐 -->
|
||
<div class="control-group horizontal-group">
|
||
<label for="novel-world-book-select">1. 选择目标世界书:</label>
|
||
<select id="novel-world-book-select" class="text_pole"></select>
|
||
</div>
|
||
|
||
<!-- 为上传按钮使用独立的容器,不再使用 control-group -->
|
||
<div class="upload-button-container">
|
||
<label for="novel-file-input" class="menu_button secondary interactable">
|
||
<i class="fas fa-upload"></i> 2. 上传小说文件 (.txt)
|
||
</label>
|
||
<input type="file" id="novel-file-input" accept=".txt" style="display: none;">
|
||
</div>
|
||
|
||
<div class="control-group horizontal-group">
|
||
<label for="novel-chunk-size">3. 每批处理字符数:</label>
|
||
<input type="number" id="novel-chunk-size" class="text_pole" value="300000" min="1000" step="500" data-setting-key="novelChunkSize" data-type="integer">
|
||
</div>
|
||
|
||
<hr class="header-divider">
|
||
|
||
<!-- 为预览区域使用独立的容器 -->
|
||
<div class="preview-container">
|
||
<label>4. 内容分块预览 (共 <span id="novel-chunk-count">0</span> 块):</label>
|
||
<div id="novel-chunk-preview">
|
||
<small>请先上传文件...</small>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 开关按钮使用 amily2_settings_block,但CSS会对其进行特殊处理 -->
|
||
<div class="amily2_settings_block">
|
||
<label for="novel-force-new">强制新建条目 (不更新现有条目)</label>
|
||
<label class="amily2-glossary-toggle">
|
||
<input id="novel-force-new" type="checkbox" />
|
||
<span class="slider"></span>
|
||
</label>
|
||
</div>
|
||
|
||
<div class="sybd-button-row">
|
||
<button id="novel-confirm-and-process" class="menu_button primary interactable" disabled>
|
||
<i class="fas fa-play-circle"></i> 确认并开始处理
|
||
</button>
|
||
</div>
|
||
|
||
<div id="novel-process-status" style="text-align: center; margin-top: 10px; font-weight: bold;">
|
||
等待操作...
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|