Reality123b commited on
Commit
756a49f
·
verified ·
1 Parent(s): 8e3eda3

Update application/templates/index.html

Browse files
Files changed (1) hide show
  1. application/templates/index.html +405 -453
application/templates/index.html CHANGED
@@ -1,455 +1,392 @@
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
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
7
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap" rel="stylesheet">
8
  <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&display=swap" rel="stylesheet">
9
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/atom-one-dark.min.css">
10
- <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
11
- <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
12
- <title>Chat Completion Demo</title>
13
  <style>
14
- ::-webkit-scrollbar {
15
- width: 12px;
16
- }
17
-
18
- ::-webkit-scrollbar-track {
19
- background: transparent;
20
- }
21
-
22
- ::-webkit-scrollbar-thumb {
23
- background: rgb(43, 43, 43);
24
- border-radius: 6px;
25
- }
26
-
27
- ::-webkit-scrollbar-thumb:hover {
28
- background: rgb(119, 119, 119);
29
- }
30
-
31
- html, body {
32
- padding: 0;
33
- margin: 0;
34
- background-color: rgb(2, 2, 8);
35
- width: 100vw;
36
- height: 100vh;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  overflow: hidden;
38
- scrollbar-width: thin;
39
- scrollbar-color: rgb(41, 41, 41) transparent;
40
- font-family: 'Inter';
41
  }
42
-
43
- nav {
44
- position: fixed;
45
- width: 100vw;
46
- height: 8vh;
47
- z-index: 100;
48
  display: flex;
49
- justify-content: space-between;
50
  align-items: center;
51
- background-color: rgba(20, 20, 20, 0.8);
52
- backdrop-filter: blur(10px);
53
- }
54
-
55
- .hamburger {
56
- display: flex;
57
- flex-direction: column;
58
- gap: 1.5vh;
59
- width: 20vh;
60
- color: white;
61
- margin: 1vw;
62
- cursor: pointer;
63
- position: absolute;
64
- z-index: 101;
65
- margin: 10px;
66
- }
67
-
68
- .line1, .line2 {
69
- background-color: rgb(122, 122, 122);
70
- width: 6vh;
71
- height: 0.5vh;
72
- transition: transform 0.3s ease;
73
- }
74
-
75
- .hamburger:hover .line1 {
76
- transform: translateX(-30px);
77
- }
78
-
79
- .hamburger:hover .line2 {
80
- transform: translateX(30px);
81
- }
82
-
83
- .menu {
84
- height: 100vh;
85
- width: 0;
86
- background-color: rgba(20, 20, 20, 0.8);
87
- backdrop-filter: blur(10px);
88
- border-radius: 10px;
89
- position: fixed;
90
- top: 0;
91
- left: 0;
92
- display: flex;
93
- flex-direction: column;
94
- overflow-y: auto;
95
- transition: width 0.3s ease;
96
- }
97
-
98
- .menu.open {
99
- width: 250px;
100
- }
101
-
102
- .newChat {
103
- margin-top: 8vh;
104
- margin-left: 1vw;
105
- color: gray;
106
- font-size: large;
107
  cursor: pointer;
108
- font-weight: 400;
109
- position: relative;
110
- font-size: large;
111
- transition: transform 0.3s ease;
112
  }
113
-
114
- .newChat:hover {
115
- transform: scale(0.95);
116
- }
117
-
118
- .prevChatsCont {
119
- color: rgb(172, 171, 171);
120
- margin-left: 1vw;
121
- font-weight: 300;
122
- display: flex;
123
- flex-direction: column;
124
- gap: 1vh;
125
- position: relative;
126
- font-size: medium;
127
  }
128
-
129
- .prevChat {
130
- min-height: 5vh;
131
- cursor: pointer;
132
- width: 90%;
133
- display: flex;
134
- align-items: center;
135
- padding-left: 5%;
136
- border-radius: 10px;
137
- overflow: hidden;
138
- padding-top: 1%;
139
- padding-bottom: 1%;
140
- position: relative;
141
- transition: background-color 0.3s ease, transform 0.3s ease;
142
- }
143
-
144
- .prevChat:hover {
145
- background-color: rgba(70, 70, 70, 1);
146
- transform: translateY(5px);
147
- }
148
-
149
- .chatsTxt {
150
  color: #fdffdf;
151
- margin-left: 1vw;
152
  font-size: 14px;
153
- margin-top: 4vh;
154
- margin-bottom: 3vh;
155
- z-index: 100;
156
- overflow: hidden;
157
- min-height: 5vh;
158
- display: flex;
159
- align-items: center;
160
- }
161
-
162
- .container {
163
- width: 99.5%;
164
- max-width: 99.5%;
165
- height: 90%;
166
- position: absolute;
167
- z-index: 50;
168
- top: 8vh;
169
- display: flex;
170
- flex-direction: column;
171
- justify-content: flex-end;
172
- z-index: 1;
173
- }
174
-
175
- .inputs {
176
- width: 70%;
177
- display: flex;
178
- flex-direction: row;
179
- justify-content: space-between;
180
- align-items: center;
181
- background-color: rgba(51, 51, 51, 0.4);
182
- padding: 10px;
183
- border-top-right-radius: 50px;
184
- border-bottom-left-radius: 20px;
185
- border-top-left-radius: 20px;
186
- border-bottom-right-radius: 50px;
187
- font-size: large;
188
- position: relative;
189
- margin-top: auto;
190
- align-self: center;
191
- transition: width 0.3s ease;
192
- }
193
-
194
- .inputs.expanded {
195
- width: 90%;
196
- }
197
-
198
- .textBox {
199
- width: 90%;
200
- background: none;
201
- outline: none;
202
- border: none;
203
- color: rgb(161, 161, 161);
204
- padding: 7px;
205
- font-family: 'Inter';
206
- resize: none;
207
- }
208
-
209
- .sendBtn {
210
- background-color: white;
211
- border: none;
212
- color: black;
213
- font-size: x-large;
214
- cursor: pointer;
215
- border-radius: 50%;
216
- width: 6vh;
217
- height: 6vh;
218
- transition: background-color 0.3s ease;
219
- }
220
-
221
- .sendBtn:hover {
222
- background-color: #e0e0e0;
223
- }
224
-
225
- .messages {
226
- overflow-y: auto;
227
- color: white;
228
- padding: 10px;
229
- display: flex;
230
- flex-direction: column;
231
- position: relative;
232
  }
233
-
234
- .user {
235
  margin-left: auto;
236
- max-width: 60%;
237
- background-color: rgba(51, 51, 51, 0.4);
238
- padding: 0.5vh 1.5vh 0.5vh 1.5vh;
239
- text-align: left;
240
- font-weight: 300;
241
- border-radius: 10px;
242
- line-height: 130%;
243
- margin-bottom: 10px;
244
- }
245
-
246
- .user p {
247
- color: #b4b4b4;
248
- padding: 0;
249
- opacity: 0.9;
250
  }
251
-
252
- .ai {
253
- text-align: left;
254
- width: 70%;
255
- margin-left: auto;
256
- margin-right: auto;
257
- margin-top: 2vh;
258
  }
259
-
260
- .ai p {
261
- opacity: 0.9;
262
- font-weight: 300;
263
- font-size: medium;
264
- line-height: 1.6;
265
  color: #c5c5c5;
266
- background-color: rgba(28, 28, 28, 0.5);
267
- padding: 20px;
268
- border-radius: 10px;
269
- border: 2px solid rgba(255, 255, 255, 0.1);
270
- font-family: 'Inter';
271
- margin-bottom: 10px;
272
- }
273
-
274
- .subHeading, .heading {
275
- padding: 1vh;
276
- border-radius: 10px;
277
- display: inline-block;
278
- margin-bottom: 2vh;
279
- margin-top: 2vh;
280
- }
281
-
282
- .subHeading {
283
- background-color: rgba(59, 59, 59, 0.5);
284
- border: 1px solid rgba(255, 255, 255, 0.1);
285
- }
286
-
287
- .heading {
288
- background-color: rgba(119, 16, 238, 0.55);
289
- box-shadow: 6px 6px rgba(0, 0, 0, 0.5);
290
- }
291
-
292
- code {
293
- border-radius: 15px;
294
- background-color: #282a36;
295
- color: #f8f8f2;
296
- padding: 5px;
297
- font-family: 'Fira Code', monospace;
298
- }
299
-
300
- pre {
301
- background-color: #282a36;
302
- color: #f8f8f2;
303
- padding: 10px;
304
- border-radius: 15px;
305
- overflow-x: auto;
306
- font-family: 'Fira Code', monospace;
307
- }
308
-
309
- .models {
310
- position: relative;
311
- margin: auto;
312
- padding: 10px;
313
- outline: none;
314
- background-color: rgb(43, 43, 43);
315
- color: rgb(177, 177, 177);
316
- border: none;
317
- border-radius: 10px;
318
- transition: background-color 0.3s ease;
319
- }
320
-
321
- .models:hover {
322
- background-color: #383838;
323
- }
324
-
325
- .models option {
326
- background-color: rgb(34, 34, 34);
327
- color: #afafaf;
328
- padding: 10px;
329
- }
330
-
331
- .alert {
332
- position: absolute;
333
- top: 50%;
334
- left: 50%;
335
- transform: translate(-50%, -50%);
336
- width: 320px;
337
- height: 320px;
338
- display: flex;
339
- flex-direction: column;
340
- gap: 0px;
341
- color: #d8d8d8;
342
- background-color: #222222;
343
- box-shadow: 6px 6px rgb(41, 41, 41);
344
- justify-content: center;
345
- z-index: 100;
346
- border-radius: 15px;
347
- animation: fadeIn 0.5s ease-in-out;
348
- }
349
-
350
- @keyframes fadeIn {
351
- from { opacity: 0; transform: translate(-50%, -60%); }
352
- to { opacity: 1; transform: translate(-50%, -50%); }
353
- }
354
-
355
- .alert p {
356
- float: left;
357
- font-family: 'Inter';
358
- font-weight: 300;
359
- font-size: 15px;
360
- color: #cfcfcf;
361
- opacity: 0.9;
362
- padding-left: 10px;
363
- }
364
-
365
- .closeAlert {
366
- margin-left: auto;
367
- margin-right: 10px;
368
- margin-top: 10px;
369
- background-color: rgb(247, 102, 102);
370
- padding: 10px;
371
- cursor: pointer;
372
- border-radius: 10px;
373
- color: #ffffff;
374
- transition: background-color 0.3s ease;
375
- }
376
-
377
- .closeAlert:hover {
378
- background-color: #ff5757;
379
- }
380
-
381
- .discord {
382
- margin: 10px;
383
- text-decoration: none;
384
- color: rgb(211, 211, 211);
385
- padding: 7.5px;
386
- border-radius: 10px;
387
- background: linear-gradient(to right, #4A148C, #9c18e3);
388
- cursor: pointer;
389
- display: inline-block;
390
- font-size: 13px;
391
- max-width: 77px;
392
- transition: background 0.3s ease;
393
- }
394
-
395
- .discord:hover {
396
- background: linear-gradient(to right, #9c18e3, #4A148C);
397
- }
398
-
399
- .note {
400
- text-align: center;
401
- background-color: rgba(119, 16, 238, 0.55);
402
- box-shadow: 6px 6px rgb(32, 32, 32);
403
- margin: auto;
404
- width: 70px;
405
- padding: 10px;
406
- border-radius: 10px;
407
- }
408
-
409
- .webSearch {
410
- color: rgb(233, 233, 233);
411
- background: transparent;
412
- cursor: pointer;
413
- border: none;
414
- font-size: x-large;
415
- transition: color 0.3s ease;
416
- }
417
-
418
- .webSearch:hover {
419
- color: #ffcc00;
420
- }
421
-
422
- .generated-image {
423
- margin-top: 20px;
424
- text-align: center;
425
  }
426
-
427
- .generated-image img {
428
- max-width: 80%;
429
- height: auto;
430
- border-radius: 10px;
431
- border: 2px solid rgba(255, 255, 255, 0.1);
432
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
433
- }
434
-
435
- @media screen and (max-width: 780px) {
436
- .menu {
437
- background-color: rgba(20, 20, 20);
438
- }
439
-
440
- .inputs {
441
- width: 85%;
442
- }
443
-
444
- .ai {
445
- width: 90%;
446
- }
447
-
448
- .user {
449
- max-width: 90%;
450
- }
451
  }
452
  </style>
 
 
 
453
  </head>
454
  <body>
455
  <nav>
@@ -468,43 +405,58 @@
468
  </nav>
469
  <div class="container" id="container">
470
  <div class="messages" id="messages">
 
471
  </div>
472
  <div class="inputs">
473
- <button id="imageGenBtn" class="webSearch"><i class="fa-solid fa-image"></i></button>
474
  <textarea name="" id="textBox" class="textBox" placeholder="Enter your message..."></textarea>
475
  <button id="sendBtn" class="sendBtn"><i class="fa-solid fa-arrow-up"></i></button>
476
  </div>
477
  </div>
478
- <div class="alert" id="alert">
479
- <div class="closeAlert" id="closeAlert">X</div>
480
- <p class="note">Note</p>
481
- <p>Welcome to Xylaria!</p>
482
- </div>
483
- <div class="textCustomization">
484
- <div class="colors"></div>
485
- <div class="fontSize"></div>
486
- <div class="background"></div>
487
- </div>
488
  <script>
489
- document.getElementById('hamburger').addEventListener('click', function() {
490
- document.getElementById('menu').classList.toggle('open');
491
- });
492
-
493
- document.getElementById('closeAlert').addEventListener('click', function() {
494
- document.getElementById('alert').style.display = 'none';
495
- });
496
-
497
- document.getElementById('textBox').addEventListener('focus', function() {
498
- document.querySelector('.inputs').classList.add('expanded');
499
- });
500
-
501
- document.getElementById('textBox').addEventListener('blur', function() {
502
- if (!this.value) {
503
- document.querySelector('.inputs').classList.remove('expanded');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
504
  }
505
- });
506
  </script>
 
507
  <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
508
- <script>hljs.highlightAll();</script>
509
  </body>
510
  </html>
 
1
  <!DOCTYPE html>
2
  <html lang="en">
3
  <head>
4
+ <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
5
  <meta charset="UTF-8">
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
8
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap" rel="stylesheet">
9
  <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&display=swap" rel="stylesheet">
10
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/atom-one-dark.min.css">
 
 
 
11
  <style>
12
+ ::-webkit-scrollbar {
13
+ width: 12px;
14
+ }
15
+ ::-webkit-scrollbar-track {
16
+ background: transparent;
17
+ }
18
+ ::-webkit-scrollbar-thumb {
19
+ background: rgb(43, 43, 43);
20
+ border-radius: 6px;
21
+ }
22
+ ::-webkit-scrollbar-thumb:hover {
23
+ background: rgb(119, 119, 119);
24
+ }
25
+ html,body{
26
+ padding: 0;
27
+ margin: 0;
28
+ background-color: rgb(2,2,8);
29
+ width: 100vw;
30
+ height: 100vh;
31
+ overflow: hidden;
32
+ scrollbar-width: thin;
33
+ scrollbar-color: rgb(41, 41, 41) transparent;
34
+ font-family: 'Inter';
35
+ }
36
+ nav{
37
+ position: fixed;
38
+ width: 100vw;
39
+ height: 8vh;
40
+ z-index: 100;
41
+ display: flex;
42
+ }
43
+ .hamburger{
44
+ display: flex;
45
+ flex-direction: column;
46
+ gap: 1.5vh;
47
+ width: 20vh;
48
+ color: white;
49
+ margin: 1vw;
50
+ cursor: pointer;
51
+ position: absolute;
52
+ z-index: 101;
53
+ margin: 10px;
54
+ }
55
+ .line1{
56
+ background-color: rgb(122, 122, 122);
57
+ width: 6vh;
58
+ height: 0.5vh;
59
+ }
60
+ .line2{
61
+ background-color: rgb(104, 104, 104);
62
+ width: 3vh;
63
+ height: 0.5vh;
64
+ }
65
+ .hamburger:hover .line1{
66
+ transform: translateX(-30px);
67
+ transition: transform 1s ease;
68
+ }
69
+ .hamburger:hover .line2{
70
+ transform: translateX(30px);
71
+ transition: transform 1s ease;
72
+ }
73
+ .menu{
74
+ height: 100vh;
75
+ width: 0px;
76
+ background-color: rgba(20, 20, 20,0.5);
77
+ border-radius: 10px;
78
+ position: fixed;
79
+ top: 0;
80
+ left: 0;
81
+ display: flex;
82
+ flex-direction: column;
83
+ overflow-y: auto;
84
+ }
85
+ .newChat{
86
+ margin-top: 8vh;
87
+ margin-left: 1vw;
88
+ color: gray;
89
+ font-size: large;
90
+ cursor: pointer;
91
+ font-weight: 400;
92
+ position: relative;
93
+ font-size: large;
94
+ }
95
+ .newChat:hover{
96
+ transform: scale(0.95);
97
+ transition: transform 0.7s ease;
98
+ }
99
+ .prevChatsCont{
100
+ color: rgb(172, 171, 171);
101
+ margin-left: 1vw;
102
+ font-weight: 300;
103
+ display: flex;
104
+ flex-direction: column;
105
+ gap: 1vh;
106
+ position: relative;
107
+ font-size: medium;
108
+
109
+ }
110
+ .prevChat{
111
+ min-height: 5vh;
112
+ cursor: pointer;
113
+ width: 90%;
114
+ display: flex;
115
+ align-items: center;
116
+ padding-left: 5%;
117
+ border-radius: 10px;
118
+ overflow: hidden;
119
+ padding-top: 1%;
120
+ padding-bottom: 1%;
121
+ position: relative;
122
+ }
123
+ .prevChat:hover{
124
+ background-color: rgba(70,70, 70,1);
125
+ transform: translateY(5px);
126
+ transition: transform 0.8s ease;
127
+ }
128
+ .chatsTxt{
129
+ color: #fdffdf;
130
+ margin-left: 1vw;
131
+ font-size: 14px;
132
+ margin-top: 4vh;
133
+ margin-bottom: 3vh;
134
+ z-index: 100;
135
+ overflow: hidden;
136
+ min-height: 5vh;
137
+ display: flex;
138
+ align-items: center;
139
+ }
140
+ .container {
141
+ width: 99.5%;
142
+ max-width: 99.5%;
143
+ height: 90%;
144
+ position: absolute;
145
+ z-index: 50;
146
+ top: 8vh;
147
+ display: flex;
148
+ flex-direction: column;
149
+ justify-content: flex-end;
150
+ z-index: 1;
151
+ }
152
+ .inputs {
153
+ width: 70%;
154
+ display: flex;
155
+ flex-direction: row;
156
+ justify-content: space-between;
157
+ align-items: center;
158
+ background-color: rgba(51, 51, 51, 0.4);
159
+ padding: 10px;
160
+ border-top-right-radius: 50px;
161
+ border-bottom-left-radius: 20px;
162
+ border-top-left-radius: 20px;
163
+ border-bottom-right-radius: 50px;
164
+ font-size: large;
165
+ position: relative;
166
+ margin-top: auto;
167
+ align-self: center;
168
+ }
169
+ .textBox{
170
+ width: 90%;
171
+ background: none;
172
+ outline: none;
173
+ border: none;
174
+ color: rgb(161, 161, 161);
175
+ padding: 7px;
176
+ }
177
+ .sendBtn{
178
+ background-color: white;
179
+ border: none;
180
+ color: black;
181
+ font-size: x-large;
182
+ cursor: pointer;
183
+ border-radius: 50%;
184
+ width: 6vh;
185
+ height: 6vh;
186
+ }
187
+ .messages {
188
+ overflow-y: auto;
189
+ color: white;
190
+ padding: 10px;
191
+ display: flex;
192
+ flex-direction: column;
193
+ position: relative;
194
+ }
195
+ .user{
196
+ margin-left: auto;
197
+ max-width: 60%;
198
+ background-color: rgba(51, 51, 51, 0.4);
199
+ padding: 0.5vh 1.5vh 0.5vh 1.5vh;
200
+ text-align: left;
201
+ font-weight: 300;
202
+ border-radius: 10px;
203
+ line-height: 130%;
204
+
205
+ }
206
+ .user p{
207
+ color: #b4b4b4;
208
+ padding: 0;
209
+ opacity: 0.9;
210
+ }
211
+ .ai{
212
+ text-align: left;
213
+ width: 70%;
214
+ margin-left: auto;
215
+ margin-right: auto;
216
+ margin-top: 2vh;
217
+ }
218
+ .ai p {
219
+ opacity: 0.9;
220
+ font-weight: 300;
221
+ font-size: medium;
222
+ line-height: 1.6;
223
+ color: #c5c5c5;
224
+ background-color: rgba(28, 28, 28, 0.5);
225
+ padding: 20px;
226
+ border-radius: 10px;
227
+ border: 2px solid rgba(255,255,255,0.1);
228
+ font-family: 'Inter';
229
+ }
230
+ .subHeading,.heading{
231
+ padding: 1vh;
232
+ border-radius: 10px;
233
+ display: inline-block;
234
+ margin-bottom: 2vh;
235
+ margin-top: 2vh;
236
+ }
237
+ .subHeading{
238
+ background-color: rgba(59, 59, 59, 0.5);
239
+ border: 1px solid rgba(255,255,255,0.1)
240
+ }
241
+ .heading{
242
+ background-color: rgba(119, 16, 238, 0.55);
243
+ box-shadow: 6px 6px rgba(0, 0, 0, 0.5) ;
244
+ }
245
+ code{
246
+ border-radius: 15px;
247
+ }
248
+ .models{
249
+ position: relative;
250
+ margin: auto;
251
+ padding: 10px ;
252
+ outline: none;
253
+ background-color: rgb(43, 43, 43);
254
+ color: rgb(177, 177, 177);
255
+ border: none;
256
+ border-radius: 10px;
257
+ }
258
+ .models:hover{
259
+ background-color: #383838;
260
+ }
261
+ .models option{
262
+ background-color: rgb(34, 34, 34);
263
+ color: #afafaf;
264
+ padding: 10px;
265
+ }
266
+ .alert{
267
+ position: absolute;
268
+ top: 50%;
269
+ left: 50%;
270
+ transform: translate(-50%,-50%);
271
+ width: 320px;
272
+ height: 320px;
273
+ display: flex;
274
+ flex-direction: column;
275
+ gap: 0px;
276
+ color: #d8d8d8;
277
+ background-color: #222222;
278
+ box-shadow: 6px 6px rgb(41, 41, 41) ;
279
+ justify-content: center;
280
+ z-index: 100;
281
+ }
282
+ .alert p{
283
+ float: left;
284
+ font-family: 'Inter';
285
+ font-weight: 300;
286
+ font-size: 15px;
287
+ color: #cfcfcf;
288
+ opacity: 0.9;
289
+ padding-left: 10px;
290
+ }
291
+ .closeAlert{
292
+ margin-left: auto;
293
+ margin-right: 10px;
294
+ margin-top: 10px;
295
+ background-color: rgb(247, 102, 102);
296
+ padding: 10px;
297
+ cursor: pointer;
298
+ border-radius: 10px;
299
+ color: #ffffff;
300
+ }
301
+ .discord {
302
+ margin: 10px;
303
+ text-decoration: none;
304
+ color: rgb(211, 211, 211);
305
+ padding: 7.5px;
306
+ border-radius: 10px;
307
+ background: linear-gradient(to right, #4A148C, #9c18e3);
308
+ cursor: pointer;
309
+ display: inline-block;
310
+ font-size: 13px;
311
+ max-width: 77px;
312
+ }
313
+ .note{
314
+ text-align: center;
315
+ background-color: rgba(119, 16, 238, 0.55);
316
+ box-shadow: 6px 6px rgb(32, 32, 32) ;
317
+ margin: auto;
318
+ width: 70px;
319
+ padding: 10px;
320
+ }
321
+ .webSearch{
322
+ color: rgb(233, 233, 233);
323
+ background: transparent;
324
+ cursor: pointer;
325
+ border: none;
326
+ font-size: x-large;
327
+ }
328
+ @media screen and (max-width: 780px){
329
+ .menu{
330
+ background-color: rgba(20, 20, 20);
331
+ }
332
+ .inputs{
333
+ width: 85%;
334
+ }
335
+ .ai{
336
+ width: 90%;
337
+ }
338
+ .user{
339
+ max-width: 90%;
340
+ }
341
+ }
342
+ /* New styles for thinking section */
343
+ .thinking-container {
344
+ background: rgba(30, 30, 30, 0.7);
345
+ border-radius: 8px;
346
+ margin: 10px 0;
347
  overflow: hidden;
348
+ border: 1px solid rgba(255, 255, 255, 0.1);
 
 
349
  }
350
+ .thinking-header {
 
 
 
 
 
351
  display: flex;
 
352
  align-items: center;
353
+ padding: 10px 15px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
354
  cursor: pointer;
355
+ background: rgba(119, 16, 238, 0.2);
356
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
 
 
357
  }
358
+ .thinking-header:hover {
359
+ background: rgba(119, 16, 238, 0.3);
 
 
 
 
 
 
 
 
 
 
 
 
360
  }
361
+ .thinking-title {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
362
  color: #fdffdf;
 
363
  font-size: 14px;
364
+ margin-right: 10px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
365
  }
366
+ .thinking-arrow {
 
367
  margin-left: auto;
368
+ transition: transform 0.3s ease;
 
 
 
 
 
 
 
 
 
 
 
 
 
369
  }
370
+ .thinking-arrow.open {
371
+ transform: rotate(180deg);
 
 
 
 
 
372
  }
373
+ .thinking-content {
374
+ padding: 15px;
 
 
 
 
375
  color: #c5c5c5;
376
+ font-size: 14px;
377
+ line-height: 1.5;
378
+ max-height: 0;
379
+ overflow: hidden;
380
+ transition: max-height 0.3s ease-out;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
381
  }
382
+ .thinking-content.open {
383
+ max-height: 500px;
384
+ transition: max-height 0.5s ease-in;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
385
  }
386
  </style>
387
+ <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
388
+ <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
389
+ <title>Chat Completion Demo</title>
390
  </head>
391
  <body>
392
  <nav>
 
405
  </nav>
406
  <div class="container" id="container">
407
  <div class="messages" id="messages">
408
+ <!-- Messages will be inserted here -->
409
  </div>
410
  <div class="inputs">
411
+ <button id="webSearch" class="webSearch"><i class="fa-solid fa-globe"></i></button>
412
  <textarea name="" id="textBox" class="textBox" placeholder="Enter your message..."></textarea>
413
  <button id="sendBtn" class="sendBtn"><i class="fa-solid fa-arrow-up"></i></button>
414
  </div>
415
  </div>
 
 
 
 
 
 
 
 
 
 
416
  <script>
417
+ // Add this to your existing JavaScript or create a new script
418
+ function createThinkingElement(thinkingContent) {
419
+ const container = document.createElement('div');
420
+ container.className = 'thinking-container';
421
+
422
+ const header = document.createElement('div');
423
+ header.className = 'thinking-header';
424
+
425
+ const title = document.createElement('span');
426
+ title.className = 'thinking-title';
427
+ title.textContent = 'Reasoning about it';
428
+
429
+ const arrow = document.createElement('i');
430
+ arrow.className = 'fa-solid fa-chevron-down thinking-arrow';
431
+
432
+ const content = document.createElement('div');
433
+ content.className = 'thinking-content';
434
+ content.textContent = thinkingContent;
435
+
436
+ header.appendChild(title);
437
+ header.appendChild(arrow);
438
+ container.appendChild(header);
439
+ container.appendChild(content);
440
+
441
+ header.addEventListener('click', () => {
442
+ arrow.classList.toggle('open');
443
+ content.classList.toggle('open');
444
+ });
445
+
446
+ return container;
447
+ }
448
+ // Example usage in your message processing logic:
449
+ function processMessage(message) {
450
+ const thinkMatch = message.match(/<think>(.*?)<\/think>/s);
451
+ if (thinkMatch) {
452
+ const thinkingContent = thinkMatch[1].trim();
453
+ const thinkingElement = createThinkingElement(thinkingContent);
454
+ // Insert the thinking element into your message container
455
+ document.getElementById('messages').appendChild(thinkingElement);
456
  }
457
+ }
458
  </script>
459
+ <script src="{{ url_for('static', filename='js/script.js') }}" type="module"></script>
460
  <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
 
461
  </body>
462
  </html>