Implemented new Japanese only text mode with WebUI toggle, utilizing a llama3.1 swallow dataset model. Next up is Japanese TTS.
This commit is contained in:
@@ -660,10 +660,11 @@
|
||||
<button class="tab-button active" onclick="switchTab('tab1')">Server Management</button>
|
||||
<button class="tab-button" onclick="switchTab('tab2')">Actions</button>
|
||||
<button class="tab-button" onclick="switchTab('tab3')">Status</button>
|
||||
<button class="tab-button" onclick="switchTab('tab4')">🎨 Image Generation</button>
|
||||
<button class="tab-button" onclick="switchTab('tab5')">📊 Autonomous Stats</button>
|
||||
<button class="tab-button" onclick="switchTab('tab6')">💬 Chat with LLM</button>
|
||||
<button class="tab-button" onclick="switchTab('tab7')">📞 Voice Call</button>
|
||||
<button class="tab-button" onclick="switchTab('tab4')">⚙️ LLM Settings</button>
|
||||
<button class="tab-button" onclick="switchTab('tab5')">🎨 Image Generation</button>
|
||||
<button class="tab-button" onclick="switchTab('tab6')">📊 Autonomous Stats</button>
|
||||
<button class="tab-button" onclick="switchTab('tab7')">💬 Chat with LLM</button>
|
||||
<button class="tab-button" onclick="switchTab('tab8')">📞 Voice Call</button>
|
||||
<button class="tab-button" onclick="window.location.href='/static/system.html'">🎛️ System Settings</button>
|
||||
</div>
|
||||
|
||||
@@ -1173,8 +1174,70 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Image Generation Tab Content -->
|
||||
<!-- LLM Settings Tab Content -->
|
||||
<div id="tab4" class="tab-content">
|
||||
<div class="section">
|
||||
<h3>⚙️ Language Model Settings</h3>
|
||||
<p>Configure language model behavior and language mode.</p>
|
||||
|
||||
<!-- Language Mode Section -->
|
||||
<div style="margin-bottom: 1.5rem; padding: 1rem; background: #2a2a2a; border-radius: 4px; border: 2px solid #4a7bc9;">
|
||||
<h4 style="margin-top: 0; color: #61dafb;">🌐 Language Mode</h4>
|
||||
<p style="margin: 0.5rem 0; color: #aaa;">Switch Miku between English and Japanese responses.</p>
|
||||
|
||||
<div style="margin: 1rem 0;">
|
||||
<div style="margin-bottom: 1rem;">
|
||||
<strong>Current Language:</strong> <span id="current-language-display" style="color: #61dafb; font-weight: bold;">English</span>
|
||||
</div>
|
||||
<button onclick="toggleLanguageMode()" style="background: #4a7bc9; color: #fff; padding: 0.6rem 1.2rem; border: 2px solid #61dafb; border-radius: 4px; cursor: pointer; font-weight: bold; font-size: 1rem;">
|
||||
🔄 Toggle Language (English ↔ Japanese)
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 1rem; padding: 1rem; background: #1a1a1a; border-radius: 4px; border-left: 3px solid #4a7bc9;">
|
||||
<div style="font-size: 0.9rem;">
|
||||
<div style="margin-bottom: 0.5rem;"><strong>English Mode:</strong></div>
|
||||
<ul style="margin: 0 0 0.5rem 0; padding-left: 1.5rem; color: #aaa;">
|
||||
<li>Uses standard Llama 3.1 model</li>
|
||||
<li>Responds in English only</li>
|
||||
</ul>
|
||||
|
||||
<div style="margin-bottom: 0.5rem;"><strong>Japanese Mode (日本語):</strong></div>
|
||||
<ul style="margin: 0 0 0; padding-left: 1.5rem; color: #aaa;">
|
||||
<li>Uses Llama 3.1 Swallow model (trained for Japanese)</li>
|
||||
<li>Responds entirely in Japanese</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Language Mode Status Section -->
|
||||
<div style="margin-bottom: 1.5rem; padding: 1rem; background: #2a2a2a; border-radius: 4px;">
|
||||
<h4 style="margin-top: 0;">📊 Current Status</h4>
|
||||
<div id="language-status-display" style="background: #1a1a1a; padding: 1rem; border-radius: 4px; font-family: monospace; font-size: 0.9rem;">
|
||||
<p style="margin: 0.5rem 0;"><strong>Language Mode:</strong> <span id="status-language">English</span></p>
|
||||
<p style="margin: 0.5rem 0;"><strong>Active Model:</strong> <span id="status-model">llama3.1</span></p>
|
||||
<p style="margin: 0.5rem 0;"><strong>Available Languages:</strong> English, 日本語 (Japanese)</p>
|
||||
</div>
|
||||
<button onclick="refreshLanguageStatus()" style="margin-top: 1rem;">🔄 Refresh Status</button>
|
||||
</div>
|
||||
|
||||
<!-- Information Section -->
|
||||
<div style="padding: 1rem; background: #1a1a1a; border-radius: 4px; border-left: 3px solid #ff9800;">
|
||||
<h4 style="margin-top: 0; color: #ff9800;">ℹ️ How Language Mode Works</h4>
|
||||
<ul style="margin: 0.5rem 0; padding-left: 1.5rem; font-size: 0.9rem; color: #aaa;">
|
||||
<li>English mode uses your default text model for English responses</li>
|
||||
<li>Japanese mode switches to Swallow and responds only in 日本語</li>
|
||||
<li>All personality traits, mood system, and features work in both modes</li>
|
||||
<li>Language mode is global - affects all servers and DMs</li>
|
||||
<li>Conversation history is preserved across language switches</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Image Generation Tab Content -->
|
||||
<div id="tab5" class="tab-content">
|
||||
<div class="section">
|
||||
<h3>🎨 Image Generation System</h3>
|
||||
<p>Natural language image generation powered by ComfyUI. Users can ask Miku to create images naturally without commands!</p>
|
||||
@@ -1232,7 +1295,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Autonomous Stats Tab Content -->
|
||||
<div id="tab5" class="tab-content">
|
||||
<div id="tab6" class="tab-content">
|
||||
<div class="section">
|
||||
<h3>📊 Autonomous V2 Decision Engine Stats</h3>
|
||||
<p>Real-time monitoring of Miku's autonomous decision-making context and mood-based personality stats.</p>
|
||||
@@ -1250,7 +1313,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Chat with LLM Tab Content -->
|
||||
<div id="tab6" class="tab-content">
|
||||
<div id="tab7" class="tab-content">
|
||||
<div class="section">
|
||||
<h3>💬 Chat with LLM</h3>
|
||||
<p>Direct chat interface with the language models. Test responses, experiment with prompts, or just chat with Miku!</p>
|
||||
@@ -1375,8 +1438,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tab 7: Voice Call Management -->
|
||||
<div id="tab7" class="tab-content">
|
||||
<!-- Tab 8: Voice Call Management -->
|
||||
<div id="tab8" class="tab-content">
|
||||
<div class="section">
|
||||
<h3>📞 Initiate Voice Call</h3>
|
||||
<p>Start an automated voice chat session with a user. Miku will automatically manage containers, join voice chat, and send an invitation DM.</p>
|
||||
@@ -1559,6 +1622,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
checkEvilModeStatus(); // Check evil mode on load
|
||||
checkBipolarModeStatus(); // Check bipolar mode on load
|
||||
checkGPUStatus(); // Check GPU selection on load
|
||||
refreshLanguageStatus(); // Check language mode on load
|
||||
console.log('🚀 DOMContentLoaded - initializing figurine subscribers list');
|
||||
refreshFigurineSubscribers();
|
||||
loadProfilePictureMetadata();
|
||||
@@ -2251,6 +2315,43 @@ async function calmMiku() {
|
||||
}
|
||||
}
|
||||
|
||||
// ===== Language Mode Functions =====
|
||||
async function refreshLanguageStatus() {
|
||||
try {
|
||||
const result = await apiCall('/language');
|
||||
document.getElementById('current-language-display').textContent =
|
||||
result.language_mode === 'japanese' ? '日本語 (Japanese)' : 'English';
|
||||
document.getElementById('status-language').textContent =
|
||||
result.language_mode === 'japanese' ? '日本語 (Japanese)' : 'English';
|
||||
document.getElementById('status-model').textContent = result.current_model;
|
||||
|
||||
console.log('Language status:', result);
|
||||
} catch (error) {
|
||||
console.error('Failed to get language status:', error);
|
||||
showNotification('Failed to load language status', 'error');
|
||||
}
|
||||
}
|
||||
|
||||
async function toggleLanguageMode() {
|
||||
try {
|
||||
const result = await apiCall('/language/toggle', 'POST');
|
||||
|
||||
// Update UI
|
||||
document.getElementById('current-language-display').textContent =
|
||||
result.language_mode === 'japanese' ? '日本語 (Japanese)' : 'English';
|
||||
document.getElementById('status-language').textContent =
|
||||
result.language_mode === 'japanese' ? '日本語 (Japanese)' : 'English';
|
||||
document.getElementById('status-model').textContent = result.model_now_using;
|
||||
|
||||
// Show notification
|
||||
showNotification(result.message, 'success');
|
||||
console.log('Language toggled:', result);
|
||||
} catch (error) {
|
||||
console.error('Failed to toggle language mode:', error);
|
||||
showNotification('Failed to toggle language mode', 'error');
|
||||
}
|
||||
}
|
||||
|
||||
// Evil Mode Functions
|
||||
async function checkEvilModeStatus() {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user