OpenManus/templates/index.html
2025-03-18 01:00:01 +08:00

100 lines
4.6 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OpenManus Local Version</title>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
<div class="container">
<div class="history-panel">
<h2>History Tasks</h2>
<div id="task-list" class="task-list"></div>
</div>
<div class="main-panel">
<div id="task-container" class="task-container">
<div class="welcome-message">
<h1>Welcome to OpenManus Local Version</h1>
<p>Please enter a task prompt to start a new task</p>
</div>
<div id="log-container" class="step-container"></div>
</div>
<div id="input-container" class="input-container">
<input
type="text"
id="prompt-input"
placeholder="Enter task prompt..."
onkeypress="if(event.keyCode === 13) createTask()"
>
<button onclick="createTask()">Create Task</button>
</div>
</div>
</div>
<div id="config-modal" class="config-modal">
<div class="config-modal-content">
<div class="config-modal-header">
<h2>System Configuration</h2>
<p>Please fill in the necessary configuration information to continue using the system</p>
</div>
<div class="config-modal-body">
<div class="note-box">
<p>⚠️ Please ensure that the following configuration information is correct.</p>
<p>If you do not have an API key, please obtain one from the corresponding AI service provider.</p>
</div>
<div class="config-section">
<h3>LLM Configuration</h3>
<div class="form-group">
<label for="llm-model">Model Name <span class="required-mark">*</span></label>
<input type="text" id="llm-model" name="llm.model" placeholder="For example: claude-3-5-sonnet">
</div>
<div class="form-group">
<label for="llm-base-url">API Base URL <span class="required-mark">*</span></label>
<input type="text" id="llm-base-url" name="llm.base_url" placeholder="For example: https://api.openai.com/v1">
</div>
<div class="form-group">
<label for="llm-api-key">API Key <span class="required-mark">*</span></label>
<input type="password" id="llm-api-key" name="llm.api_key" placeholder="Your API key, for example: sk-...">
<span class="field-help">Must be your own valid API key, not the placeholder in the example</span>
</div>
<div class="form-group">
<label for="llm-max-tokens">Max Tokens</label>
<input type="number" id="llm-max-tokens" name="llm.max_tokens" placeholder="For example: 4096">
</div>
<div class="form-group">
<label for="llm-temperature">Temperature</label>
<input type="number" id="llm-temperature" name="llm.temperature" step="0.1" placeholder="For example: 0.0">
</div>
</div>
<div class="config-section">
<h3>Server Configuration</h3>
<div class="form-group">
<label for="server-host">Host <span class="required-mark">*</span></label>
<input type="text" id="server-host" name="server.host" placeholder="For example: localhost">
</div>
<div class="form-group">
<label for="server-port">Port <span class="required-mark">*</span></label>
<input type="number" id="server-port" name="server.port" placeholder="For example: 5172">
</div>
</div>
</div>
<div class="config-modal-footer">
<p id="config-error" class="config-error"></p>
<div class="config-actions">
<button id="save-config-btn" class="primary-btn">Save Configuration</button>
</div>
</div>
</div>
</div>
<script src="/static/main.js"></script>
</body>
</html>