# ๐ŸŽฎ Web UI User Guide - Language Toggle ## Where to Find It ### Step 1: Open Web UI ``` http://localhost:8000/static/ ``` ### Step 2: Find the Tab Look at the tab navigation bar at the top: ``` [Server Management] [Actions] [Status] [โš™๏ธ LLM Settings] [๐ŸŽจ Image Generation] โ†‘ CLICK HERE ``` **The "โš™๏ธ LLM Settings" tab is located:** - Between "Status" tab (on the left) - And "๐ŸŽจ Image Generation" tab (on the right) ### Step 3: Click the Tab Click on "โš™๏ธ LLM Settings" to open the language mode settings. --- ## What You'll See ### Main Button ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ ๐Ÿ”„ Toggle Language (English โ†” Japanese) โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` **Button Properties:** - **Background:** Blue (#4a7bc9) - **Border:** 2px solid cyan (#61dafb) - **Text:** White, bold, large font - **Size:** Fills width of section - **Cursor:** Changes to pointer on hover --- ## How to Use ### Step 1: Read Current Language At the top of the tab, you'll see: ``` Current Language: English ``` ### Step 2: Click the Toggle Button ``` ๐Ÿ”„ Toggle Language (English โ†” Japanese) ``` ### Step 3: Watch It Change The display will immediately update: - "Current Language" will change - "Active Model" will change - A notification will appear saying: ``` โœ… Miku is now speaking in JAPANESE! ``` ### Step 4: Send a Message to Miku Go to Discord and send any message to Miku. She will respond in the selected language! --- ## The Tab Layout ``` โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— โ•‘ โš™๏ธ Language Model Settings โ•‘ โ•‘ Configure language model behavior and language mode. โ•‘ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— โ•‘ ๐ŸŒ Language Mode [BLUE SECTION] โ•‘ โ• โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฃ โ•‘ Switch Miku between English and Japanese responses. โ•‘ โ•‘ โ•‘ โ•‘ Current Language: English โ•‘ โ•‘ โ•‘ โ•‘ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ•‘ โ•‘ โ”‚ ๐Ÿ”„ Toggle Language (English โ†” Japanese) โ”‚ โ•‘ โ•‘ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ•‘ โ•‘ โ•‘ โ•‘ English Mode: โ•‘ โ•‘ โ€ข Uses standard Llama 3.1 model โ•‘ โ•‘ โ€ข Responds in English only โ•‘ โ•‘ โ•‘ โ•‘ Japanese Mode (ๆ—ฅๆœฌ่ชž): โ•‘ โ•‘ โ€ข Uses Llama 3.1 Swallow model โ•‘ โ•‘ โ€ข Responds entirely in Japanese โ•‘ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— โ•‘ ๐Ÿ“Š Current Status โ•‘ โ• โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฃ โ•‘ Language Mode: English โ•‘ โ•‘ Active Model: llama3.1 โ•‘ โ•‘ Available Languages: English, ๆ—ฅๆœฌ่ชž (Japanese) โ•‘ โ•‘ โ•‘ โ•‘ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ•‘ โ•‘ โ”‚ ๐Ÿ”„ Refresh Status โ”‚ โ•‘ โ•‘ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ•‘ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— โ•‘ โ„น๏ธ How Language Mode Works [ORANGE INFORMATION PANEL] โ•‘ โ• โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฃ โ•‘ โ€ข English mode uses your default text model โ•‘ โ•‘ โ€ข Japanese mode switches to Swallow โ•‘ โ•‘ โ€ข All personality traits work in both modes โ•‘ โ•‘ โ€ข Language mode is global - affects all servers/DMs โ•‘ โ•‘ โ€ข Conversation history is preserved across switches โ•‘ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• ``` --- ## Button Interactions ### Click the Toggle Button **Before Click:** ``` Current Language: English Active Model: llama3.1 ``` **Click:** ``` ๐Ÿ”„ Toggle Language (English โ†” Japanese) [Sending request to server...] ``` **After Click:** ``` Current Language: ๆ—ฅๆœฌ่ชž (Japanese) Active Model: swallow Notification at bottom-right: โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โœ… Miku is now speaking in JAPANESE! โ”‚ โ”‚ [fades away after 3 seconds] โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` --- ## Real-World Workflow ### Scenario: Testing English to Japanese **1. Start (English Mode)** ``` Web UI shows: - Current Language: English - Active Model: llama3.1 Discord: You: "Hello Miku!" Miku: "Hi there! ๐ŸŽถ How are you today?" ``` **2. Toggle Language** ``` Click: ๐Ÿ”„ Toggle Language (English โ†” Japanese) Notification: "Miku is now speaking in JAPANESE!" Web UI shows: - Current Language: ๆ—ฅๆœฌ่ชž (Japanese) - Active Model: swallow ``` **3. Send Message in Japanese** ``` Discord: You: "ใ“ใ‚“ใซใกใฏใ€ใƒŸใ‚ฏ๏ผ" Miku: "ใ“ใ‚“ใซใกใฏ๏ผๅ…ƒๆฐ—ใงใ™ใ‹๏ผŸ๐ŸŽถโœจ" ``` **4. Toggle Back to English** ``` Click: ๐Ÿ”„ Toggle Language (English โ†” Japanese) Notification: "Miku is now speaking in ENGLISH!" Web UI shows: - Current Language: English - Active Model: llama3.1 ``` **5. Send Message in English Again** ``` Discord: You: "Hello again!" Miku: "Welcome back! ๐ŸŽค What's up?" ``` --- ## Refresh Status Button ### When to Use - After toggling, if display doesn't update - To sync with server's current setting - To verify language has actually changed ### How to Click ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ ๐Ÿ”„ Refresh Status โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` ### What It Does - Fetches current language from server - Updates all status displays - Confirms server has the right setting --- ## Color Legend In the LLM Settings tab: ๐Ÿ”ต **BLUE** = Active/Primary - Toggle button background - Section borders - Header text ๐Ÿ”ถ **ORANGE** = Information - Information panel accent - Educational content - Help section โšซ **DARK** = Background - Section backgrounds - Content areas - Normal display areas โšช **CYAN** = Emphasis - Current language display - Important text - Header highlights --- ## Status Display Details ### Language Mode Row Shows current language: - `English` = Standard llama3.1 responses - `ๆ—ฅๆœฌ่ชž (Japanese)` = Swallow model responses ### Active Model Row Shows which model is being used: - `llama3.1` = When in English mode - `swallow` = When in Japanese mode ### Available Languages Row Always shows: ``` English, ๆ—ฅๆœฌ่ชž (Japanese) ``` --- ## Notifications When you toggle the language, a notification appears: ### English Mode (Toggle From Japanese) ``` โœ… Miku is now speaking in ENGLISH! ``` ### Japanese Mode (Toggle From English) ``` โœ… Miku is now speaking in JAPANESE! ``` ### Error (If Something Goes Wrong) ``` โŒ Failed to toggle language mode [Check API is running] ``` --- ## Mobile/Tablet Experience On smaller screens: - Tab name may be abbreviated (โš™๏ธ LLM) - Sections stack vertically - Toggle button still full-width - All functionality works the same - Text wraps properly - No horizontal scrolling needed --- ## Keyboard Navigation The buttons are keyboard accessible: - **Tab** - Navigate between buttons - **Enter** - Activate button - **Shift+Tab** - Navigate backwards --- ## Troubleshooting ### Button Doesn't Respond - Check if API server is running - Check browser console for errors (F12) - Try clicking "Refresh Status" first ### Language Doesn't Change - Make sure you see the notification - Check if Swallow model is available - Look at server logs for errors ### Status Shows Wrong Language - Click "Refresh Status" button - Wait a moment and refresh page - Check if bot was recently restarted ### No Notification Appears - Check bottom-right corner of screen - Notification fades after 3 seconds - Check browser console for errors --- ## Quick Reference Card ``` LOCATION: โš™๏ธ LLM Settings tab POSITION: Between Status and Image Generation tabs MAIN ACTION: Click blue toggle button RESULT: Switch English โ†” Japanese DISPLAY UPDATES: - Current Language: English/ๆ—ฅๆœฌ่ชž - Active Model: llama3.1/swallow CONFIRMATION: Green notification appears TESTING: Send message to Miku in Discord RESET: Click "Refresh Status" button ``` --- ## Tips & Tricks 1. **Quick Toggle** - Click the blue button for instant switch 2. **Check Status** - Always visible in the tab (no need to refresh page) 3. **Conversation Continues** - Switching languages preserves history 4. **Mood Still Works** - Use mood system with any language 5. **Global Setting** - One toggle affects all servers/DMs 6. **Refresh Button** - Use if UI seems out of sync with server --- ## Enjoy! Now you can easily switch Miku between English and Japanese! ๐ŸŽคโœจ **That's it! Have fun!** ๐ŸŽ‰