-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
100 lines (95 loc) · 4.95 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>ChatGPT</title>
<link rel="icon" href="static/images/favicon.ico" type="image/svg+xml">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<link rel="stylesheet" href="static/styles/layout.css">
<link rel="stylesheet" href="static/styles/settings.css">
<link rel="stylesheet" href="static/styles/components.css">
<link rel="stylesheet" href="static/styles/mobile.css">
<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
</head>
<body>
<div class="chat-container">
<button id="settings-button" class="settings-button" onclick="openSettings()" disabled>
<i class="fas fa-cog"></i>
</button>
<div class="chat-messages" id="chat-messages"></div>
<div class="chat-input">
<input type="text" id="message" placeholder="Enter your message" onkeydown="checkEnter(event)"
oninput="checkMessage()">
<button id="send-button" onclick="sendMessage()" class="send-button" data-i18n-title="send" disabled>
<i class="fas fa-paper-plane"></i>
</button>
</div>
</div>
<!-- Modal for settings -->
<div id="settings-modal" class="modal">
<div class="modal-content">
<div class="modal-header">
<h3 data-i18n="settings">Settings</h3>
<span class="close" onclick="closeSettings()">×</span>
</div>
<h4 data-i18n="api-settings">API Settings</h4>
<div class="input-group">
<label for="base-url">Base URL:</label>
<input type="text" id="base-url" placeholder="Base URL">
</div>
<div class="input-group">
<label for="api-key">API Key:</label>
<input type="text" id="api-key" placeholder="API Key">
</div>
<div class="button-container-end">
<button id="ok-config-button" onclick="updateConfig();" data-i18n="save">Save</button>
</div>
<div class="input-group">
<label for="model-select" data-i18n="model">Model</label>
<div class="model-selector-container">
<select id="model-select" onchange="setModel(this.value)">
<option value="gpt-4o-stream">4o with stream</option>
<option value="gpt-4o">4o</option>
<option value="gpt-4o-mini-stream">4o mini with stream</option>
<option value="gpt-4o-mini">4o mini</option>
<option value="o1-preview-stream">o1 preview with stream</option>
<option value="o1-preview">o1 preview</option>
<option value="o1-mini-stream">o1 mini with stream</option>
<option value="o1-mini">o1 mini</option>
<option value="custom" data-i18n="custom">Custom</option>
</select>
<input type="text" id="custom-model-name" class="custom-model-input" placeholder="Model Name"
style="display:none;" oninput="updateCustomModel()">
</div>
</div>
<h4 data-i18n="history">Chat History</h4>
<div class="input-group">
<input type="text" id="uuid" placeholder="UUID">
</div>
<div class="button-container-start" style="display: flex; justify-content: space-between;">
<button id="sync-button" onclick="syncMessages();closeSettings();" data-i18n="sync">sync</button>
<button id="clear-button" class="clear-button" onclick="clearMemory();closeSettings();"
data-i18n="clear">Clear</button>
</div>
<div class="input-group">
<label for="language-select" data-i18n="language">Language:</label>
<select id="language-select" onchange="setLanguage(this.value)">
<option value="en">English</option>
<option value="zh-cn">简体中文</option>
<option value="zh-hk">繁體中文</option>
<option value="fr">Français</option>
<option value="de">Deutsch</option>
<option value="es">Español</option>
</select>
</div>
</div>
</div>
<script src="static/scripts/formatter.js"></script>
<script src="static/scripts/message.js"></script>
<script src="static/scripts/main.js"></script>
<script src="static/scripts/i18n.js"></script>
<script src="static/scripts/model.js"></script>
</body>
</html>