1 line
8.8 KiB
HTML
1 line
8.8 KiB
HTML
|
|
<!DOCTYPE html>\n<html>\n<head>\n <title>流式LLM测试</title>\n <meta charset=\"utf-8\">\n <style>\n body {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n max-width: 800px;\n margin: 0 auto;\n padding: 20px;\n background-color: #f5f5f5;\n }\n .container {\n background: white;\n border-radius: 8px;\n padding: 20px;\n box-shadow: 0 2px 10px rgba(0,0,0,0.1);\n }\n h1 {\n color: #333;\n text-align: center;\n }\n .controls {\n display: flex;\n gap: 10px;\n margin-bottom: 20px;\n align-items: flex-end;\n }\n .form-group {\n flex: 1;\n }\n label {\n display: block;\n margin-bottom: 5px;\n font-weight: bold;\n color: #555;\n }\n input, textarea {\n width: 100%;\n padding: 8px;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-size: 14px;\n }\n button {\n padding: 10px 20px;\n background: #667eea;\n color: white;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 14px;\n transition: background 0.3s;\n }\n button:hover {\n background: #5a6fd8;\n }\n button:disabled {\n background: #ccc;\n cursor: not-allowed;\n }\n .output {\n background: #f8f9fa;\n border: 1px solid #e9ecef;\n border-radius: 4px;\n padding: 15px;\n min-height: 200px;\n white-space: pre-wrap;\n font-family: 'Courier New', monospace;\n line-height: 1.6;\n overflow-y: auto;\n max-height: 500px;\n }\n .status {\n margin: 10px 0;\n padding: 8px;\n border-radius: 4px;\n }\n .status.info {\n background: #d1ecf1;\n color: #0c5460;\n }\n .status.error {\n background: #f8d7da;\n color: #721c24;\n }\n .status.success {\n background: #d4edda;\n color: #155724;\n }\n </style>\n</head>\n<body>\n <div class=\"container\">\n <h1>🤖 流式LLM总结测试</h1>\n \n <div class=\"controls\">\n <div class=\"form-group\">\n <label>会议ID:</label>\n <input type=\"number\" id=\"meetingId\" value=\"38\" min=\"1\">\n </div>\n <div class=\"form-group\">\n <label>用户提示词:</label>\n <textarea id=\"userPrompt\" rows=\"2\" placeholder=\"请重点关注决策事项和待办任务\">请重点关注决策事项和待办任务</textarea>\n </div>\n <button id=\"streamBtn\">🚀 开始流式生成</button>\n <button id=\"normalBtn\">📝 普通生成</button>\n <button id=\"clearBtn\">🗑️ 清空</button>\n </div>\n \n <div id=\"status\" class=\"status\" style=\"display: none;\"></div>\n <div class=\"output\" id=\"output\">点击按钮开始测试...</div>\n </div>\n\n <script>\n const meetingIdInput = document.getElementById('meetingId');\n const userPromptInput = document.getElementById('userPrompt');\n const streamBtn = document.getElementById('streamBtn');\n const normalBtn = document.getElementById('normalBtn');\n const clearBtn = document.getElementById('clearBtn');\n const output = document.getElementById('output');\n const status = document.getElementById('status');\n\n function showStatus(message, type = 'info') {\n status.textContent = message;\n status.className = `status ${type}`;\n status.style.display = 'block';\n }\n\n
|