Implement Evil Miku mode with persistence, fix API event loop issues, and improve formatting

- Added Evil Miku mode with 4 evil moods (aggressive, cunning, sarcastic, evil_neutral)
- Created evil mode content files (evil_miku_lore.txt, evil_miku_prompt.txt, evil_miku_lyrics.txt)
- Implemented persistent evil mode state across restarts (saves to memory/evil_mode_state.json)
- Fixed API endpoints to use client.loop.create_task() to prevent timeout errors
- Added evil mode toggle in web UI with red theme styling
- Modified mood rotation to handle evil mode
- Configured DarkIdol uncensored model for evil mode text generation
- Reduced system prompt redundancy by removing duplicate content
- Added markdown escape for single asterisks (actions) while preserving bold formatting
- Evil mode now persists username, pfp, and nicknames across restarts without re-applying changes
This commit is contained in:
2026-01-02 17:11:58 +02:00
parent b38bdf2435
commit 6ec33bcecb
38 changed files with 5707 additions and 164 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

View File

@@ -0,0 +1,158 @@
{
"filename": "image.jpg",
"timestamp": "20251216_191302_234228",
"detections": [
{
"bbox": [
196.47129821777344,
191.9031219482422,
581.2015380859375,
581.7525024414062
],
"confidence": 0.9982325434684753,
"keypoints": [
[
246.06932067871094,
297.3604431152344,
0.8292144536972046
],
[
223.22659301757812,
419.1883544921875,
0.8379361629486084
],
[
306.9832763671875,
533.4020385742188,
0.8896595239639282
],
[
497.33941650390625,
514.366455078125,
0.7196799516677856
],
[
581.0961303710938,
400.1527404785156,
0.5189752578735352
],
[
261.2978210449219,
225.0251007080078,
0.7035688161849976
],
[
303.1761779785156,
209.79661560058594,
0.76395583152771
],
[
341.2474060058594,
209.79661560058594,
0.9353335499763489
],
[
455.4610595703125,
225.0251007080078,
0.8449758887290955
],
[
504.95367431640625,
244.0607147216797,
0.8436319828033447
],
[
546.83203125,
266.9034423828125,
0.8849823474884033
],
[
265.1049499511719,
282.1319580078125,
0.695880651473999
],
[
299.3690490722656,
270.7105712890625,
0.8662009239196777
],
[
337.4402770996094,
308.78179931640625,
0.7348505258560181
],
[
272.71917724609375,
343.0458984375,
0.4203336536884308
],
[
284.14056396484375,
362.0815124511719,
0.6733107566833496
],
[
310.7904052734375,
365.8886413574219,
0.7114254236221313
],
[
436.4254455566406,
312.58892822265625,
0.6551912426948547
],
[
501.14654541015625,
308.78179931640625,
0.7445544004440308
],
[
531.603515625,
346.85302734375,
0.560457706451416
],
[
447.8468322753906,
392.53851318359375,
0.6771020889282227
],
[
470.6895751953125,
407.7669982910156,
0.9128588438034058
],
[
497.33941650390625,
411.5741271972656,
0.8999455571174622
],
[
310.7904052734375,
388.73138427734375,
0.997877299785614
],
[
306.9832763671875,
438.2239685058594,
0.8427709341049194
],
[
348.86163330078125,
430.6097412109375,
0.800597071647644
],
[
383.125732421875,
464.87384033203125,
0.7193189263343811
],
[
345.05450439453125,
483.9094543457031,
0.8145540952682495
]
]
}
],
"count": 1
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 KiB

View File

@@ -0,0 +1,309 @@
{
"filename": "image.jpg",
"timestamp": "20251217_185424_979234",
"detections": [
{
"bbox": [
693.5906372070312,
225.60562133789062,
869.5529174804688,
398.3116455078125
],
"confidence": 0.9999388456344604,
"keypoints": [
[
701.6670532226562,
278.4501647949219,
0.7287818193435669
],
[
706.8222045898438,
328.2832336425781,
0.7842775583267212
],
[
772.1206665039062,
384.9898376464844,
0.888073205947876
],
[
828.8272705078125,
355.77734375,
0.990212082862854
],
[
849.4478759765625,
319.69134521484375,
0.9322668313980103
],
[
734.3162841796875,
249.23768615722656,
0.8692702054977417
],
[
756.6552734375,
250.95606994628906,
1.0345274209976196
],
[
778.9942016601562,
257.82958984375,
0.9229974150657654
],
[
827.10888671875,
276.7317810058594,
0.9126474857330322
],
[
846.0111083984375,
278.4501647949219,
0.9861496686935425
],
[
861.4765014648438,
283.6053161621094,
0.8206217885017395
],
[
722.28759765625,
278.4501647949219,
0.9549923539161682
],
[
746.344970703125,
273.2950439453125,
0.9322090744972229
],
[
768.6838989257812,
283.6053161621094,
0.8930690288543701
],
[
729.1611328125,
292.1972351074219,
0.9213390350341797
],
[
742.908203125,
297.3523864746094,
0.9769494533538818
],
[
758.3735961914062,
300.78912353515625,
0.9447418451309204
],
[
811.6434326171875,
300.78912353515625,
0.9218328595161438
],
[
833.982421875,
299.0707702636719,
0.9041774272918701
],
[
844.292724609375,
309.38104248046875,
0.9363819360733032
],
[
808.2066650390625,
314.53619384765625,
0.8589113354682922
],
[
821.9537353515625,
319.69134521484375,
0.919540524482727
],
[
832.2640380859375,
321.40972900390625,
0.8536700010299683
],
[
796.1780395507812,
328.2832336425781,
0.9885026216506958
],
[
775.5574340820312,
350.6221923828125,
0.9725710153579712
],
[
782.4309692382812,
347.1854553222656,
0.9376360177993774
],
[
784.1493530273438,
352.340576171875,
0.9258068203926086
],
[
778.9942016601562,
354.0589599609375,
0.9732238054275513
]
]
},
{
"bbox": [
487.3535461425781,
183.14112854003906,
586.72314453125,
287.9300537109375
],
"confidence": 0.005470635835081339,
"keypoints": [
[
581.5531616210938,
201.25404357910156,
0.08879263699054718
],
[
559.0399169921875,
178.7407989501953,
0.24570654332637787
],
[
534.47998046875,
179.76412963867188,
0.2645706832408905
],
[
559.0399169921875,
178.7407989501953,
0.16318529844284058
],
[
491.50018310546875,
198.18406677246094,
0.06354546546936035
],
[
571.3198852539062,
264.7004699707031,
0.2779614329338074
],
[
564.1565551757812,
268.7937927246094,
0.1367506980895996
],
[
577.4598388671875,
244.23388671875,
0.16484375298023224
],
[
495.5934753417969,
208.4173583984375,
0.19113357365131378
],
[
494.5701599121094,
206.37069702148438,
0.23774558305740356
],
[
493.5468444824219,
201.25404357910156,
0.4331512451171875
],
[
573.3665161132812,
216.60398864746094,
0.22543448209762573
],
[
565.1798706054688,
232.97726440429688,
0.3359849750995636
],
[
554.9465942382812,
247.3038787841797,
0.36514192819595337
],
[
570.2965087890625,
217.6273193359375,
0.2250148355960846
],
[
563.1332397460938,
228.88394165039062,
0.32067441940307617
],
[
556.9932250976562,
245.25721740722656,
0.20918995141983032
],
[
510.94342041015625,
212.5106658935547,
0.8453545570373535
],
[
507.8734436035156,
205.3473663330078,
0.38465291261672974
],
[
555.9699096679688,
247.3038787841797,
0.3080238401889801
],
[
512.9901123046875,
210.46401977539062,
0.30900099873542786
],
[
514.013427734375,
197.16073608398438,
0.27606838941574097
],
[
511.9667663574219,
189.99742126464844,
0.32958298921585083
],
[
556.9932250976562,
196.1374053955078,
0.21528153121471405
],
[
558.0166015625,
248.3271942138672,
0.14841367304325104
],
[
531.4100341796875,
211.4873504638672,
0.0743945762515068
],
[
530.38671875,
212.5106658935547,
0.17606587707996368
],
[
532.433349609375,
196.1374053955078,
0.16843318939208984
]
]
}
],
"count": 2
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 KiB

View File

@@ -0,0 +1,158 @@
{
"filename": "image.jpg",
"timestamp": "20251217_185740_337302",
"detections": [
{
"bbox": [
614.3300170898438,
252.1260986328125,
845.923828125,
477.489501953125
],
"confidence": 0.9996790289878845,
"keypoints": [
[
627.2214965820312,
372.7236022949219,
1.0429065227508545
],
[
663.4080200195312,
427.0033874511719,
0.9874662160873413
],
[
740.304443359375,
458.6666259765625,
1.016742467880249
],
[
810.4158325195312,
406.6484680175781,
0.7512628436088562
],
[
833.0324096679688,
336.5370788574219,
0.6740956902503967
],
[
624.9598388671875,
322.9671325683594,
0.9372112154960632
],
[
652.0997314453125,
300.3505554199219,
0.908263087272644
],
[
681.5012817382812,
298.0888977050781,
0.8814148902893066
],
[
738.0427856445312,
295.8272399902344,
1.0011619329452515
],
[
769.7059936523438,
289.042236328125,
0.9926570653915405
],
[
805.8925170898438,
298.0888977050781,
0.8970666527748108
],
[
638.52978515625,
359.1536560058594,
0.8764435052871704
],
[
656.623046875,
338.7987365722656,
0.9010591506958008
],
[
686.0245971679688,
343.3220520019531,
0.9191399812698364
],
[
661.1463623046875,
386.2935485839844,
0.8780515193939209
],
[
681.5012817382812,
388.5552062988281,
0.9107282161712646
],
[
695.0712280273438,
379.5085754394531,
0.7969919443130493
],
[
753.8743896484375,
347.8453674316406,
0.8091742396354675
],
[
776.490966796875,
338.7987365722656,
0.9117501974105835
],
[
805.8925170898438,
343.3220520019531,
0.8365209698677063
],
[
753.8743896484375,
350.1070251464844,
0.8323858380317688
],
[
776.490966796875,
338.7987365722656,
0.8751938343048096
],
[
803.630859375,
343.3220520019531,
0.7549411058425903
],
[
701.856201171875,
393.0785217285156,
0.8769568204879761
],
[
722.2111206054688,
422.4800720214844,
0.9479954838752747
],
[
722.2111206054688,
415.6950988769531,
0.894494891166687
],
[
731.2578125,
420.2184143066406,
0.9418573379516602
],
[
728.99609375,
424.7417297363281,
0.9095354676246643
]
]
}
],
"count": 1
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

View File

@@ -0,0 +1,158 @@
{
"filename": "image.jpg",
"timestamp": "20251217_190033_745126",
"detections": [
{
"bbox": [
840.0060424804688,
284.41943359375,
1101.979248046875,
626.980712890625
],
"confidence": 0.39932432770729065,
"keypoints": [
[
986.046630859375,
283.41583251953125,
0.2426387071609497
],
[
932.5214233398438,
303.48779296875,
0.4440145492553711
],
[
855.5789794921875,
464.0633850097656,
0.42982691526412964
],
[
945.9027099609375,
581.1497802734375,
0.45873892307281494
],
[
1059.643798828125,
617.9483642578125,
0.5365260243415833
],
[
1026.1905517578125,
290.1064758300781,
0.4305003881454468
],
[
1059.643798828125,
370.394287109375,
0.6073510050773621
],
[
1062.9891357421875,
450.6820983886719,
0.4528559744358063
],
[
1119.859619140625,
527.6245727539062,
0.2473885715007782
],
[
1086.4063720703125,
591.1857299804688,
0.24226638674736023
],
[
1133.240966796875,
574.4591064453125,
0.2162601798772812
],
[
1012.8092651367188,
343.6316833496094,
0.7100628018379211
],
[
1032.8812255859375,
403.8475341796875,
0.8115602731704712
],
[
1019.4998779296875,
443.9914245605469,
0.7020391225814819
],
[
976.0106811523438,
387.12091064453125,
0.5768036246299744
],
[
965.9746704101562,
413.8835144042969,
0.6905593872070312
],
[
976.0106811523438,
443.9914245605469,
0.6587805151939392
],
[
1062.9891357421875,
517.5885620117188,
0.5995172262191772
],
[
1079.7156982421875,
574.4591064453125,
0.6779143214225769
],
[
1069.6798095703125,
604.5670166015625,
0.8095347881317139
],
[
1039.57177734375,
547.696533203125,
0.6294938325881958
],
[
1039.57177734375,
567.7684326171875,
0.7312894463539124
],
[
1042.9171142578125,
591.1857299804688,
0.916710376739502
],
[
962.6293334960938,
517.5885620117188,
0.3176366090774536
],
[
875.6509399414062,
464.0633850097656,
0.327512264251709
],
[
875.6509399414062,
467.4087219238281,
0.4919857978820801
],
[
875.6509399414062,
467.4087219238281,
0.4046154320240021
],
[
875.6509399414062,
464.0633850097656,
0.3986889123916626
]
]
}
],
"count": 1
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1003 KiB

View File

@@ -0,0 +1,158 @@
{
"filename": "image.jpg",
"timestamp": "20251224_211009_586721",
"detections": [
{
"bbox": [
809.6905517578125,
407.13751220703125,
1647.870849609375,
1148.427978515625
],
"confidence": 0.9938609600067139,
"keypoints": [
[
807.2350463867188,
642.724365234375,
0.7127635478973389
],
[
839.9764404296875,
822.8021850585938,
0.7567722797393799
],
[
1142.8345947265625,
1076.548095703125,
0.41799142956733704
],
[
1453.8780517578125,
994.694580078125,
0.42554914951324463
],
[
1576.6583251953125,
814.6168212890625,
0.5713441371917725
],
[
946.3860473632812,
495.38800048828125,
0.6767321228981018
],
[
1101.90771484375,
495.38800048828125,
0.9058751463890076
],
[
1224.6881103515625,
560.870849609375,
0.9521830081939697
],
[
1421.1365966796875,
650.9097290039062,
0.7177403569221497
],
[
1519.36083984375,
659.0950927734375,
0.8627742528915405
],
[
1584.8436279296875,
716.392578125,
0.8813791871070862
],
[
938.20068359375,
618.1683349609375,
0.8856644630432129
],
[
1052.795654296875,
626.3536376953125,
0.9479662179946899
],
[
1142.8345947265625,
683.651123046875,
0.7983269691467285
],
[
946.3860473632812,
716.392578125,
0.8408522605895996
],
[
1003.6835327148438,
757.3193359375,
0.9332680106163025
],
[
1069.1663818359375,
781.8753662109375,
0.7924942970275879
],
[
1339.2830810546875,
790.0607299804688,
0.8138746023178101
],
[
1429.3218994140625,
773.6900634765625,
0.8538142442703247
],
[
1494.8048095703125,
773.6900634765625,
0.8175988793373108
],
[
1322.912353515625,
847.3582153320312,
0.8202463388442993
],
[
1372.0244140625,
880.0996704101562,
0.8478400707244873
],
[
1412.951171875,
863.7289428710938,
0.73763108253479
],
[
1249.244140625,
937.3970947265625,
0.5882107019424438
],
[
1151.0198974609375,
994.694580078125,
0.6505234837532043
],
[
1191.9466552734375,
994.694580078125,
0.4790482521057129
],
[
1183.7613525390625,
994.694580078125,
0.5447762608528137
],
[
1191.9466552734375,
1002.8799438476562,
0.476657509803772
]
]
}
],
"count": 1
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 KiB

View File

@@ -0,0 +1,158 @@
{
"filename": "image.jpg",
"timestamp": "20251224_211215_460556",
"detections": [
{
"bbox": [
243.17462158203125,
738.087890625,
756.7355346679688,
1176.6513671875
],
"confidence": 0.9973229765892029,
"keypoints": [
[
251.70053100585938,
979.938232421875,
0.8961554765701294
],
[
336.95965576171875,
1095.288818359375,
0.6874521970748901
],
[
487.4169616699219,
1155.4718017578125,
0.7013885974884033
],
[
672.98095703125,
1100.3040771484375,
0.7424973845481873
],
[
753.224853515625,
979.938232421875,
0.9282263517379761
],
[
281.7919921875,
814.4351806640625,
0.9818699955940247
],
[
331.9444274902344,
784.34375,
0.8675532341003418
],
[
397.142578125,
779.3284912109375,
0.9162417054176331
],
[
582.7066040039062,
769.2979736328125,
0.8776062726974487
],
[
627.8438110351562,
779.3284912109375,
0.797545313835144
],
[
667.9657592773438,
809.419921875,
0.6901707053184509
],
[
281.7919921875,
959.8772583007812,
0.8245298266410828
],
[
331.9444274902344,
899.6943359375,
0.8560863137245178
],
[
422.21881103515625,
939.8162841796875,
0.9573222398757935
],
[
321.9139404296875,
1020.0601806640625,
0.8518409729003906
],
[
362.035888671875,
1025.075439453125,
0.9144301414489746
],
[
407.1730651855469,
1005.0144653320312,
0.8114967346191406
],
[
572.6760864257812,
924.7705688476562,
0.8735175728797913
],
[
662.9505004882812,
899.6943359375,
0.845302939414978
],
[
713.1029052734375,
959.8772583007812,
0.7547814846038818
],
[
582.7066040039062,
1005.0144653320312,
0.7834560871124268
],
[
632.8590087890625,
1020.0601806640625,
0.9480627775192261
],
[
683.011474609375,
1010.0296630859375,
0.8767312169075012
],
[
477.386474609375,
969.90771484375,
0.06865013390779495
],
[
472.3712463378906,
1070.212646484375,
0.9593700170516968
],
[
482.4017333984375,
1050.151611328125,
0.8919147253036499
],
[
502.46270751953125,
1070.212646484375,
0.8987501859664917
],
[
482.4017333984375,
1080.2430419921875,
0.9162824153900146
]
]
}
],
"count": 1
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 KiB

View File

@@ -0,0 +1,158 @@
{
"filename": "image.jpg",
"timestamp": "20260101_190343_013241",
"detections": [
{
"bbox": [
770.955078125,
468.954345703125,
1389.764404296875,
1012.148681640625
],
"confidence": 0.9576920866966248,
"keypoints": [
[
1403.6634521484375,
779.8314208984375,
0.27555638551712036
],
[
1379.4912109375,
580.410400390625,
0.1755112260580063
],
[
751.0130004882812,
713.3577270507812,
0.09801675379276276
],
[
896.04638671875,
453.50616455078125,
0.23754113912582397
],
[
1397.620361328125,
749.6160888671875,
0.22825556993484497
],
[
1282.80224609375,
936.950927734375,
0.23668813705444336
],
[
1282.80224609375,
930.9078979492188,
0.2928244471549988
],
[
1252.5869140625,
936.950927734375,
0.2213965654373169
],
[
1101.510498046875,
876.5203857421875,
0.33311042189598083
],
[
1065.2520751953125,
942.9940185546875,
0.26862242817878723
],
[
1022.95068359375,
949.0370483398438,
0.19751760363578796
],
[
1313.017578125,
767.7453002929688,
0.3798079788684845
],
[
1246.5439453125,
810.0466918945312,
0.23525723814964294
],
[
1186.11328125,
797.9605712890625,
0.20870834589004517
],
[
1276.7591552734375,
646.8840942382812,
0.361314982175827
],
[
1246.5439453125,
640.8410034179688,
0.23351311683654785
],
[
1180.0701904296875,
671.0563354492188,
0.3026014268398285
],
[
992.7353515625,
816.0897827148438,
0.5285589098930359
],
[
932.3047485351562,
864.4342651367188,
0.3133365511894226
],
[
859.7880859375,
858.3911743164062,
0.3024299740791321
],
[
968.5631103515625,
713.3577270507812,
0.4021602272987366
],
[
938.3478393554688,
689.1854858398438,
0.22893214225769043
],
[
859.7880859375,
713.3577270507812,
0.2677050828933716
],
[
1065.2520751953125,
900.692626953125,
0.09720761328935623
],
[
1131.7257080078125,
532.0659790039062,
0.10962074995040894
],
[
1053.166015625,
906.7356567382812,
0.1987707018852234
],
[
1119.6396484375,
526.0228881835938,
0.14390186965465546
],
[
1192.1563720703125,
513.936767578125,
0.07595863193273544
]
]
}
],
"count": 1
}