Spaces:
Running
Running
Update index.html
Browse files- index.html +15 -6
index.html
CHANGED
|
@@ -171,12 +171,21 @@
|
|
| 171 |
|
| 172 |
// --- default data with alternating pattern ---
|
| 173 |
let data = {
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
|
| 181 |
// simple token estimator (char ~0.25 token, but for demo we use rough)
|
| 182 |
function estimateTokens(str) {
|
|
|
|
| 171 |
|
| 172 |
// --- default data with alternating pattern ---
|
| 173 |
let data = {
|
| 174 |
+
"messages": [
|
| 175 |
+
{
|
| 176 |
+
"role": "system",
|
| 177 |
+
"content": "You are a helpful assistant."
|
| 178 |
+
},
|
| 179 |
+
{
|
| 180 |
+
"role": "user",
|
| 181 |
+
"content": "hi"
|
| 182 |
+
},
|
| 183 |
+
{
|
| 184 |
+
"role": "assistant",
|
| 185 |
+
"content": "."
|
| 186 |
+
}
|
| 187 |
+
]
|
| 188 |
+
};
|
| 189 |
|
| 190 |
// simple token estimator (char ~0.25 token, but for demo we use rough)
|
| 191 |
function estimateTokens(str) {
|