Spaces:
Sleeping
Sleeping
File size: 9,247 Bytes
6575706 1c2d73c 6575706 1c2d73c 6575706 1c2d73c 6575706 1c2d73c 6575706 1c2d73c 6575706 1c2d73c 6575706 1c2d73c 6575706 1c2d73c 6575706 1c2d73c 6575706 1c2d73c 6575706 1c2d73c 6575706 1c2d73c 6575706 1c2d73c 6575706 1c2d73c 6575706 1c2d73c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RAG κ²μ μ±λ΄</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/device-style.css') }}">
</head>
<body>
<div class="container">
<header>
<h1>RAG κ²μ μ±λ΄</h1>
<div class="header-actions">
<div class="llm-selector">
<label for="llmSelect">LLM μ ν:</label>
<select id="llmSelect">
</select>
</div>
<div class="user-info">
<span>μ¬μ©μ: {% if session.username %}{{ session.username }}{% else %}μλ{% endif %}</span>
<a href="{{ url_for('logout') }}" class="logout-button">
<i class="fas fa-sign-out-alt"></i> λ‘κ·Έμμ
</a>
</div>
</div>
<div class="tabs">
<button id="chatTab" class="tab active">λν</button>
<button id="docsTab" class="tab">λ¬Έμκ΄λ¦¬</button>
<button id="deviceTab" class="tab">μ₯μΉμ μ΄</button>
</div>
</header>
<main>
<section id="chatSection" class="tab-content active">
<div class="chat-container">
<div class="chat-messages" id="chatMessages">
<div class="message system">
<div class="message-content">
<p>μλ
νμΈμ! μ§μλ² μ΄μ€μ λν΄ κΆκΈν μ μ λ¬Όμ΄λ³΄μΈμ. μμ±μΌλ‘ μ§λ¬Ένμλ €λ©΄ λ§μ΄ν¬ λ²νΌμ λλ₯΄μΈμ.</p>
</div>
</div>
</div>
<div class="chat-input-container">
<textarea id="userInput" placeholder="λ©μμ§λ₯Ό μ
λ ₯νμΈμ..." rows="1"></textarea>
<button id="micButton" class="mic-button">
<i class="fas fa-microphone"></i>
</button>
<button id="sendButton" class="send-button">
<i class="fas fa-paper-plane"></i>
</button>
</div>
<div id="recordingStatus" class="recording-status hidden">
<div class="recording-indicator">
<div class="recording-pulse"></div>
</div>
<span>λ
Ήμ μ€...</span>
<button id="stopRecordingButton" class="stop-recording-button">
<i class="fas fa-stop"></i>
</button>
</div>
</div>
</section>
<section id="docsSection" class="tab-content">
<div class="docs-container">
<div class="upload-section">
<h2>λ¬Έμ μ
λ‘λ</h2>
<p>μ§μλ² μ΄μ€μ μΆκ°ν λ¬Έμλ₯Ό μ
λ‘λνμΈμ. (μ§μ νμ: .txt, .md, .csv)</p>
<form id="uploadForm" enctype="multipart/form-data">
<div class="file-upload">
<input type="file" id="documentFile" name="document" accept=".txt,.md,.csv">
<label for="documentFile">νμΌ μ ν</label>
<span id="fileName">μ νλ νμΌ μμ</span>
</div>
<button type="submit" id="uploadButton" class="upload-button">
<i class="fas fa-upload"></i> μ
λ‘λ
</button>
</form>
<div id="uploadStatus" class="upload-status hidden"></div>
</div>
<div class="docs-list-section">
<h2>λ¬Έμ λͺ©λ‘</h2>
<button id="refreshDocsButton" class="refresh-button">
<i class="fas fa-sync-alt"></i> μλ‘κ³ μΉ¨
</button>
<div class="docs-list-container">
<table id="docsList" class="docs-list">
<thead>
<tr>
<th>νμΌλͺ
</th>
<th>μ²ν¬ μ</th>
<th>μ ν</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div id="docsLoading" class="loading-indicator">
<div class="spinner"></div>
<p>λ¬Έμ λ‘λ© μ€...</p>
</div>
<div id="noDocsMessage" class="no-docs-message hidden">
<p>μ§μλ² μ΄μ€μ λ±λ‘λ λ¬Έμκ° μμ΅λλ€. λ¬Έμλ₯Ό μ
λ‘λν΄ μ£ΌμΈμ.</p>
</div>
</div>
</div>
</div>
</section>
<section id="deviceSection" class="tab-content">
<div class="device-connection">
<h3>1. μ₯μΉ μλ² μ°κ²°</h3>
<div class="device-connection-form">
<input type="text" id="deviceServerUrlInput" placeholder="LocalPCAgent Ngrok URL μ
λ ₯ (https://xxxx-xx-xxx-xxx.ngrok-free.app νμ)">
<button id="connectDeviceServerBtn">μ°κ²°</button>
</div>
<div id="deviceConnectionStatus" class="connection-status disconnected">μ°κ²° μν: μ°κ²°λμ§ μμ</div>
</div>
<div id="deviceBasicFunctions" class="device-functions">
<h3>2. κΈ°λ³Έ κΈ°λ₯</h3>
<div class="function-buttons">
<button id="checkDeviceStatusBtn">μ₯μΉ μν νμΈ</button>
</div>
<textarea id="deviceStatusResult" class="device-status-result" readonly></textarea>
</div>
<div id="deviceProgramControl" class="program-control">
<h3>3. νλ‘κ·Έλ¨ μ€ν</h3>
<div class="function-buttons">
<button id="getProgramsBtn">νλ‘κ·Έλ¨ λͺ©λ‘ μλ‘κ³ μΉ¨</button>
</div>
<div id="programsList" class="program-list-container">
<div class="no-programs-message">νλ‘κ·Έλ¨ λͺ©λ‘μ΄ μ¬κΈ°μ νμλ©λλ€.</div>
</div>
<div class="program-select-container">
<select id="programSelectDropdown">
<option value="">-- λͺ©λ‘ μλ‘κ³ μΉ¨ ν μ ν --</option>
</select>
</div>
<button id="executeProgramBtn" class="execute-btn" disabled>μ νν νλ‘κ·Έλ¨ μ€ν</button>
<div id="executeResult" class="execute-result"></div>
</div>
<div id="deviceCustomControl" class="program-control">
<h3>4. μ¬μ©μ μ μ νλ‘κ·Έλ¨ μ€ν</h3>
<div class="custom-command-container">
<input type="text" id="customCommandInput" placeholder="μ€νν λͺ
λ Ήμ΄ λλ νλ‘κ·Έλ¨ κ²½λ‘ μ
λ ₯">
<button id="executeCustomBtn">μ€ν</button>
</div>
<div id="customExecuteResult" class="execute-result"></div>
</div>
<div id="devicePortScanControl" class="program-control"> <h3>5. μ₯μΉ ν¬νΈ μ‘°ν</h3>
<div class="function-buttons">
<button id="scanPortsBtn">μ₯μΉ ν¬νΈ μ€μΊ</button>
</div>
<div id="portsStatus" class="ports-status"></div> <div id="portsResults" class="ports-results"></div> </div>
</section>
</main>
<footer>
<p>Β© 2025 RAG κ²μ μ±λ΄ | OpenAI/DeepSeek LLM & VITO STT νμ©</p>
<div class="current-llm">
<span>Current LLM: </span>
<span id="currentLLMInfo">-</span>
</div>
</footer>
</div>
<script src="{{ url_for('static', filename='js/app-core.js') }}"></script>
<script src="{{ url_for('static', filename='js/app-device.js') }}"></script>
<script src="{{ url_for('static', filename='js/app.js') }}"></script>
</body>
</html> |