goodgoals commited on
Commit
eb190f3
·
verified ·
1 Parent(s): 77144ec

Delete index.html

Browse files
Files changed (1) hide show
  1. index.html +0 -72
index.html DELETED
@@ -1,72 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="UTF-8">
5
- <title>Verbose GPT-5.2 Chatbot</title>
6
- <script src="https://js.puter.com/v2/"></script>
7
- <style>
8
- body { background:#000; color:#fff; font-family:sans-serif; margin:0; padding:0; display:flex; justify-content:center; align-items:center; height:100vh;}
9
- #chatbox { width:600px; max-width:95%; background:#111; padding:10px; display:flex; flex-direction:column; border:1px solid #333; border-radius:8px; }
10
- #messages { flex:1; overflow-y:auto; height:400px; border:1px solid #333; padding:5px; margin-bottom:5px; background:#000; }
11
- input { width:100%; padding:8px; background:#222; color:#fff; border:none; outline:none; }
12
- </style>
13
- </head>
14
- <body>
15
-
16
- <div id="chatbox">
17
- <div id="messages">--- Verbose GPT-5.2 Chatbot Initialized ---<br></div>
18
- <input id="input" placeholder="Type here and press Enter">
19
- </div>
20
-
21
- <script>
22
- const messagesDiv = document.getElementById("messages");
23
- const input = document.getElementById("input");
24
- const conversation = [{ role:"system", content:"You are a verbose, extremely detailed AI assistant." }];
25
-
26
- function logMessage(role, text){
27
- const div = document.createElement("div");
28
- div.innerHTML = `<b>[${role}]</b> ${text}`;
29
- messagesDiv.appendChild(div);
30
- messagesDiv.scrollTop = messagesDiv.scrollHeight;
31
- console.log(`[${role}] ${text}`); // Also log to console for extreme verbosity
32
- }
33
-
34
- async function send(){
35
- const text = input.value.trim();
36
- if(!text){
37
- logMessage("DEBUG","User input empty, skipping send.");
38
- return;
39
- }
40
- input.value="";
41
- logMessage("DEBUG","User submitted: " + text);
42
- conversation.push({ role:"user", content:text });
43
- logMessage("CONVERSATION STATE","Added user message. Current conversation array length: " + conversation.length);
44
-
45
- try {
46
- logMessage("DEBUG","Sending message to Puter Cloud GPT-5.2...");
47
- const response = await puter.ai.chat({
48
- model:"gpt-5.2",
49
- runtime:"cloud",
50
- messages:conversation
51
- });
52
- logMessage("DEBUG","Received raw response object: " + JSON.stringify(response));
53
-
54
- const reply = response.message?.content || "⚠️ No content returned by GPT-5.2";
55
- conversation.push({ role:"assistant", content:reply });
56
- logMessage("CONVERSATION STATE","Added assistant message. Current conversation array length: " + conversation.length);
57
- logMessage("GPT-5.2", reply);
58
-
59
- } catch(err){
60
- logMessage("ERROR","Caught exception: " + JSON.stringify(err));
61
- }
62
- }
63
-
64
- input.addEventListener("keydown", e=>{
65
- if(e.key==="Enter") send();
66
- });
67
-
68
- logMessage("DEBUG","Chatbot fully loaded, ready for input.");
69
- </script>
70
-
71
- </body>
72
- </html>