generated from KeyMatrix/KeyMatrix
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathweb_interface.html
More file actions
24 lines (24 loc) · 661 Bytes
/
web_interface.html
File metadata and controls
24 lines (24 loc) · 661 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html>
<html>
<head>
<title>KeyMatrix Interface</title>
</head>
<body>
<h1>KeyMatrix Core12</h1>
<input id="query" placeholder="Введите запрос">
<button onclick="askAI()">Отправить</button>
<div id="response"></div>
<script>
function askAI() {
const query = document.getElementById('query').value;
fetch('/ask', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ query })
})
.then(response => response.json())
.then(data => document.getElementById('response').textContent = data.answer);
}
</script>
</body>
</html>