🚀 Auto-deploy: BotVPS atualizado em 02/05/2026 15:37:40

This commit is contained in:
2026-05-02 15:37:40 +00:00
parent 1c1fac3735
commit 912763b3f1
613 changed files with 169969 additions and 60 deletions

View File

@@ -780,15 +780,15 @@
<div class="config-grid">
<div class="form-group">
<label for="active_provider">Provider Ativo</label>
<select id="active_provider" aria-label="Provider Ativo" class="form-input">
<option value="ollama">Ollama (Local)</option>
<option value="gemini">Gemini Pro (Google)</option>
<select id="active_provider" aria-label="Provider Ativo" class="form-input" onchange="toggleProviderFields()">
<option value="minimax">MiniMax (Hermes - Externo)</option>
<option value="openrouter">OpenRouter (Externo)</option>
<option value="ollama">Ollama (Local-Interno)</option>
</select>
</div>
<div class="form-group">
<label for="gemini_api_key">Gemini API Key</label>
<input type="password" id="gemini_api_key" autocomplete="new-password"
aria-label="Gemini API Key" class="form-input" placeholder="AIzaSy...">
<div class="form-group" id="group-openrouter-model">
<label for="openrouter_model">Modelo OpenRouter</label>
<input type="text" id="openrouter_model" class="form-input" placeholder="ex: qwen/qwen-2.5-72b-instruct">
</div>
</div>
<button type="button" class="btn btn-primary" onclick="saveConfiguration()">
@@ -1162,21 +1162,32 @@
const res = await apiFetch('/api/config');
const data = await res.json();
const provider = document.getElementById('active_provider');
const key = document.getElementById('gemini_api_key');
if (provider) provider.value = data.active_provider || 'ollama';
if (key) key.value = data.gemini_api_key || '';
const model = document.getElementById('openrouter_model');
if (provider) provider.value = data.active_provider || 'minimax';
if (model) model.value = data.openrouter_model || 'qwen/qwen-2.5-72b-instruct';
toggleProviderFields();
} catch (e) { }
}
function toggleProviderFields() {
const provider = document.getElementById('active_provider').value;
const modelGroup = document.getElementById('group-openrouter-model');
if (modelGroup) {
modelGroup.style.display = (provider === 'openrouter') ? 'block' : 'none';
}
}
async function saveConfig() {
const provider = document.getElementById('active_provider').value;
const key = document.getElementById('gemini_api_key').value.trim();
const model = document.getElementById('openrouter_model').value.trim();
try {
const res = await apiFetch('/api/config', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ active_provider: provider, gemini_api_key: key })
body: JSON.stringify({ active_provider: provider, openrouter_model: model })
});
if (res.ok) {
showToast('Configurações salvas!');