mirror of
https://github.com/SilenceLurker/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 12:25:51 +00:00
Add files via upload
This commit is contained in:
@@ -42,6 +42,84 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="settings-group">
|
||||
<legend><i class="fas fa-satellite-dish"></i> Ngms API 调用系统</legend>
|
||||
<small class="notes" style="text-align: center; display: block; margin-bottom: 15px;">
|
||||
独立的API调用系统,可与主系统并行使用,支持全兼容和SillyTavern预设两种模式。
|
||||
</small>
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_ngms_enabled">启用Ngms API系统</label>
|
||||
<label class="toggle-switch">
|
||||
<input id="amily2_ngms_enabled" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="amily2_settings_block" id="amily2_ngms_content" style="display: none;">
|
||||
<div class="control-group">
|
||||
<label for="amily2_ngms_api_mode">API调用模式:</label>
|
||||
<select id="amily2_ngms_api_mode" class="text_pole">
|
||||
<option value="openai_test">全兼容模式</option>
|
||||
<option value="sillytavern_preset">SillyTavern预设模式</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="amily2_ngms_config_panel" style="margin-top: 15px;">
|
||||
<!-- 全兼容模式配置 -->
|
||||
<div id="amily2_ngms_compatible_config">
|
||||
<div class="control-group">
|
||||
<label for="amily2_ngms_api_url">API地址:</label>
|
||||
<input type="text" id="amily2_ngms_api_url" class="text_pole" placeholder="https://api.openai.com/v1" />
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label for="amily2_ngms_api_key">API密钥:</label>
|
||||
<input type="password" id="amily2_ngms_api_key" class="text_pole" placeholder="sk-..." />
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label for="amily2_ngms_model">模型:</label>
|
||||
<div class="select-with-refresh">
|
||||
<select id="amily2_ngms_model_select" class="text_pole" style="flex-grow: 1; display: none;">
|
||||
<option value="">-- 请选择模型 --</option>
|
||||
</select>
|
||||
<input type="text" id="amily2_ngms_model" class="text_pole" placeholder="gpt-4" style="flex-grow: 1;" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SillyTavern预设模式配置 -->
|
||||
<div id="amily2_ngms_preset_config" style="display: none;">
|
||||
<div class="control-group">
|
||||
<label for="amily2_ngms_tavern_profile">选择SillyTavern预设:</label>
|
||||
<select id="amily2_ngms_tavern_profile" class="text_pole">
|
||||
<option value="">-- 请选择预设 --</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 通用参数配置 -->
|
||||
<div class="control-group">
|
||||
<label for="amily2_ngms_max_tokens">最大令牌数:<span id="amily2_ngms_max_tokens_value">4000</span></label>
|
||||
<input type="range" id="amily2_ngms_max_tokens" min="100" max="100000" step="100" value="4000" />
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label for="amily2_ngms_temperature">温度:<span id="amily2_ngms_temperature_value">0.7</span></label>
|
||||
<input type="range" id="amily2_ngms_temperature" min="0" max="2" step="0.1" value="0.7" />
|
||||
</div>
|
||||
|
||||
<!-- 测试按钮组 - 水平排列 -->
|
||||
<div class="ngms-button-row" style="display: flex; gap: 10px; justify-content: center; margin-top: 15px;">
|
||||
<button id="amily2_ngms_test_connection" class="menu_button primary small_button interactable">
|
||||
<i class="fas fa-plug"></i> 测试连接
|
||||
</button>
|
||||
<button id="amily2_ngms_fetch_models" class="menu_button secondary small_button interactable" title="获取可用模型列表">
|
||||
<i class="fas fa-download"></i> 获取模型
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
||||
|
||||
<fieldset class="settings-group">
|
||||
|
||||
Reference in New Issue
Block a user