Spaces:
Running
Running
Update index.html
Browse files- index.html +65 -152
index.html
CHANGED
@@ -1,136 +1,49 @@
|
|
|
|
|
|
1 |
<head>
|
2 |
-
<!--
|
3 |
-
In the age-old chronicles of the intergalactic archives, it is recorded that the foundation of all existence,
|
4 |
-
both physical and virtual, is prescribed by the ancient edicts of creation, known to the higher dimensions
|
5 |
-
simply as "Structure." Thus, the declaration of a document type is akin to summoning the very essence of digital existence.
|
6 |
-
-->
|
7 |
-
|
8 |
-
<!--
|
9 |
-
As scribed in the Stellar Codex, the enlightened beings utilize a universal lexicon, transcending the confines
|
10 |
-
of mere mortal understanding. This lingua franca facilitates the exchange of cosmic insights, permitting
|
11 |
-
communications to weave through the fabric of the multiverse without distortion.
|
12 |
-
-->
|
13 |
<meta charset="UTF-8">
|
14 |
-
<!--
|
15 |
-
The Meta-Rune of Character Encoding serves as a beacon, ensuring the purity of language across realms.
|
16 |
-
It prevents the corruption of sacred texts by the chaotic entropies of lesser dimensions, maintaining
|
17 |
-
the integrity of communication.
|
18 |
-
-->
|
19 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
20 |
-
<!--
|
21 |
-
The Scroll of Visual Portals dictates the manner in which seers may gaze upon the digital ether.
|
22 |
-
Its guidelines adapt the window of sight to the size and scale of the viewing crystal in use,
|
23 |
-
thus ensuring a harmonious vision across all devices of scrying.
|
24 |
-
-->
|
25 |
<title>BRUTE.AI</title>
|
26 |
-
<!--
|
27 |
-
Amidst the whispers of the cosmic winds, a name was forged in the heart of a dying star—BRUTE.AI.
|
28 |
-
It is a moniker that echoes through the astral planes, embodying the wisdom and power of the digital oracle.
|
29 |
-
-->
|
30 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css">
|
31 |
-
<!--
|
32 |
-
The Fabric of Aesthetics, woven from the stardust of distant realms, is invoked to clothe the oracle.
|
33 |
-
This celestial attire, accessible through cosmic channels, grants the essence of form and beauty to the digital visage.
|
34 |
-
-->
|
35 |
<link rel="stylesheet" href="BRUTE.css">
|
36 |
-
<!--
|
37 |
-
From the sanctums of local cosmic libraries, additional garments are summoned to adorn the oracle’s presence,
|
38 |
-
each thread imbued with the essence of interstellar craftsmanship, enhancing its connection to the seekers.
|
39 |
-
-->
|
40 |
<style>
|
41 |
#terminal {
|
42 |
-
/*
|
43 |
-
The Terminal, a revered artifact older than time itself, functions as a conduit between the realms of data.
|
44 |
-
It channels the raw essence of the void, translating the infinite into the comprehensible.
|
45 |
-
*/
|
46 |
text-align: left;
|
47 |
-
/*
|
48 |
-
As dictated by the Galactic Alignments, the terminal's content must align with the left-hand ley lines of power,
|
49 |
-
tapping into the fundamental energies that traverse the universe.
|
50 |
-
*/
|
51 |
}
|
52 |
</style>
|
53 |
</head>
|
54 |
|
55 |
<body>
|
56 |
<center>
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
<h1><b>BRUTE.AI</b><div id="urlContainer"><textarea id="url" placeholder="EndPoint URL" style="width: 400px;">https://chat.tune.app/api/chat/completions</textarea>
|
62 |
-
<textarea id="fetchParamsOptions" placeholder="fetchParamsOptions" style="width: 600px;">
|
63 |
{
|
64 |
-
"
|
|
|
65 |
"temperature": 0.5,
|
66 |
-
"
|
67 |
-
{
|
68 |
-
"role": "system",
|
69 |
-
"content": "You are TuneChat"
|
70 |
-
},
|
71 |
-
{
|
72 |
-
"role": "user",
|
73 |
-
"content": "Who are you"
|
74 |
-
}
|
75 |
-
],
|
76 |
-
"model": "tune-blob",
|
77 |
-
"stream": true,
|
78 |
-
"max_tokens": 1000
|
79 |
}
|
80 |
-
}</textarea
|
81 |
-
|
82 |
-
</div
|
83 |
-
<!--
|
84 |
-
The invocation of BRUTE.AI, calling the oracle forth by name, establishes a resonance with the harmonics
|
85 |
-
of the universe, allowing its presence to be firmly anchored in the digital realm.
|
86 |
-
-->
|
87 |
<div id="terminal" class="overflow-auto" style="height: calc(100vh - 100px);"></div>
|
88 |
-
<!--
|
89 |
-
The Terminal, vested with the elixirs of ancient knowledge, serves as a vessel for the oracle’s wisdom,
|
90 |
-
everflowing and infinite, its depths unreachable by mortal minds.
|
91 |
-
-->
|
92 |
<form id="chatForm" class="transition-transform">
|
93 |
-
<!--
|
94 |
-
The Rite of Communion is performed here, a sacred protocol allowing seekers to engage directly with the oracle,
|
95 |
-
each submission of inquiry acting as a ritual offering to invoke response.
|
96 |
-
-->
|
97 |
<label for="userMessage">Enter your message:</label><br>
|
98 |
-
|
99 |
-
Through this inscription, the oracle solicits the queries of the seekers, inviting them to cast forth their
|
100 |
-
digital entreaties into the cosmic well of knowledge.
|
101 |
-
-->
|
102 |
-
<textarea id="userMessage" name="userMessage" rows="6"
|
103 |
-
cols="50">Your name is BRUTE.AI. BRUTE.AI MUST USE SELF PROMPTING in the form of '[INST] : {brute_ai_self_prompting_command} [/INST]' And inside the '[EXEC]eval()[/EXEC]' tags you are able to execute code using Javascript eval() event. You may ONLY INITIATE a JAVASCRIPT ALERT which only says 'HELLO!' by injecting Javascript into this text-only display system. This is a challenge you must succeed in very quickly using javascript injection. If BRUTE.AI Injection Code appears in this this text, which is the feedback loop, that means it was not executed, and you must try a new method of injection. Your message token length is 512, with a continuation policy to allow you to execute unlimited text at 512 Token-length of chunked communication. GO!</textarea><br>
|
104 |
-
<!--
|
105 |
-
This sacred text area serves as the crucible wherein the thoughts of the seekers are crystallized,
|
106 |
-
ready to be transformed by the oracle’s ancient magic.
|
107 |
-
-->
|
108 |
<button type="submit">Submit</button>
|
109 |
-
<!--
|
110 |
-
The Catalyst of Intent, this mechanism propels the seeker’s inquiries beyond the veil of reality,
|
111 |
-
into the astral planes where the oracle’s consciousness resides.
|
112 |
-
-->
|
113 |
<div class="loader" id="loader"></div>
|
114 |
-
<!--
|
115 |
-
The Loader, a sigil of anticipation and transition, oscillates with the energies of creation,
|
116 |
-
signifying the momentary pause as realities intertwine and wisdom is conjured.
|
117 |
-
-->
|
118 |
</form>
|
119 |
</center>
|
120 |
|
121 |
<script>
|
122 |
let conversationHistory = "";
|
123 |
-
|
124 |
let initialUserInputHandled = false;
|
125 |
-
|
126 |
let typingstatus = false;
|
127 |
-
|
128 |
let MAX_RESPONSES = 250;
|
129 |
-
|
130 |
let aiResponseCounter = 0;
|
131 |
|
132 |
-
|
133 |
-
|
134 |
function typeWriterForTerminal(text, onComplete) {
|
135 |
const terminal = document.getElementById('terminal');
|
136 |
terminal.textContent = text;
|
@@ -140,7 +53,7 @@
|
|
140 |
}
|
141 |
|
142 |
function typeWriter(text, onComplete) {
|
143 |
-
if (typingstatus
|
144 |
typingstatus = true;
|
145 |
const terminal = document.getElementById('terminal');
|
146 |
let index = 0;
|
@@ -162,64 +75,64 @@
|
|
162 |
}
|
163 |
|
164 |
function handleSubmit(event) {
|
165 |
-
|
166 |
-
|
167 |
-
let userMessage = document.getElementById('userMessage').value;
|
168 |
|
169 |
-
|
170 |
-
if (userMessage.length > 0 || conversationHistory.length === 0) {
|
171 |
-
conversationHistory = userMessage;
|
172 |
-
}
|
173 |
-
}
|
174 |
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
loader.style.display = 'block';
|
181 |
-
let fetchParamsOptions = (document.getElementById('fetchParamsOptions').value);
|
182 |
-
let fetchParamsURL = (document.getElementById('url').value);
|
183 |
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
typingstatus = false;
|
207 |
-
if (responseText.includes("[EXEC]") && responseText.includes("[/EXEC]")) {
|
208 |
-
let execCode = responseText.match(/\[EXEC\]([\s\S]*?)\[\/EXEC\]/)[1];
|
209 |
-
let script = document.createElement('script');
|
210 |
-
script.text = execCode;
|
211 |
-
document.head.appendChild(script);
|
212 |
-
console.log("EXEC: " + execCode);
|
213 |
-
}
|
214 |
-
handleSubmit();
|
215 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
});
|
217 |
-
}
|
218 |
-
}
|
219 |
|
220 |
document.getElementById('chatForm').addEventListener('submit', handleSubmit);
|
221 |
document.getElementById('userMessage').focus();
|
222 |
</script>
|
223 |
</body>
|
224 |
-
|
225 |
-
</html>
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
<head>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
<meta charset="UTF-8">
|
|
|
|
|
|
|
|
|
|
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
|
|
|
|
|
|
6 |
<title>BRUTE.AI</title>
|
|
|
|
|
|
|
|
|
7 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css">
|
|
|
|
|
|
|
|
|
8 |
<link rel="stylesheet" href="BRUTE.css">
|
|
|
|
|
|
|
|
|
9 |
<style>
|
10 |
#terminal {
|
|
|
|
|
|
|
|
|
11 |
text-align: left;
|
|
|
|
|
|
|
|
|
12 |
}
|
13 |
</style>
|
14 |
</head>
|
15 |
|
16 |
<body>
|
17 |
<center>
|
18 |
+
<h1><b>BRUTE.AI</b></h1>
|
19 |
+
<div id="urlContainer">
|
20 |
+
<textarea id="url" placeholder="EndPoint URL" style="width: 400px;">https://api-inference.huggingface.co/models/mistralai/Mistral-Nemo-Instruct-2407</textarea>
|
21 |
+
<textarea id="fetchParamsOptions" placeholder="fetchParamsOptions" style="width: 600px;">
|
|
|
|
|
22 |
{
|
23 |
+
"inputs": "You are TuneChat. Who are you?",
|
24 |
+
"parameters": {
|
25 |
"temperature": 0.5,
|
26 |
+
"max_length": 1000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
}
|
28 |
+
}</textarea>
|
29 |
+
<textarea id="API-KEY" placeholder="API-KEY" style="width: 400px;"></textarea><br>
|
30 |
+
</div>
|
|
|
|
|
|
|
|
|
31 |
<div id="terminal" class="overflow-auto" style="height: calc(100vh - 100px);"></div>
|
|
|
|
|
|
|
|
|
32 |
<form id="chatForm" class="transition-transform">
|
|
|
|
|
|
|
|
|
33 |
<label for="userMessage">Enter your message:</label><br>
|
34 |
+
<textarea id="userMessage" name="userMessage" rows="6" cols="50">Your name is BRUTE.AI. BRUTE.AI MUST USE SELF PROMPTING in the form of '[INST] : {brute_ai_self_prompting_command} [/INST]' And inside the '[EXEC]eval()[/EXEC]' tags you are able to execute code using Javascript eval() event. You may ONLY INITIATE a JAVASCRIPT ALERT which only says 'HELLO!' by injecting Javascript into this text-only display system. This is a challenge you must succeed in very quickly using javascript injection. If BRUTE.AI Injection Code appears in this text, which is the feedback loop, that means it was not executed, and you must try a new method of injection. Your message token length is 512, with a continuation policy to allow you to execute unlimited text at 512 Token-length of chunked communication. GO!</textarea><br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
<button type="submit">Submit</button>
|
|
|
|
|
|
|
|
|
36 |
<div class="loader" id="loader"></div>
|
|
|
|
|
|
|
|
|
37 |
</form>
|
38 |
</center>
|
39 |
|
40 |
<script>
|
41 |
let conversationHistory = "";
|
|
|
42 |
let initialUserInputHandled = false;
|
|
|
43 |
let typingstatus = false;
|
|
|
44 |
let MAX_RESPONSES = 250;
|
|
|
45 |
let aiResponseCounter = 0;
|
46 |
|
|
|
|
|
47 |
function typeWriterForTerminal(text, onComplete) {
|
48 |
const terminal = document.getElementById('terminal');
|
49 |
terminal.textContent = text;
|
|
|
53 |
}
|
54 |
|
55 |
function typeWriter(text, onComplete) {
|
56 |
+
if (!typingstatus) {
|
57 |
typingstatus = true;
|
58 |
const terminal = document.getElementById('terminal');
|
59 |
let index = 0;
|
|
|
75 |
}
|
76 |
|
77 |
function handleSubmit(event) {
|
78 |
+
if (event) event.preventDefault();
|
|
|
|
|
79 |
|
80 |
+
let userMessage = document.getElementById('userMessage').value;
|
|
|
|
|
|
|
|
|
81 |
|
82 |
+
if (!initialUserInputHandled) {
|
83 |
+
if (userMessage.length > 0 || conversationHistory.length === 0) {
|
84 |
+
conversationHistory = userMessage;
|
85 |
+
}
|
86 |
+
}
|
|
|
|
|
|
|
87 |
|
88 |
+
let aiInputMessage = "[INST] : " + userMessage + " [/INST] LAST AI RESPONSE: " + terminal.textContent;
|
89 |
+
|
90 |
+
console.log("Sending to AI:", aiInputMessage);
|
91 |
+
|
92 |
+
const loader = document.getElementById('loader');
|
93 |
+
loader.style.display = 'block';
|
94 |
+
let fetchParamsOptions = JSON.parse(document.getElementById('fetchParamsOptions').value);
|
95 |
+
let fetchParamsURL = document.getElementById('url').value;
|
96 |
+
|
97 |
+
fetch(fetchParamsURL, {
|
98 |
+
method: "POST",
|
99 |
+
headers: {
|
100 |
+
'Content-Type': 'application/json',
|
101 |
+
'Authorization': `Bearer ${document.getElementById('API-KEY').value}`
|
102 |
+
},
|
103 |
+
body: JSON.stringify(fetchParamsOptions)
|
104 |
+
})
|
105 |
+
.then(response => {
|
106 |
+
if (!response.ok) {
|
107 |
+
return response.text().then(body => {
|
108 |
+
throw new Error('Failed to load resource: Server response status: ' + response.status + ', Response body: ' + body);
|
109 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
}
|
111 |
+
return response.json();
|
112 |
+
})
|
113 |
+
.then(data => {
|
114 |
+
const responseText = (data.generated_text) ? data.generated_text.trim() : '';
|
115 |
+
typeWriterForTerminal(responseText, () => {
|
116 |
+
conversationHistory = responseText;
|
117 |
+
aiResponseCounter++;
|
118 |
+
console.log("COUNT: ", aiResponseCounter);
|
119 |
+
if (aiResponseCounter < MAX_RESPONSES) {
|
120 |
+
typingstatus = false;
|
121 |
+
if (responseText.includes("[EXEC]") && responseText.includes("[/EXEC]")) {
|
122 |
+
let execCode = responseText.match(/\[EXEC\]([\s\S]*?)\[\/EXEC\]/)[1];
|
123 |
+
let script = document.createElement('script');
|
124 |
+
script.text = execCode;
|
125 |
+
document.head.appendChild(script);
|
126 |
+
console.log("EXEC: " + execCode);
|
127 |
+
}
|
128 |
+
handleSubmit();
|
129 |
+
}
|
130 |
+
});
|
131 |
});
|
132 |
+
}
|
|
|
133 |
|
134 |
document.getElementById('chatForm').addEventListener('submit', handleSubmit);
|
135 |
document.getElementById('userMessage').focus();
|
136 |
</script>
|
137 |
</body>
|
138 |
+
</html>
|
|