Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
243e89091a | ||
|
|
f985b7eeb9 | ||
|
|
b6ac73631f | ||
|
|
aed6e3413a | ||
|
|
df6b87fa23 | ||
|
|
f6f4a5199b | ||
|
|
d59eaa4912 | ||
|
|
26b55d47b4 | ||
|
|
5c39327450 | ||
|
|
9c3823a616 | ||
|
|
46330f0558 | ||
|
|
9a8e036ff9 | ||
|
|
0d858bdefb | ||
|
|
27ab509caf | ||
|
|
093379dba9 | ||
|
|
872bbfad1a | ||
|
|
b8f3a7cbe0 | ||
|
|
deff2d24fb | ||
|
|
fde2a91d2a | ||
|
|
4ceb8cedef | ||
|
|
383a9f67a2 | ||
|
|
8cee880486 | ||
|
|
36149fffa1 | ||
|
|
80ac13ef20 | ||
|
|
b994dbb2d1 | ||
|
|
83d954246f | ||
|
|
368f3ea968 | ||
|
|
19502492c6 | ||
|
|
3426f80656 | ||
|
|
6770ccbe91 | ||
|
|
44a38f8588 | ||
|
|
823dd8c47c | ||
|
|
c922f17f09 | ||
|
|
8ad431bea6 | ||
|
|
dbb18ac895 | ||
|
|
856b835172 | ||
|
|
37000963d9 | ||
|
|
6ddd804749 | ||
|
|
2130338c1d | ||
|
|
b20f371a42 | ||
|
|
de425d97dd |
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "sillytavern",
|
||||
"version": "1.8.0",
|
||||
"version": "1.8.3",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "sillytavern",
|
||||
"version": "1.8.0",
|
||||
"version": "1.8.3",
|
||||
"license": "AGPL-3.0",
|
||||
"dependencies": {
|
||||
"@dqbd/tiktoken": "^1.0.2",
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/SillyTavern/SillyTavern.git"
|
||||
},
|
||||
"version": "1.8.0",
|
||||
"version": "1.8.3",
|
||||
"scripts": {
|
||||
"start": "node server.js",
|
||||
"pkg": "pkg --compress Gzip --no-bytecode --public ."
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"max_length": 2048,
|
||||
"temp": 1.15,
|
||||
"genamt": 100,
|
||||
"temp": 1.15,
|
||||
"top_k": 0,
|
||||
"top_p": 0.95,
|
||||
"top_a": 0,
|
||||
@@ -11,12 +11,12 @@
|
||||
"rep_pen_range": 2048,
|
||||
"rep_pen_slope": 7,
|
||||
"sampler_order": [
|
||||
6,
|
||||
3,
|
||||
2,
|
||||
0,
|
||||
5,
|
||||
1,
|
||||
4,
|
||||
6
|
||||
4
|
||||
]
|
||||
}
|
||||
@@ -1,6 +1,16 @@
|
||||
{
|
||||
"apikey": "",
|
||||
"andepth": 1,
|
||||
"max_length": 2048,
|
||||
"genamt": 90,
|
||||
"temp": 0.8,
|
||||
"top_k": 28,
|
||||
"top_p": 0.94,
|
||||
"top_a": 0.00,
|
||||
"tfs": 0.96,
|
||||
"typical": 0.98,
|
||||
"rep_pen": 1.03,
|
||||
"rep_pen_slope": 0.8,
|
||||
"rep_pen_range": 120.0,
|
||||
"ikgen": 200,
|
||||
"sampler_order": [
|
||||
6,
|
||||
4,
|
||||
@@ -9,46 +19,5 @@
|
||||
0,
|
||||
1,
|
||||
5
|
||||
],
|
||||
"temp": 0.8,
|
||||
"top_p": 0.94,
|
||||
"top_k": 28,
|
||||
"tfs": 0.96,
|
||||
"typical": 0.98,
|
||||
"top_a": 0.00,
|
||||
"rep_pen": 1.03,
|
||||
"rep_pen_slope": 0.8,
|
||||
"rep_pen_range": 120.0,
|
||||
"genamt": 90,
|
||||
"max_length": 2048,
|
||||
"ikgen": 200,
|
||||
"formatoptns": {
|
||||
"frmttriminc": true,
|
||||
"frmtrmblln": false,
|
||||
"frmtrmspch": false,
|
||||
"frmtadsnsp": true,
|
||||
"singleline": false
|
||||
},
|
||||
"numseqs": 1,
|
||||
"widepth": 3,
|
||||
"useprompt": false,
|
||||
"adventure": false,
|
||||
"chatmode": false,
|
||||
"chatname": "You",
|
||||
"dynamicscan": false,
|
||||
"nopromptgen": false,
|
||||
"rngpersist": false,
|
||||
"nogenmod": false,
|
||||
"fulldeterminism": false,
|
||||
"autosave": false,
|
||||
"welcome": "## Warning: This model has a very heavy NSFW bias and is not suitable for use by minors!\n\nYou are currently running story-writing model `Erebus, version 1 (20B).`\n\n This model is made by [Mr. Seeker](https://www.patreon.com/mrseeker) with help of ProudNoob and the KoboldAI team.\n\n### How to use this model\n\nErebus is designed to generate short stories and novels. Use the author's note to give it a certain genre to follow, use memory to give an overview of the story and use World Information to give specific details about the characters. To start off, give the AI an idea of what you are writing about by setting the scene. Give the AI around 10 sentences that make your story interesting to read. Introduce your character, describe the world, blow something up, or let the AI use its creative mind.",
|
||||
"output_streaming": true,
|
||||
"show_probs": false,
|
||||
"show_budget": false,
|
||||
"seed": null,
|
||||
"newlinemode": "n",
|
||||
"antemplate": "",
|
||||
"userscripts": [],
|
||||
"corescript": "default.lua",
|
||||
"softprompt": ""
|
||||
]
|
||||
}
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"max_length": 2048,
|
||||
"temp": 0.59,
|
||||
"genamt": 100,
|
||||
"temp": 0.59,
|
||||
"top_k": 0,
|
||||
"top_p": 1,
|
||||
"top_a": 0,
|
||||
@@ -11,12 +11,12 @@
|
||||
"rep_pen_range": 2048,
|
||||
"rep_pen_slope": 0.3,
|
||||
"sampler_order": [
|
||||
6,
|
||||
5,
|
||||
0,
|
||||
2,
|
||||
3,
|
||||
1,
|
||||
4,
|
||||
6
|
||||
4
|
||||
]
|
||||
}
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"max_length": 2048,
|
||||
"temp": 0.8,
|
||||
"genamt": 100,
|
||||
"temp": 0.8,
|
||||
"top_k": 100,
|
||||
"top_p": 0.9,
|
||||
"top_a": 0,
|
||||
@@ -11,12 +11,12 @@
|
||||
"rep_pen_range": 2048,
|
||||
"rep_pen_slope": 3.4,
|
||||
"sampler_order": [
|
||||
6,
|
||||
5,
|
||||
0,
|
||||
2,
|
||||
3,
|
||||
1,
|
||||
4,
|
||||
6
|
||||
4
|
||||
]
|
||||
}
|
||||
@@ -1,21 +1,15 @@
|
||||
{
|
||||
"file_version": 2,
|
||||
"max_length": 2048,
|
||||
"ikmax": 3000,
|
||||
"genamt": 180,
|
||||
"ikgen": 200,
|
||||
"rep_pen": 1.01,
|
||||
"rep_pen_slope": 0.9,
|
||||
"rep_pen_range": 1024,
|
||||
"temp": 1.0,
|
||||
"top_p": 0.9,
|
||||
"top_k": 40,
|
||||
"top_a": 0.0,
|
||||
"tfs": 0.9,
|
||||
"typical": 1.0,
|
||||
"numseqs": 1,
|
||||
"fp32_model": false,
|
||||
"modeldim": 4096,
|
||||
"rep_pen": 1.01,
|
||||
"rep_pen_slope": 0.9,
|
||||
"rep_pen_range": 1024,
|
||||
"sampler_order": [
|
||||
6,
|
||||
0,
|
||||
@@ -24,24 +18,5 @@
|
||||
3,
|
||||
4,
|
||||
5
|
||||
|
||||
],
|
||||
"newlinemode": "n",
|
||||
"lazy_load": true,
|
||||
"revision": null,
|
||||
"selected_preset": "",
|
||||
"horde_wait_time": 0,
|
||||
"horde_queue_position": 0,
|
||||
"horde_queue_size": 0,
|
||||
"model": "pygmalion-6b",
|
||||
"model_type": "gptj",
|
||||
"url": "https://api.inferkit.com/v1/models/standard/generate",
|
||||
"oaiurl": "",
|
||||
"oaiengines": "https://api.openai.com/v1/engines",
|
||||
"colaburl": "/request",
|
||||
"apikey": "",
|
||||
"oaiapikey": "",
|
||||
"configname": "pygmalion-6b",
|
||||
"online_model": "",
|
||||
"alt_multi_gen": false
|
||||
]
|
||||
}
|
||||
@@ -1,21 +1,15 @@
|
||||
{
|
||||
"file_version": 2,
|
||||
"max_length": 2048,
|
||||
"ikmax": 3000,
|
||||
"genamt": 180,
|
||||
"ikgen": 200,
|
||||
"rep_pen": 1.17,
|
||||
"rep_pen_slope": 0.2,
|
||||
"rep_pen_range": 1024,
|
||||
"temp": 0.43,
|
||||
"top_p": 0.96,
|
||||
"top_k": 0,
|
||||
"top_a": 0.0,
|
||||
"tfs": 0.68,
|
||||
"typical": 1.0,
|
||||
"numseqs": 1,
|
||||
"fp32_model": false,
|
||||
"modeldim": 2560,
|
||||
"rep_pen": 1.17,
|
||||
"rep_pen_slope": 0.2,
|
||||
"rep_pen_range": 1024,
|
||||
"sampler_order": [
|
||||
6,
|
||||
0,
|
||||
@@ -24,23 +18,5 @@
|
||||
3,
|
||||
4,
|
||||
5
|
||||
],
|
||||
"newlinemode": "n",
|
||||
"lazy_load": true,
|
||||
"revision": null,
|
||||
"selected_preset": "",
|
||||
"horde_wait_time": 0,
|
||||
"horde_queue_position": 0,
|
||||
"horde_queue_size": 0,
|
||||
"model": "pygmalion-2.7b",
|
||||
"model_type": "gpt_neo",
|
||||
"url": "https://api.inferkit.com/v1/models/standard/generate",
|
||||
"oaiurl": "",
|
||||
"oaiengines": "https://api.openai.com/v1/engines",
|
||||
"colaburl": "/request",
|
||||
"apikey": "",
|
||||
"oaiapikey": "",
|
||||
"configname": "pygmalion-2.7b",
|
||||
"online_model": "",
|
||||
"alt_multi_gen": false
|
||||
]
|
||||
}
|
||||
@@ -1,21 +1,15 @@
|
||||
{
|
||||
"file_version": 2,
|
||||
"max_length": 2048,
|
||||
"ikmax": 3000,
|
||||
"genamt": 180,
|
||||
"ikgen": 200,
|
||||
"rep_pen": 1.1,
|
||||
"rep_pen_slope": 0.9,
|
||||
"rep_pen_range": 1024,
|
||||
"temp": 0.65,
|
||||
"top_p": 0.9,
|
||||
"top_k": 0,
|
||||
"top_a": 0.0,
|
||||
"tfs": 0.9,
|
||||
"typical": 1.0,
|
||||
"numseqs": 1,
|
||||
"fp32_model": false,
|
||||
"modeldim": 4096,
|
||||
"rep_pen": 1.1,
|
||||
"rep_pen_slope": 0.9,
|
||||
"rep_pen_range": 1024,
|
||||
"sampler_order": [
|
||||
6,
|
||||
0,
|
||||
@@ -23,25 +17,6 @@
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5
|
||||
|
||||
],
|
||||
"newlinemode": "n",
|
||||
"lazy_load": true,
|
||||
"revision": null,
|
||||
"selected_preset": "",
|
||||
"horde_wait_time": 0,
|
||||
"horde_queue_position": 0,
|
||||
"horde_queue_size": 0,
|
||||
"model": "pygmalion-6b",
|
||||
"model_type": "gptj",
|
||||
"url": "https://api.inferkit.com/v1/models/standard/generate",
|
||||
"oaiurl": "",
|
||||
"oaiengines": "https://api.openai.com/v1/engines",
|
||||
"colaburl": "/request",
|
||||
"apikey": "",
|
||||
"oaiapikey": "",
|
||||
"configname": "pygmalion-6b",
|
||||
"online_model": "",
|
||||
"alt_multi_gen": false
|
||||
5
|
||||
]
|
||||
}
|
||||
+9
-9
@@ -1,22 +1,22 @@
|
||||
{
|
||||
"max_length": 2048,
|
||||
"genamt": 100,
|
||||
"temp": 0.51,
|
||||
"top_p": 1,
|
||||
"top_k": 0,
|
||||
"tfs": 0.99,
|
||||
"top_a": 0,
|
||||
"typical": 1,
|
||||
"rep_pen": 1.2,
|
||||
"rep_pen_range": 2048,
|
||||
"rep_pen_slope": 0,
|
||||
"sampler_order": [
|
||||
6,
|
||||
5,
|
||||
0,
|
||||
2,
|
||||
3,
|
||||
1,
|
||||
4,
|
||||
6
|
||||
],
|
||||
"temp": 0.51,
|
||||
"tfs": 0.99,
|
||||
"top_a": 0,
|
||||
"top_k": 0,
|
||||
"top_p": 1,
|
||||
"typical": 1
|
||||
4
|
||||
]
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"max_length": 1600,
|
||||
"temp": 0.79,
|
||||
"genamt": 180,
|
||||
"temp": 0.79,
|
||||
"top_k": 0,
|
||||
"top_p": 0.9,
|
||||
"top_a": 0,
|
||||
|
||||
@@ -1,21 +1,15 @@
|
||||
{
|
||||
"file_version": 2,
|
||||
"max_length": 2048,
|
||||
"ikmax": 3000,
|
||||
"genamt": 180,
|
||||
"ikgen": 200,
|
||||
"rep_pen": 1.19,
|
||||
"rep_pen_slope": 0.9,
|
||||
"rep_pen_range": 1024,
|
||||
"temp": 0.79,
|
||||
"top_p": 0.9,
|
||||
"top_k": 0,
|
||||
"top_a": 0.0,
|
||||
"tfs": 0.95,
|
||||
"typical": 1.0,
|
||||
"numseqs": 1,
|
||||
"fp32_model": false,
|
||||
"modeldim": 4096,
|
||||
"rep_pen": 1.19,
|
||||
"rep_pen_slope": 0.9,
|
||||
"rep_pen_range": 1024,
|
||||
"sampler_order": [
|
||||
6,
|
||||
0,
|
||||
@@ -24,24 +18,5 @@
|
||||
3,
|
||||
4,
|
||||
5
|
||||
|
||||
],
|
||||
"newlinemode": "n",
|
||||
"lazy_load": true,
|
||||
"revision": null,
|
||||
"selected_preset": "",
|
||||
"horde_wait_time": 0,
|
||||
"horde_queue_position": 0,
|
||||
"horde_queue_size": 0,
|
||||
"model": "pygmalion-6b",
|
||||
"model_type": "gptj",
|
||||
"url": "https://api.inferkit.com/v1/models/standard/generate",
|
||||
"oaiurl": "",
|
||||
"oaiengines": "https://api.openai.com/v1/engines",
|
||||
"colaburl": "/request",
|
||||
"apikey": "",
|
||||
"oaiapikey": "",
|
||||
"configname": "pygmalion-6b",
|
||||
"online_model": "",
|
||||
"alt_multi_gen": false
|
||||
]
|
||||
}
|
||||
@@ -1,21 +1,15 @@
|
||||
{
|
||||
"file_version": 2,
|
||||
"max_length": 1400,
|
||||
"ikmax": 3000,
|
||||
"genamt": 180,
|
||||
"ikgen": 200,
|
||||
"rep_pen": 1.08,
|
||||
"rep_pen_slope": 0.9,
|
||||
"rep_pen_range": 1024,
|
||||
"temp": 0.65,
|
||||
"top_p": 0.9,
|
||||
"top_k": 0,
|
||||
"top_a": 0.0,
|
||||
"tfs": 0.9,
|
||||
"typical": 1.0,
|
||||
"numseqs": 1,
|
||||
"fp32_model": false,
|
||||
"modeldim": 4096,
|
||||
"rep_pen": 1.08,
|
||||
"rep_pen_slope": 0.9,
|
||||
"rep_pen_range": 1024,
|
||||
"sampler_order": [
|
||||
6,
|
||||
0,
|
||||
@@ -24,24 +18,5 @@
|
||||
3,
|
||||
4,
|
||||
5
|
||||
|
||||
],
|
||||
"newlinemode": "n",
|
||||
"lazy_load": true,
|
||||
"revision": null,
|
||||
"selected_preset": "",
|
||||
"horde_wait_time": 0,
|
||||
"horde_queue_position": 0,
|
||||
"horde_queue_size": 0,
|
||||
"model": "pygmalion-6b",
|
||||
"model_type": "gptj",
|
||||
"url": "https://api.inferkit.com/v1/models/standard/generate",
|
||||
"oaiurl": "",
|
||||
"oaiengines": "https://api.openai.com/v1/engines",
|
||||
"colaburl": "/request",
|
||||
"apikey": "",
|
||||
"oaiapikey": "",
|
||||
"configname": "pygmalion-6b",
|
||||
"online_model": "",
|
||||
"alt_multi_gen": false
|
||||
]
|
||||
}
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"max_length": 2048,
|
||||
"temp": 0.63,
|
||||
"genamt": 100,
|
||||
"temp": 0.63,
|
||||
"top_k": 0,
|
||||
"top_p": 0.98,
|
||||
"top_a": 0,
|
||||
@@ -11,12 +11,12 @@
|
||||
"rep_pen_range": 2048,
|
||||
"rep_pen_slope": 0.1,
|
||||
"sampler_order": [
|
||||
6,
|
||||
2,
|
||||
0,
|
||||
3,
|
||||
5,
|
||||
1,
|
||||
4,
|
||||
6
|
||||
4
|
||||
]
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"max_length": 2048,
|
||||
"temp": 0.7,
|
||||
"genamt": 100,
|
||||
"temp": 0.7,
|
||||
"top_k": 0,
|
||||
"top_p": 0.5,
|
||||
"top_a": 0.75,
|
||||
@@ -11,12 +11,12 @@
|
||||
"rep_pen_range": 1024,
|
||||
"rep_pen_slope": 0.7,
|
||||
"sampler_order": [
|
||||
6,
|
||||
5,
|
||||
4,
|
||||
3,
|
||||
2,
|
||||
1,
|
||||
0,
|
||||
6
|
||||
0
|
||||
]
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"max_length": 2048,
|
||||
"temp": 0.7,
|
||||
"genamt": 100,
|
||||
"temp": 0.7,
|
||||
"top_k": 0,
|
||||
"top_p": 1,
|
||||
"top_a": 0,
|
||||
@@ -11,12 +11,12 @@
|
||||
"rep_pen_range": 1024,
|
||||
"rep_pen_slope": 0.7,
|
||||
"sampler_order": [
|
||||
6,
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6
|
||||
5
|
||||
]
|
||||
}
|
||||
@@ -1,15 +1,6 @@
|
||||
{
|
||||
"apikey": "",
|
||||
"andepth": 1,
|
||||
"sampler_order": [
|
||||
6,
|
||||
4,
|
||||
3,
|
||||
2,
|
||||
0,
|
||||
1,
|
||||
5
|
||||
],
|
||||
"max_length": 2048,
|
||||
"genamt": 90,
|
||||
"temp": 0.8,
|
||||
"top_p": 0.94,
|
||||
"top_k": 15,
|
||||
@@ -19,36 +10,13 @@
|
||||
"rep_pen": 1.02,
|
||||
"rep_pen_slope": 0.8,
|
||||
"rep_pen_range": 256.0,
|
||||
"genamt": 90,
|
||||
"max_length": 2048,
|
||||
"ikgen": 200,
|
||||
"formatoptns": {
|
||||
"frmttriminc": true,
|
||||
"frmtrmblln": false,
|
||||
"frmtrmspch": false,
|
||||
"frmtadsnsp": true,
|
||||
"singleline": false
|
||||
},
|
||||
"numseqs": 1,
|
||||
"widepth": 3,
|
||||
"useprompt": false,
|
||||
"adventure": false,
|
||||
"chatmode": false,
|
||||
"chatname": "You",
|
||||
"dynamicscan": false,
|
||||
"nopromptgen": false,
|
||||
"rngpersist": false,
|
||||
"nogenmod": false,
|
||||
"fulldeterminism": false,
|
||||
"autosave": false,
|
||||
"welcome": "## Warning: This model has a very heavy NSFW bias and is not suitable for use by minors!\n\nYou are currently running story-writing model `Erebus, version 1 (20B).`\n\n This model is made by [Mr. Seeker](https://www.patreon.com/mrseeker) with help of ProudNoob and the KoboldAI team.\n\n### How to use this model\n\nErebus is designed to generate short stories and novels. Use the author's note to give it a certain genre to follow, use memory to give an overview of the story and use World Information to give specific details about the characters. To start off, give the AI an idea of what you are writing about by setting the scene. Give the AI around 10 sentences that make your story interesting to read. Introduce your character, describe the world, blow something up, or let the AI use its creative mind.",
|
||||
"output_streaming": true,
|
||||
"show_probs": false,
|
||||
"show_budget": false,
|
||||
"seed": null,
|
||||
"newlinemode": "n",
|
||||
"antemplate": "",
|
||||
"userscripts": [],
|
||||
"corescript": "default.lua",
|
||||
"softprompt": ""
|
||||
"sampler_order": [
|
||||
6,
|
||||
4,
|
||||
3,
|
||||
2,
|
||||
0,
|
||||
1,
|
||||
5
|
||||
]
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"max_length": 2048,
|
||||
"temp": 0.66,
|
||||
"genamt": 100,
|
||||
"temp": 0.66,
|
||||
"top_k": 0,
|
||||
"top_p": 1,
|
||||
"top_a": 0.96,
|
||||
@@ -11,12 +11,12 @@
|
||||
"rep_pen_range": 1024,
|
||||
"rep_pen_slope": 0.7,
|
||||
"sampler_order": [
|
||||
6,
|
||||
4,
|
||||
5,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
3,
|
||||
6
|
||||
3
|
||||
]
|
||||
}
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"max_length": 2048,
|
||||
"temp": 0.94,
|
||||
"genamt": 100,
|
||||
"temp": 0.94,
|
||||
"top_k": 12,
|
||||
"top_p": 1,
|
||||
"top_a": 0,
|
||||
@@ -11,12 +11,12 @@
|
||||
"rep_pen_range": 2048,
|
||||
"rep_pen_slope": 0.2,
|
||||
"sampler_order": [
|
||||
6,
|
||||
5,
|
||||
0,
|
||||
2,
|
||||
3,
|
||||
1,
|
||||
4,
|
||||
6
|
||||
4
|
||||
]
|
||||
}
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"max_length": 2048,
|
||||
"temp": 1.5,
|
||||
"genamt": 100,
|
||||
"temp": 1.5,
|
||||
"top_k": 85,
|
||||
"top_p": 0.24,
|
||||
"top_a": 0,
|
||||
@@ -11,12 +11,12 @@
|
||||
"rep_pen_range": 2048,
|
||||
"rep_pen_slope": 0,
|
||||
"sampler_order": [
|
||||
6,
|
||||
5,
|
||||
0,
|
||||
2,
|
||||
3,
|
||||
1,
|
||||
4,
|
||||
6
|
||||
4
|
||||
]
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"max_length": 2048,
|
||||
"temp": 1.05,
|
||||
"genamt": 100,
|
||||
"temp": 1.05,
|
||||
"top_k": 0,
|
||||
"top_p": 0.95,
|
||||
"top_a": 0,
|
||||
@@ -11,12 +11,12 @@
|
||||
"rep_pen_range": 1024,
|
||||
"rep_pen_slope": 0.7,
|
||||
"sampler_order": [
|
||||
6,
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6
|
||||
5
|
||||
]
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"max_length": 2048,
|
||||
"temp": 1.07,
|
||||
"genamt": 100,
|
||||
"temp": 1.07,
|
||||
"top_k": 100,
|
||||
"top_p": 1,
|
||||
"top_a": 0,
|
||||
@@ -11,12 +11,12 @@
|
||||
"rep_pen_range": 404,
|
||||
"rep_pen_slope": 0.8,
|
||||
"sampler_order": [
|
||||
6,
|
||||
0,
|
||||
5,
|
||||
3,
|
||||
2,
|
||||
1,
|
||||
4,
|
||||
6
|
||||
4
|
||||
]
|
||||
}
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"max_length": 2048,
|
||||
"temp": 0.44,
|
||||
"genamt": 100,
|
||||
"temp": 0.44,
|
||||
"top_k": 0,
|
||||
"top_p": 1,
|
||||
"top_a": 0,
|
||||
@@ -11,12 +11,12 @@
|
||||
"rep_pen_range": 2048,
|
||||
"rep_pen_slope": 6.8,
|
||||
"sampler_order": [
|
||||
6,
|
||||
5,
|
||||
0,
|
||||
2,
|
||||
3,
|
||||
1,
|
||||
4,
|
||||
6
|
||||
4
|
||||
]
|
||||
}
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"max_length": 2048,
|
||||
"temp": 1.35,
|
||||
"genamt": 100,
|
||||
"temp": 1.35,
|
||||
"top_k": 0,
|
||||
"top_p": 1,
|
||||
"top_a": 0,
|
||||
@@ -11,12 +11,12 @@
|
||||
"rep_pen_range": 2048,
|
||||
"rep_pen_slope": 0.1,
|
||||
"sampler_order": [
|
||||
6,
|
||||
3,
|
||||
2,
|
||||
5,
|
||||
0,
|
||||
1,
|
||||
4,
|
||||
6
|
||||
4
|
||||
]
|
||||
}
|
||||
@@ -1,21 +1,15 @@
|
||||
{
|
||||
"file_version": 2,
|
||||
"max_length": 1400,
|
||||
"ikmax": 3000,
|
||||
"genamt": 80,
|
||||
"ikgen": 200,
|
||||
"rep_pen": 1.04,
|
||||
"rep_pen_slope": 0.0,
|
||||
"rep_pen_range": 1400,
|
||||
"temp": 1,
|
||||
"top_p": 1,
|
||||
"top_k": 0,
|
||||
"top_a": 0.0,
|
||||
"tfs": 0.97,
|
||||
"typical": 1.0,
|
||||
"numseqs": 1,
|
||||
"fp32_model": false,
|
||||
"modeldim": 2560,
|
||||
"rep_pen": 1.04,
|
||||
"rep_pen_slope": 0.0,
|
||||
"rep_pen_range": 1400,
|
||||
"sampler_order": [
|
||||
6,
|
||||
0,
|
||||
@@ -24,23 +18,5 @@
|
||||
3,
|
||||
4,
|
||||
5
|
||||
],
|
||||
"newlinemode": "n",
|
||||
"lazy_load": true,
|
||||
"revision": null,
|
||||
"selected_preset": "",
|
||||
"horde_wait_time": 0,
|
||||
"horde_queue_position": 0,
|
||||
"horde_queue_size": 0,
|
||||
"model": "pygmalion-1.3b",
|
||||
"model_type": "gpt_neo",
|
||||
"url": "https://api.inferkit.com/v1/models/standard/generate",
|
||||
"oaiurl": "",
|
||||
"oaiengines": "https://api.openai.com/v1/engines",
|
||||
"colaburl": "/request",
|
||||
"apikey": "",
|
||||
"oaiapikey": "",
|
||||
"configname": "pygmalion-1.3b",
|
||||
"online_model": "",
|
||||
"alt_multi_gen": false
|
||||
]
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"max_length": 100,
|
||||
"temp": 1,
|
||||
"genamt": 100,
|
||||
"temp": 1,
|
||||
"top_k": 0,
|
||||
"top_p": 0.95,
|
||||
"top_a": 0,
|
||||
|
||||
+13
-13
@@ -1,22 +1,22 @@
|
||||
{
|
||||
"max_length": 2048,
|
||||
"genamt": 100,
|
||||
"rep_pen": 1.1,
|
||||
"rep_pen_range": 2048,
|
||||
"rep_pen_slope": 0.2,
|
||||
"sampler_order": [
|
||||
5,
|
||||
0,
|
||||
2,
|
||||
3,
|
||||
1,
|
||||
4,
|
||||
6
|
||||
],
|
||||
"temp": 0.72,
|
||||
"tfs": 1,
|
||||
"top_a": 0,
|
||||
"top_k": 0,
|
||||
"top_p": 0.73,
|
||||
"typical": 1
|
||||
"typical": 1,
|
||||
"rep_pen": 1.1,
|
||||
"rep_pen_range": 2048,
|
||||
"rep_pen_slope": 0.2,
|
||||
"sampler_order": [
|
||||
6,
|
||||
5,
|
||||
0,
|
||||
2,
|
||||
3,
|
||||
1,
|
||||
4
|
||||
]
|
||||
}
|
||||
+19
-19
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"temp": 1.68,
|
||||
"top_p": 0.17,
|
||||
"top_k": 77,
|
||||
"typical_p": 1,
|
||||
"top_a": 0.42,
|
||||
"tfs": 0.97,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 0,
|
||||
"rep_pen": 1.02,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
{
|
||||
"temp": 1.68,
|
||||
"top_p": 0.17,
|
||||
"top_k": 77,
|
||||
"typical_p": 1,
|
||||
"top_a": 0.42,
|
||||
"tfs": 0.97,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 0,
|
||||
"rep_pen": 1.02,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
+19
-19
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"temp": 0.87,
|
||||
"top_p": 0.99,
|
||||
"top_k": 85,
|
||||
"typical_p": 0.68,
|
||||
"top_a": 0,
|
||||
"tfs": 0.68,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 0,
|
||||
"rep_pen": 1.01,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
{
|
||||
"temp": 0.87,
|
||||
"top_p": 0.99,
|
||||
"top_k": 85,
|
||||
"typical_p": 0.68,
|
||||
"top_a": 0,
|
||||
"tfs": 0.68,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 0,
|
||||
"rep_pen": 1.01,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
+19
-20
@@ -1,20 +1,19 @@
|
||||
{
|
||||
|
||||
"temp": 1.31,
|
||||
"top_p": 0.14,
|
||||
"top_k": 49,
|
||||
"typical_p": 1,
|
||||
"top_a": 0.52,
|
||||
"tfs": 1,
|
||||
"epsilon_cutoff": 1.49,
|
||||
"eta_cutoff": 10.42,
|
||||
"rep_pen": 1.17,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
{
|
||||
"temp": 1.31,
|
||||
"top_p": 0.14,
|
||||
"top_k": 49,
|
||||
"typical_p": 1,
|
||||
"top_a": 0.52,
|
||||
"tfs": 1,
|
||||
"epsilon_cutoff": 1.49,
|
||||
"eta_cutoff": 10.42,
|
||||
"rep_pen": 1.17,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
+19
-19
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"temp": 0.98,
|
||||
"top_p": 0.37,
|
||||
"top_k": 100,
|
||||
"typical_p": 1,
|
||||
"top_a": 0,
|
||||
"tfs": 1,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 0,
|
||||
"rep_pen": 1.18,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
{
|
||||
"temp": 0.98,
|
||||
"top_p": 0.37,
|
||||
"top_k": 100,
|
||||
"typical_p": 1,
|
||||
"top_a": 0,
|
||||
"tfs": 1,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 0,
|
||||
"rep_pen": 1.18,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
+19
-19
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"temp": 1.53,
|
||||
"top_p": 0.64,
|
||||
"top_k": 33,
|
||||
"typical_p": 1,
|
||||
"top_a": 0.04,
|
||||
"tfs": 1,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 0,
|
||||
"rep_pen": 1.07,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
{
|
||||
"temp": 1.53,
|
||||
"top_p": 0.64,
|
||||
"top_k": 33,
|
||||
"typical_p": 1,
|
||||
"top_a": 0.04,
|
||||
"tfs": 1,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 0,
|
||||
"rep_pen": 1.07,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
+19
-19
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"temp": 0.7,
|
||||
"top_p": 0.9,
|
||||
"top_k": 20,
|
||||
"typical_p": 1,
|
||||
"top_a": 0.75,
|
||||
"tfs": 1,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 0,
|
||||
"rep_pen": 1.15,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
{
|
||||
"temp": 0.7,
|
||||
"top_p": 0.9,
|
||||
"top_k": 20,
|
||||
"typical_p": 1,
|
||||
"top_a": 0.75,
|
||||
"tfs": 1,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 0,
|
||||
"rep_pen": 1.15,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
+19
-19
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"temp": 1.31,
|
||||
"top_p": 0.29,
|
||||
"top_k": 72,
|
||||
"typical_p": 1,
|
||||
"top_a": 0,
|
||||
"tfs": 1,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 0,
|
||||
"rep_pen": 1.09,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
{
|
||||
"temp": 1.31,
|
||||
"top_p": 0.29,
|
||||
"top_k": 72,
|
||||
"typical_p": 1,
|
||||
"top_a": 0,
|
||||
"tfs": 1,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 0,
|
||||
"rep_pen": 1.09,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
+19
-19
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"temp": 0.02,
|
||||
"top_p": 0.95,
|
||||
"top_k": 50,
|
||||
"typical_p": 1,
|
||||
"top_a": 0,
|
||||
"tfs": 1,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 0,
|
||||
"rep_pen": 1,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
{
|
||||
"temp": 0.02,
|
||||
"top_p": 0.95,
|
||||
"top_k": 50,
|
||||
"typical_p": 1,
|
||||
"top_a": 0,
|
||||
"tfs": 1,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 0,
|
||||
"rep_pen": 1,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
+19
-19
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"temp": 0.7,
|
||||
"top_p": 1,
|
||||
"top_k": 0,
|
||||
"typical_p": 1,
|
||||
"top_a": 0.2,
|
||||
"tfs": 0.95,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 0,
|
||||
"rep_pen": 1.15,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
{
|
||||
"temp": 0.7,
|
||||
"top_p": 1,
|
||||
"top_k": 0,
|
||||
"typical_p": 1,
|
||||
"top_a": 0.2,
|
||||
"tfs": 0.95,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 0,
|
||||
"rep_pen": 1.15,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
+19
-19
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"temp": 1.01,
|
||||
"top_p": 0.21,
|
||||
"top_k": 91,
|
||||
"typical_p": 1,
|
||||
"top_a": 0.75,
|
||||
"tfs": 1,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 10.78,
|
||||
"rep_pen": 1.21,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1.07,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
{
|
||||
"temp": 1.01,
|
||||
"top_p": 0.21,
|
||||
"top_k": 91,
|
||||
"typical_p": 1,
|
||||
"top_a": 0.75,
|
||||
"tfs": 1,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 10.78,
|
||||
"rep_pen": 1.21,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1.07,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
+19
-19
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"temp": 0.82,
|
||||
"top_p": 0.21,
|
||||
"top_k": 72,
|
||||
"typical_p": 1,
|
||||
"top_a": 0,
|
||||
"tfs": 1,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 0,
|
||||
"rep_pen": 1.19,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
{
|
||||
"temp": 0.82,
|
||||
"top_p": 0.21,
|
||||
"top_k": 72,
|
||||
"typical_p": 1,
|
||||
"top_a": 0,
|
||||
"tfs": 1,
|
||||
"epsilon_cutoff": 0,
|
||||
"eta_cutoff": 0,
|
||||
"rep_pen": 1.19,
|
||||
"no_repeat_ngram_size": 0,
|
||||
"penalty_alpha": 0,
|
||||
"num_beams": 1,
|
||||
"length_penalty": 1,
|
||||
"min_length": 0,
|
||||
"encoder_rep_pen": 1,
|
||||
"do_sample": true,
|
||||
"early_stopping": false
|
||||
}
|
||||
+170
-165
@@ -1478,7 +1478,7 @@
|
||||
<option value="windowai">Window AI / OpenRouter</option>
|
||||
<option value="claude">Claude</option>
|
||||
</select>
|
||||
<form id="openai_form" data-source="openai">
|
||||
<form id="openai_form" data-source="openai" action="javascript:void(null);" method="post" enctype="multipart/form-data">
|
||||
<h4>OpenAI API key</h4>
|
||||
<span>
|
||||
<ol>
|
||||
@@ -1516,7 +1516,7 @@
|
||||
<a id="openai_api_usage" href="javascript:void(0);">View API Usage Metrics</a>
|
||||
</div>
|
||||
</form>
|
||||
<form id="claude_form" data-source="claude">
|
||||
<form id="claude_form" data-source="claude" action="javascript:void(null);" method="post" enctype="multipart/form-data">
|
||||
<h4>Claude API Key</h4>
|
||||
<div>
|
||||
Get your key from <a target="_blank" href="https://console.anthropic.com/account/keys">Anthropic's developer console</a>.
|
||||
@@ -1555,7 +1555,7 @@
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form id="windowai_form" data-source="windowai">
|
||||
<form id="windowai_form" data-source="windowai" action="javascript:void(null);" method="post" enctype="multipart/form-data">
|
||||
<div>
|
||||
<h4 data-i18n="Window AI Model">Window AI Model</h4>
|
||||
<select id="model_windowai_select">
|
||||
@@ -2002,17 +2002,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex1 range-block flex-container flexFlowColumn">
|
||||
<div class="alignitemsflexstart flex1 range-block flex-container flexFlowColumn">
|
||||
<label title="Entries can activate other entries by mentioning their keywords" class="checkbox_label">
|
||||
<input id="world_info_recursive" type="checkbox" />
|
||||
<small>
|
||||
Recursive scanning
|
||||
Recursive Scan
|
||||
</small>
|
||||
</label>
|
||||
<label title="Lookup for the entry keys in the context will respect the case" class="checkbox_label">
|
||||
<input id="world_info_case_sensitive" type="checkbox" />
|
||||
<small>
|
||||
Case-sensitive keys
|
||||
Case-sensitive
|
||||
</small>
|
||||
</label>
|
||||
<label title="If the entry key consists of only one word, it would not be matched as part of other words" class="checkbox_label">
|
||||
@@ -2074,6 +2074,103 @@
|
||||
<div id="version_display"></div>
|
||||
</div>
|
||||
<div class="flex-container spaceEvenly">
|
||||
<div id="UI-Theme-Block" class="flex-container flexFlowColumn drawer33pWidth">
|
||||
<div id="color-picker-block" class="flex-container flexFlowColumn">
|
||||
<h4><span data-i18n="UI Colors">UI Colors</span></h4>
|
||||
<div class="flex-container">
|
||||
<toolcool-color-picker id="main-text-color-picker"></toolcool-color-picker>
|
||||
<span data-i18n="Main Text">Main Text</span>
|
||||
</div>
|
||||
<div class="flex-container">
|
||||
<toolcool-color-picker id="italics-color-picker"></toolcool-color-picker>
|
||||
<span data-i18n="Italics Text">Italics Text</span>
|
||||
</div>
|
||||
<div class="flex-container">
|
||||
<toolcool-color-picker id="quote-color-picker"></toolcool-color-picker>
|
||||
<span data-i18n="Quote Text">Quote Text</span>
|
||||
</div>
|
||||
<div class="flex-container">
|
||||
<toolcool-color-picker id="shadow-color-picker"></toolcool-color-picker>
|
||||
<span data-i18n="Shadow Color">Text Shadow</span>
|
||||
</div>
|
||||
<!-- <div class="flex-container">
|
||||
<toolcool-color-picker id="fastui-bg-color-picker"></toolcool-color-picker>
|
||||
<span data-i18n="FastUI BG">FastUI BG</span>
|
||||
</div> -->
|
||||
<div class="flex-container">
|
||||
<toolcool-color-picker id="blur-tint-color-picker"></toolcool-color-picker>
|
||||
<span data-i18n="Blur Tint">UI Background</span>
|
||||
</div>
|
||||
<div class="flex-container">
|
||||
<toolcool-color-picker id="user-mes-blur-tint-color-picker"></toolcool-color-picker>
|
||||
<span data-i18n="User Message Blur Tint">User Message</span>
|
||||
</div>
|
||||
<div class="flex-container">
|
||||
<toolcool-color-picker id="bot-mes-blur-tint-color-picker"></toolcool-color-picker>
|
||||
<span data-i18n="AI Message Blur Tint">AI Message</span>
|
||||
</div>
|
||||
<div id="font-blur-UIpresets-block" class="flex-container flexFlowColumn">
|
||||
<div id="font-scale-block" class="range-block">
|
||||
<div class="range-block-title" data-i18n="Font Scale">
|
||||
Font Scale
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="font_scale" name="font_scale" min="0.8" max="1.2" step="0.05">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<div contenteditable="true" data-for="font_scale" id="font_scale_counter">
|
||||
select
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="blur-strength-block" class="range-block">
|
||||
<div class="range-block-title" data-i18n="Blur Strength">
|
||||
Blur Strength
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="blur_strength" name="blur_strength" min="0" max="30" step="1">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<div contenteditable="true" data-for="blur_strength" id="blur_strength_counter">
|
||||
select
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="shadow-width-block" class="range-block">
|
||||
<div class="range-block-title" data-i18n="Text Shadow Width">
|
||||
Text Shadow Width
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="shadow_width" name="shadow_width" min="0" max="5" step="1">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<div contenteditable="true" data-for="shadow_width" id="shadow_width_counter">
|
||||
select
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="UI-presets-block" class="flex-container flexFlowColumn">
|
||||
<h4>
|
||||
<span data-i18n="UI Theme Preset">UI Theme Preset</span>
|
||||
</h4>
|
||||
<div class="flex-container flexnowrap alignitemscenter">
|
||||
<select id="themes" class="margin0 margin-r5">
|
||||
</select>
|
||||
<div id="ui-preset-save-button" title="Save changes to a new theme file" class="menu_button padding5 margin0">
|
||||
<i class="fa-solid fa-save"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div name="UI Customization" class="flex-container drawer33pWidth">
|
||||
<div class="ui-settings">
|
||||
<h4><span data-i18n="UI Customization">UI Customization</span></h4>
|
||||
@@ -2183,103 +2280,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="UI-Theme-Block" class="flex-container flexFlowColumn drawer33pWidth">
|
||||
<div id="color-picker-block" class="flex-container flexFlowColumn">
|
||||
<h4><span data-i18n="UI Colors">UI Colors</span></h4>
|
||||
<div class="flex-container">
|
||||
<toolcool-color-picker id="main-text-color-picker"></toolcool-color-picker>
|
||||
<span data-i18n="Main Text">Main Text</span>
|
||||
</div>
|
||||
<div class="flex-container">
|
||||
<toolcool-color-picker id="italics-color-picker"></toolcool-color-picker>
|
||||
<span data-i18n="Italics Text">Italics Text</span>
|
||||
</div>
|
||||
<div class="flex-container">
|
||||
<toolcool-color-picker id="quote-color-picker"></toolcool-color-picker>
|
||||
<span data-i18n="Quote Text">Quote Text</span>
|
||||
</div>
|
||||
<div class="flex-container">
|
||||
<toolcool-color-picker id="shadow-color-picker"></toolcool-color-picker>
|
||||
<span data-i18n="Shadow Color">Text Shadow</span>
|
||||
</div>
|
||||
<!-- <div class="flex-container">
|
||||
<toolcool-color-picker id="fastui-bg-color-picker"></toolcool-color-picker>
|
||||
<span data-i18n="FastUI BG">FastUI BG</span>
|
||||
</div> -->
|
||||
<div class="flex-container">
|
||||
<toolcool-color-picker id="blur-tint-color-picker"></toolcool-color-picker>
|
||||
<span data-i18n="Blur Tint">UI Background</span>
|
||||
</div>
|
||||
<div class="flex-container">
|
||||
<toolcool-color-picker id="user-mes-blur-tint-color-picker"></toolcool-color-picker>
|
||||
<span data-i18n="User Message Blur Tint">User Message</span>
|
||||
</div>
|
||||
<div class="flex-container">
|
||||
<toolcool-color-picker id="bot-mes-blur-tint-color-picker"></toolcool-color-picker>
|
||||
<span data-i18n="AI Message Blur Tint">AI Message</span>
|
||||
</div>
|
||||
<div id="font-blur-UIpresets-block" class="flex-container flexFlowColumn">
|
||||
<div id="font-scale-block" class="range-block">
|
||||
<div class="range-block-title" data-i18n="Font Scale">
|
||||
Font Scale
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="font_scale" name="font_scale" min="0.8" max="1.2" step="0.05">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<div contenteditable="true" data-for="font_scale" id="font_scale_counter">
|
||||
select
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="blur-strength-block" class="range-block">
|
||||
<div class="range-block-title" data-i18n="Blur Strength">
|
||||
Blur Strength
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="blur_strength" name="blur_strength" min="0" max="30" step="1">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<div contenteditable="true" data-for="blur_strength" id="blur_strength_counter">
|
||||
select
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="shadow-width-block" class="range-block">
|
||||
<div class="range-block-title" data-i18n="Text Shadow Width">
|
||||
Text Shadow Width
|
||||
</div>
|
||||
<div class="range-block-range-and-counter">
|
||||
<div class="range-block-range">
|
||||
<input type="range" id="shadow_width" name="shadow_width" min="0" max="5" step="1">
|
||||
</div>
|
||||
<div class="range-block-counter">
|
||||
<div contenteditable="true" data-for="shadow_width" id="shadow_width_counter">
|
||||
select
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="UI-presets-block" class="flex-container flexFlowColumn">
|
||||
<h4>
|
||||
<span data-i18n="UI Theme Preset">UI Theme Preset</span>
|
||||
</h4>
|
||||
<div class="flex-container flexnowrap alignitemscenter">
|
||||
<select id="themes" class="margin0 margin-r5">
|
||||
</select>
|
||||
<div id="ui-preset-save-button" title="Save changes to a new theme file" class="menu_button padding5 margin0">
|
||||
<i class="fa-solid fa-save"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="power-user-options-block" class="flex-container drawer33pWidth">
|
||||
<div id="power-user-option-checkboxes">
|
||||
<h4 data-i18n="Power User Options">Power User Options</h4>
|
||||
@@ -2440,7 +2441,7 @@
|
||||
<div class="drawer-content closedDrawer">
|
||||
<div class="flex-container wide100p alignitemscenter spaceBetween">
|
||||
<h3><span data-i18n="Persona Management">Persona Management</span></h3>
|
||||
|
||||
<a href="https://docs.sillytavern.app/usage/core-concepts/personas/" target="_blank">How do I use this?</a>
|
||||
<div id="persona-management-block" class="flex-container wide100p">
|
||||
<div class="flex1">
|
||||
<h4 data-i18n="Name">Name</h4>
|
||||
@@ -3094,14 +3095,18 @@
|
||||
<span data-i18n="Keywords">
|
||||
Keywords
|
||||
</span>
|
||||
<span>(UID:
|
||||
<span class="world_entry_form_uid_value"></span>
|
||||
)
|
||||
</span>
|
||||
</small>
|
||||
<small class="displayNone">
|
||||
<span data-i18n="Separate with commas">
|
||||
Separate with commas
|
||||
<span data-i18n="Comma separated (required)">
|
||||
Comma separated (required)
|
||||
</span>
|
||||
</small>
|
||||
</label>
|
||||
<textarea class="text_pole keyprimarytextpole" name="key" rows="1" placeholder="Separate with commas" maxlength="1000"></textarea>
|
||||
<textarea class="text_pole keyprimarytextpole" name="key" rows="1" placeholder="Comma separated (required)" maxlength="1000"></textarea>
|
||||
</div>
|
||||
<div class="world_entry_form_control keysecondary">
|
||||
<label for="keysecondary">
|
||||
@@ -3111,12 +3116,12 @@
|
||||
</span>
|
||||
</small>
|
||||
<small class="displayNone">
|
||||
<span data-i18n="Separate with commas">
|
||||
Separate with commas
|
||||
<span data-i18n="Comma seperated (ignored if empty)">
|
||||
Comma seperated (ignored if empty)
|
||||
</span>
|
||||
</small>
|
||||
</label>
|
||||
<textarea class="text_pole keysecondarytextpole" name="keysecondary" rows="1" placeholder="Separate with commas" maxlength="1000"></textarea>
|
||||
<textarea class="text_pole keysecondarytextpole" name="keysecondary" rows="1" placeholder="Comma separated (ignored if empty)" maxlength="1000"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>
|
||||
@@ -3129,6 +3134,10 @@
|
||||
<small>
|
||||
<span data-i18n="Content">
|
||||
Content
|
||||
<span>(Tokens:
|
||||
<span class="world_entry_form_token_counter">0</span>
|
||||
)
|
||||
</span>
|
||||
</span>
|
||||
</small>
|
||||
<small class="displayNone">
|
||||
@@ -3164,6 +3173,10 @@
|
||||
<input type="checkbox" name="constant" />
|
||||
<span data-i18n="Constant">Constant</span>
|
||||
</label>
|
||||
<label class="checkbox flex-container alignitemscenter">
|
||||
<input type="checkbox" name="disable" />
|
||||
<span data-i18n="Disable">Disable</span>
|
||||
</label>
|
||||
<label class="checkbox flex-container">
|
||||
<input type="checkbox" name="selective" />
|
||||
<span data-i18n="Selective">Selective</span>
|
||||
@@ -3177,65 +3190,57 @@
|
||||
<span data-i18n="Add Memo">Add Memo</span>
|
||||
</label>
|
||||
|
||||
</div>
|
||||
<div class="world_entry_form_control world_entry_form_radios wi-enter-footer-text ">
|
||||
<small>Placement</small>
|
||||
<div>
|
||||
<label><input type="radio" name="position" value="0">
|
||||
<span data-i18n="Before Char">Before Char</span>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label><input type="radio" name="position" value="1">
|
||||
<span data-i18n="After Char">After Char</span>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label><input type="radio" name="position" value="2">
|
||||
<span data-i18n="Author's Note">Author's Note Top</span>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label><input type="radio" name="position" value="3">
|
||||
<span data-i18n="Author's Note">Author's Note Bottom</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container flexFlowColumn flexNoGap">
|
||||
<div class="world_entry_form_control wi-enter-footer-text flex-container flexNoGap ">
|
||||
Insertion Order
|
||||
<input class="text_pole wideMax100px" type="number" name="order" placeholder="" />
|
||||
</div>
|
||||
|
||||
<div class="world_entry_form_control wi-enter-footer-text flex-container flexNoGap probabilityContainer">
|
||||
Probability (%)
|
||||
<input class="text_pole wideMax100px" type="number" name="probability" placeholder="" min="0" max="100" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-container flexFlowColumn flexNoGap wi-enter-footer-text ">
|
||||
<div class="world_entry_form_uid">
|
||||
UID:
|
||||
|
||||
<span class="world_entry_form_uid_value"></span>
|
||||
</div>
|
||||
<div class="world_entry_form_tokens">
|
||||
Tokens:
|
||||
|
||||
<span class="world_entry_form_token_counter">0</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wi-enter-footer-text">
|
||||
<label class="checkbox flex-container alignitemscenter">
|
||||
<input type="checkbox" name="disable" />
|
||||
<span data-i18n="Disable">Disable</span>
|
||||
</label>
|
||||
<label class="checkbox flex-container alignitemscenter">
|
||||
<input type="checkbox" name="exclude_recursion" />
|
||||
<span data-i18n="Exclude from recursion">Exclude from recursion</span>
|
||||
<span data-i18n="Exclude from recursion">
|
||||
Non-recursable
|
||||
</span>
|
||||
</label>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- <div name="injectioStratBlock" class="world_entry_form_control world_entry_form_radios wi-enter-footer-text ">
|
||||
<label for="injectionStrat">Injection:</label>
|
||||
<small>
|
||||
<select name="injectionStrat">
|
||||
<option value="0">Normal</option>
|
||||
<option value="1">Constant</option>
|
||||
<option value="2">Disabled</option>
|
||||
</select>
|
||||
</small>
|
||||
</div> -->
|
||||
|
||||
<div name="PositionBlock" class="world_entry_form_control world_entry_form_radios wi-enter-footer-text ">
|
||||
<label for="position">Position:</label>
|
||||
<small>
|
||||
<select name="position">
|
||||
<option value="0">Before Char Defs</option>
|
||||
<option value="1">After Char Defs</option>
|
||||
<option value="2">Before AN</option>
|
||||
<option value="3">After AN</option>
|
||||
</select>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="world_entry_form_control wi-enter-footer-text flex-container flexNoGap ">
|
||||
<label for="order">Order:</label>
|
||||
<input class="text_pole wideMax100px margin0" type="number" name="order" placeholder="" />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="world_entry_form_control wi-enter-footer-text flex-container flexNoGap probabilityContainer">
|
||||
<label for="probability"></label>Probability:</label>
|
||||
<input class="text_pole wideMax100px margin0" type="number" name="probability" placeholder="" min="0" max="100" />
|
||||
</div>
|
||||
|
||||
<div class="flex-container flexFlowColumn flexNoGap wi-enter-footer-text ">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<input class="menu_button delete_entry_button" type="submit" value="Delete Entry" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -3556,4 +3561,4 @@
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
+79
-29
@@ -89,6 +89,7 @@ import {
|
||||
openai_messages_count,
|
||||
getTokenCountOpenAI,
|
||||
chat_completion_sources,
|
||||
getTokenizerModel,
|
||||
} from "./scripts/openai.js";
|
||||
|
||||
import {
|
||||
@@ -318,6 +319,9 @@ const system_message_types = {
|
||||
BOOKMARK_BACK: "bookmark_back",
|
||||
NARRATOR: "narrator",
|
||||
COMMENT: "comment",
|
||||
SLASH_COMMANDS: "slash_commands",
|
||||
FORMATTING: "formatting",
|
||||
HOTKEYS: "hotkeys",
|
||||
};
|
||||
|
||||
const extension_prompt_types = {
|
||||
@@ -333,12 +337,31 @@ const system_messages = {
|
||||
is_system: true,
|
||||
is_name: true,
|
||||
mes: [
|
||||
`Hi there! The following chat formatting commands are supported:
|
||||
`Hello there! Please select the help topic you would like to learn more about:
|
||||
<ul>
|
||||
<li><tt>{{text}}</tt> - sets a one-time behavioral bias for the AI. Resets when you send the next message.
|
||||
</li>
|
||||
<li><a href="javascript:displayHelp('1')">Slash Commands</a> (or <tt>/help slash</tt>)</li>
|
||||
<li><a href="javascript:displayHelp('2')">Formatting</a> (or <tt>/help format</tt>)</li>
|
||||
<li><a href="javascript:displayHelp('3')">Hotkeys</a> (or <tt>/help hotkeys</tt>)</li>
|
||||
</ul>
|
||||
Hotkeys/Keybinds:
|
||||
<br><b>Still got questions left? The <a target="_blank" href="https://docs.sillytavern.app/">Official SillyTavern Documentation Website</a> has much more information!</b>`
|
||||
]
|
||||
},
|
||||
slash_commands: {
|
||||
name: systemUserName,
|
||||
force_avatar: system_avatar,
|
||||
is_user: false,
|
||||
is_system: true,
|
||||
is_name: true,
|
||||
mes: '',
|
||||
},
|
||||
hotkeys: {
|
||||
name: systemUserName,
|
||||
force_avatar: system_avatar,
|
||||
is_user: false,
|
||||
is_system: true,
|
||||
is_name: true,
|
||||
mes: [
|
||||
`Hotkeys/Keybinds:
|
||||
<ul>
|
||||
<li><tt>Up</tt> = Edit last message in chat</li>
|
||||
<li><tt>Ctrl+Up</tt> = Edit last USER message in chat</li>
|
||||
@@ -350,7 +373,26 @@ const system_messages = {
|
||||
<li><tt>Escape</tt> = stop AI response generation</li>
|
||||
<li><tt>Ctrl+Shift+Up</tt> = Scroll to context line</li>
|
||||
<li><tt>Ctrl+Shift+Down</tt> = Scroll chat to bottom</li>
|
||||
|
||||
</ul>`
|
||||
]
|
||||
},
|
||||
formatting: {
|
||||
name: systemUserName,
|
||||
force_avatar: system_avatar,
|
||||
is_user: false,
|
||||
is_system: true,
|
||||
is_name: true,
|
||||
mes: [
|
||||
`Text formatting commands:
|
||||
<ul>
|
||||
<li><tt>{{text}}</tt> - sets a one-time behavioral bias for the AI. Resets when you send the next message.</li>
|
||||
<li><tt>*text*</tt> - displays as <i>italics</i></li>
|
||||
<li><tt>**text**</tt> - displays as <b>bold</b></li>
|
||||
<li><tt>***text***</tt> - displays as <b><i>bold italics</i></b></li>
|
||||
<li><tt>` + "```" + `text` + "```" + `</tt> - displays as a code block</li>
|
||||
<li><tt>` + "`" + `text` + "`" + `</tt> - displays as inline code</li>
|
||||
<li><tt>$$ text $$</tt> - renders a LaTeX formula (if enabled)</li>
|
||||
<li><tt>$ text $</tt> - renders an AsciiMath formula (if enabled)</li>
|
||||
</ul>`
|
||||
]
|
||||
},
|
||||
@@ -1525,9 +1567,8 @@ function sendSystemMessage(type, text, extra = {}) {
|
||||
newMessage.mes = text;
|
||||
}
|
||||
|
||||
if (type == system_message_types.HELP) {
|
||||
newMessage.mes += getSlashCommandsHelp();
|
||||
newMessage.mes += `<br><b>Still got questions left? The <a target="_blank" href="https://docs.sillytavern.app/">Official SillyTavern Documentation Website</a> has much more information!</b>`;
|
||||
if (type == system_message_types.SLASH_COMMANDS) {
|
||||
newMessage.mes = getSlashCommandsHelp();
|
||||
}
|
||||
|
||||
if (!newMessage.extra) {
|
||||
@@ -1612,7 +1653,7 @@ function getPersonaDescription(storyString) {
|
||||
default:
|
||||
if (shouldWIAddPrompt) {
|
||||
const originalAN = extension_prompts[NOTE_MODULE_NAME].value
|
||||
const ANWithDesc = persona_description_positions.TOP_AN
|
||||
const ANWithDesc = power_user.persona_description_position === persona_description_positions.TOP_AN
|
||||
? `${power_user.persona_description}\n${originalAN}`
|
||||
: `${originalAN}\n${power_user.persona_description}`;
|
||||
setExtensionPrompt(NOTE_MODULE_NAME, ANWithDesc, chat_metadata[metadata_keys.position], chat_metadata[metadata_keys.depth]);
|
||||
@@ -3076,7 +3117,7 @@ function promptItemize(itemizedPrompts, requestedMesId) {
|
||||
var promptBiasTokensPercentage = ((oaiBiasTokens / (finalPromptTokens)) * 100).toFixed(2);
|
||||
var worldInfoStringTokensPercentage = ((worldInfoStringTokens / (finalPromptTokens)) * 100).toFixed(2);
|
||||
var allAnchorsTokensPercentage = ((allAnchorsTokens / (finalPromptTokens)) * 100).toFixed(2);
|
||||
var selectedTokenizer = `tiktoken (${oai_settings.openai_model})`;
|
||||
var selectedTokenizer = `tiktoken (${getTokenizerModel()})`;
|
||||
var oaiSystemTokens = oaiImpersonateTokens + oaiJailbreakTokens + oaiNudgeTokens + oaiStartTokens;
|
||||
var oaiSystemTokensPercentage = ((oaiSystemTokens / (finalPromptTokens)) * 100).toFixed(2);
|
||||
|
||||
@@ -3095,7 +3136,7 @@ function promptItemize(itemizedPrompts, requestedMesId) {
|
||||
callPopup(
|
||||
`
|
||||
<h3>Prompt Itemization</h3>
|
||||
Tokenizer: TikToken<br>
|
||||
Tokenizer: ${selectedTokenizer}<br>
|
||||
API Used: ${this_main_api}<br>
|
||||
<span class="tokenItemizingSubclass">
|
||||
Only the white numbers really matter. All numbers are estimates.
|
||||
@@ -4692,16 +4733,18 @@ async function getSettings(type) {
|
||||
$("#amount_gen_counter").text(`${amount_gen}`);
|
||||
|
||||
//Load which API we are using
|
||||
if (settings.main_api != undefined) {
|
||||
main_api = settings.main_api;
|
||||
$('#main_api').val(main_api);
|
||||
$("#main_api option[value=" + main_api + "]").attr(
|
||||
"selected",
|
||||
"true"
|
||||
);
|
||||
changeMainAPI();
|
||||
if (settings.main_api == undefined) {
|
||||
settings.main_api = 'kobold';
|
||||
}
|
||||
|
||||
main_api = settings.main_api;
|
||||
$('#main_api').val(main_api);
|
||||
$("#main_api option[value=" + main_api + "]").attr(
|
||||
"selected",
|
||||
"true"
|
||||
);
|
||||
changeMainAPI();
|
||||
|
||||
//Load User's Name and Avatar
|
||||
|
||||
user_avatar = settings.user_avatar;
|
||||
@@ -7864,8 +7907,8 @@ $(document).ready(function () {
|
||||
const pinnedDrawerClicked = drawer.hasClass('pinnedOpen');
|
||||
|
||||
if (!drawerWasOpenAlready) { //to open the drawer
|
||||
$('.openDrawer').not('.pinnedOpen').addClass('resizing').slideToggle(200, "swing", function () {
|
||||
$(this).closest('.drawer-content').removeClass('resizing');
|
||||
$('.openDrawer').not('.pinnedOpen').addClass('resizing').slideToggle(200, "swing", async function () {
|
||||
await delay(50); $(this).closest('.drawer-content').removeClass('resizing');
|
||||
});
|
||||
$('.openIcon').toggleClass('closedIcon openIcon');
|
||||
$('.openDrawer').not('.pinnedOpen').toggleClass('closedDrawer openDrawer');
|
||||
@@ -7878,16 +7921,17 @@ $(document).ready(function () {
|
||||
duration: 200,
|
||||
easing: "swing",
|
||||
start: function () {
|
||||
jQuery(this).css('display', 'flex');
|
||||
jQuery(this).css('display', 'flex'); //flex needed to make charlist scroll
|
||||
},
|
||||
complete: function () {
|
||||
complete: async function () {
|
||||
await delay(50);
|
||||
$(this).closest('.drawer-content').removeClass('resizing');
|
||||
$("#rm_print_characters_block").trigger("scroll");
|
||||
}
|
||||
})
|
||||
} else {
|
||||
$(this).closest('.drawer').find('.drawer-content').addClass('resizing').slideToggle(200, "swing", function () {
|
||||
$(this).closest('.drawer-content').removeClass('resizing');
|
||||
$(this).closest('.drawer').find('.drawer-content').addClass('resizing').slideToggle(200, "swing", async function () {
|
||||
await delay(50); $(this).closest('.drawer-content').removeClass('resizing');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -7896,13 +7940,13 @@ $(document).ready(function () {
|
||||
icon.toggleClass('closedIcon openIcon');
|
||||
|
||||
if (pinnedDrawerClicked) {
|
||||
$(drawer).addClass('resizing').slideToggle(200, "swing", function () {
|
||||
$(this).removeClass('resizing');
|
||||
$(drawer).addClass('resizing').slideToggle(200, "swing", async function () {
|
||||
await delay(50); $(this).removeClass('resizing');
|
||||
});
|
||||
}
|
||||
else {
|
||||
$('.openDrawer').not('.pinnedOpen').addClass('resizing').slideToggle(200, "swing", function () {
|
||||
$(this).closest('.drawer-content').removeClass('resizing');
|
||||
$('.openDrawer').not('.pinnedOpen').addClass('resizing').slideToggle(200, "swing", async function () {
|
||||
await delay(50); $(this).closest('.drawer-content').removeClass('resizing');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -7997,6 +8041,12 @@ $(document).ready(function () {
|
||||
loadMovingUIState();
|
||||
$(`.zoomed_avatar[forChar="${charname}"]`).css('display', 'block');
|
||||
dragElement(newElement)
|
||||
|
||||
$(`.zoomed_avatar[forChar="${charname}"] img`).on('dragstart', (e) => {
|
||||
console.log('saw drag on avatar!');
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
+105
-111
@@ -104,22 +104,6 @@ function waitForElement(querySelector, timeout) {
|
||||
});
|
||||
}
|
||||
|
||||
waitForElement("#expression-image", 10000).then(function () {
|
||||
|
||||
dragElement(document.getElementById("expression-holder"));
|
||||
dragElement(document.getElementById("floatingPrompt"));
|
||||
|
||||
}).catch(() => {
|
||||
console.log("expression holder not loaded yet");
|
||||
});
|
||||
|
||||
waitForElement("#floatingPrompt", 10000).then(function () {
|
||||
|
||||
dragElement(document.getElementById("floatingPrompt"));
|
||||
|
||||
}).catch(() => {
|
||||
console.log("floating prompt box not loaded yet");
|
||||
});
|
||||
|
||||
// Device detection
|
||||
export const deviceInfo = await getDeviceInfo();
|
||||
@@ -474,37 +458,28 @@ function OpenNavPanels() {
|
||||
|
||||
// Make the DIV element draggable:
|
||||
|
||||
|
||||
// SECOND UPDATE AIMING FOR MUTATIONS ONLY
|
||||
// THIRD UPDATE, prevent resize window breaks and smartly handle saving
|
||||
|
||||
export function dragElement(elmnt) {
|
||||
var hasBeenDraggedByUser = false;
|
||||
var isMouseDown = false;
|
||||
|
||||
var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
|
||||
var height, width, top, left, right, bottom;
|
||||
var height, width, top, left, right, bottom,
|
||||
maxX, maxY, winHeight, winWidth,
|
||||
topBarFirstX, topBarLastX, sheldWidth;
|
||||
|
||||
var oldTop = Number((String($(elmnt).css('top')).replace('px', '')))
|
||||
var oldLeft = Number((String($(elmnt).css('left')).replace('px', '')))
|
||||
var oldWidth = Number((String($(elmnt).css('width')).replace('px', '')))
|
||||
var oldHeight = Number((String($(elmnt).css('width')).replace('px', '')))
|
||||
var oldRight = Number((String($(elmnt).css('right')).replace('px', '')))
|
||||
var oldBottom = Number((String($(elmnt).css('bottom')).replace('px', '')))
|
||||
var elmntName = elmnt.attr('id');
|
||||
console.debug(`${elmntName} init state:
|
||||
T: ${$(elmnt).css('top')}
|
||||
L: ${$(elmnt).css('left')}
|
||||
W: ${$(elmnt).css('width')}
|
||||
H: ${$(elmnt).css('height')}
|
||||
R: ${$(elmnt).css('right')}
|
||||
B: ${$(elmnt).css('bottom')}
|
||||
---`);
|
||||
|
||||
|
||||
const elmntNameEscaped = $.escapeSelector(elmntName);
|
||||
const elmntHeader = $(`#${elmntNameEscaped}header`);
|
||||
|
||||
if (elmntHeader.length) {
|
||||
elmntHeader.off('mousedown').on('mousedown', (e) => {
|
||||
|
||||
dragMouseDown(e);
|
||||
});
|
||||
$(elmnt).off('mousedown').on('mousedown', () => { isMouseDown = true })
|
||||
} else {
|
||||
elmnt.off('mousedown').on('mousedown', dragMouseDown);
|
||||
}
|
||||
@@ -521,52 +496,87 @@ B: ${$(elmnt).css('bottom')}
|
||||
console.debug('aborting mutator')
|
||||
return
|
||||
}
|
||||
|
||||
const style = getComputedStyle(target);
|
||||
//console.log(style.top, style.left)
|
||||
//console.debug(left + width, winWidth, hasBeenDraggedByUser, isMouseDown)
|
||||
const style = getComputedStyle(target); //use computed values because not all CSS are set by default
|
||||
height = target.offsetHeight;
|
||||
width = target.offsetWidth;
|
||||
top = parseInt(style.top);
|
||||
left = parseInt(style.left);
|
||||
right = parseInt(style.right);
|
||||
bottom = parseInt(style.bottom);
|
||||
maxX = parseInt(width + left);
|
||||
maxY = parseInt(height + top);
|
||||
winWidth = window.innerWidth;
|
||||
winHeight = window.innerHeight;
|
||||
sheldWidth = parseInt($('html').css('--sheldWidth').slice(0, -2));
|
||||
topBarFirstX = (winWidth - sheldWidth) / 2;
|
||||
topBarLastX = topBarFirstX + sheldWidth;
|
||||
|
||||
//prepare an empty poweruser object for the item being altered if we don't have one already
|
||||
if (!power_user.movingUIState[elmntName]) {
|
||||
console.debug(`adding config property for ${elmntName}`)
|
||||
power_user.movingUIState[elmntName] = {};
|
||||
}
|
||||
|
||||
power_user.movingUIState[elmntName].top = top;
|
||||
power_user.movingUIState[elmntName].left = left;
|
||||
|
||||
if (!isNaN(oldWidth)
|
||||
&& !isNaN(oldHeight)
|
||||
&& (oldHeight !== height || oldWidth !== width)) {
|
||||
power_user.movingUIState[elmntName].width = width;
|
||||
power_user.movingUIState[elmntName].height = height;
|
||||
} else {
|
||||
console.debug('skipping W/H setting')
|
||||
}
|
||||
power_user.movingUIState[elmntName].right = right;
|
||||
power_user.movingUIState[elmntName].bottom = bottom;
|
||||
if (!isNaN(oldTop) && !isNaN(oldLeft) && (oldTop !== top || oldLeft !== left)) {
|
||||
console.debug('unsetting margin due to custom position')
|
||||
console.debug(`${elmntName}:
|
||||
T: ${oldTop}>>${top}
|
||||
L: ${oldLeft}>> ${left}
|
||||
H: ${oldHeight} >> ${height}
|
||||
W: ${oldWidth}>> ${width}
|
||||
R: ${oldRight} >> ${right}
|
||||
B: ${oldBottom}>> ${bottom}
|
||||
---`)
|
||||
//only record position changes if caused by a user click-drag
|
||||
if (hasBeenDraggedByUser && isMouseDown) {
|
||||
power_user.movingUIState[elmntName].top = top;
|
||||
power_user.movingUIState[elmntName].left = left;
|
||||
power_user.movingUIState[elmntName].right = right;
|
||||
power_user.movingUIState[elmntName].bottom = bottom;
|
||||
power_user.movingUIState[elmntName].margin = 'unset';
|
||||
} else {
|
||||
console.debug('skipped unsetting margins')
|
||||
//console.debug(oldTop, top, oldLeft, left)
|
||||
}
|
||||
saveSettingsDebounced();
|
||||
|
||||
//handle resizing
|
||||
if (!hasBeenDraggedByUser && isMouseDown) {
|
||||
console.log('saw resize, NOT header drag')
|
||||
//set css to prevent weird resize behavior (does not save)
|
||||
elmnt.css('left', left)
|
||||
elmnt.css('top', top)
|
||||
|
||||
//prevent resizing offscreen
|
||||
if (top + elmnt.height() >= winHeight) {
|
||||
elmnt.css('height', winHeight - top - 1 + "px");
|
||||
}
|
||||
|
||||
if (left + elmnt.width() >= winWidth) {
|
||||
elmnt.css('width', winWidth - left - 1 + "px");
|
||||
}
|
||||
|
||||
//prevent resizing into the top bar
|
||||
if (top <= 40 && maxX > topBarFirstX) {
|
||||
elmnt.css('width', width - 1 + "px");
|
||||
}
|
||||
//set a listener for mouseup to save new width/height
|
||||
elmnt.off('mouseup').on('mouseup', () => {
|
||||
console.debug(`Saving ${elmntName} Height/Width`)
|
||||
power_user.movingUIState[elmntName].width = width;
|
||||
power_user.movingUIState[elmntName].height = height;
|
||||
saveSettingsDebounced();
|
||||
})
|
||||
}
|
||||
|
||||
//handle dragging hit detection
|
||||
if (hasBeenDraggedByUser && isMouseDown) {
|
||||
//prevent dragging offscreen
|
||||
if (top <= 0) {
|
||||
elmnt.css('top', '0px');
|
||||
} else if (maxY >= winHeight) {
|
||||
elmnt.css('top', winHeight - maxY + top - 1 + "px");
|
||||
}
|
||||
|
||||
if (left <= 0) {
|
||||
elmnt.css('left', '0px');
|
||||
} else if (maxX >= winWidth) {
|
||||
elmnt.css('left', winWidth - maxX + left - 1 + "px");
|
||||
}
|
||||
|
||||
//prevent underlap with topbar div
|
||||
if (top < 40 && (maxX > topBarFirstX && maxX < topBarLastX || left < topBarLastX && left > topBarFirstX)) {
|
||||
console.log('saw topbar hit')
|
||||
elmnt.css('top', '42px');
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the element header exists and set the listener on the grabber
|
||||
if (elmntHeader.length) {
|
||||
@@ -584,6 +594,7 @@ B: ${oldBottom}>> ${bottom}
|
||||
function dragMouseDown(e) {
|
||||
|
||||
if (e) {
|
||||
hasBeenDraggedByUser = true;
|
||||
e.preventDefault();
|
||||
pos3 = e.clientX; //mouse X at click
|
||||
pos4 = e.clientY; //mouse Y at click
|
||||
@@ -593,76 +604,60 @@ B: ${oldBottom}>> ${bottom}
|
||||
}
|
||||
|
||||
function elementDrag(e) {
|
||||
$("body").css("overflow", "hidden");
|
||||
if (!power_user.movingUIState[elmntName]) {
|
||||
power_user.movingUIState[elmntName] = {};
|
||||
}
|
||||
|
||||
let winWidth = window.innerWidth;
|
||||
let winHeight = window.innerHeight;
|
||||
let sheldWidth = parseInt($('html').css('--sheldWidth').slice(0, -2));
|
||||
let topBarFirstX = (winWidth - sheldWidth) / 2;
|
||||
let topBarLastX = topBarFirstX + sheldWidth;
|
||||
let maxX = (width + left);
|
||||
let maxY = (height + top);
|
||||
|
||||
e = e || window.event;
|
||||
e.preventDefault();
|
||||
|
||||
pos1 = pos3 - e.clientX; //X change amt
|
||||
pos2 = pos4 - e.clientY; //Y change amt
|
||||
pos1 = pos3 - e.clientX; //X change amt (-1 or 1)
|
||||
pos2 = pos4 - e.clientY; //Y change amt (-1 or 1)
|
||||
pos3 = e.clientX; //new mouse X
|
||||
pos4 = e.clientY; //new mouse Y
|
||||
|
||||
elmnt.attr('data-dragged', 'true');
|
||||
|
||||
if (elmnt.offset().top < 40) {
|
||||
if (maxX > topBarFirstX && maxX < topBarLastX) {
|
||||
elmnt.css('top', '42px');
|
||||
}
|
||||
if (elmnt.offset().left < topBarLastX && elmnt.offset().left > topBarFirstX) {
|
||||
elmnt.css('top', '42px');
|
||||
}
|
||||
}
|
||||
if (elmnt.offset().top - pos2 <= 0) {
|
||||
elmnt.css('top', '0px');
|
||||
}
|
||||
if (elmnt.offset().left - pos1 <= 0) {
|
||||
elmnt.css('left', '0px');
|
||||
}
|
||||
if (maxX >= winWidth) {
|
||||
elmnt.css('left', elmnt.offset().left - 10 + "px");
|
||||
}
|
||||
if (maxY >= winHeight) {
|
||||
elmnt.css('top', elmnt.offset().top - 10 + "px");
|
||||
if (elmnt.offset().top - pos2 <= 40) {
|
||||
elmnt.css('top', '20px');
|
||||
}
|
||||
}
|
||||
//first set css to computed values to avoid CSS NaN results from 'auto', etc
|
||||
elmnt.css('left', (elmnt.offset().left) + "px");
|
||||
elmnt.css("top", (elmnt.offset().top) + "px");
|
||||
|
||||
//then update element position styles to account for drag changes
|
||||
elmnt.css('margin', 'unset');
|
||||
elmnt.css('left', (elmnt.offset().left - pos1) + "px");
|
||||
elmnt.css("top", (elmnt.offset().top - pos2) + "px");
|
||||
elmnt.css('margin', 'unset');
|
||||
elmnt.css("right", ((winWidth - maxX) + "px"));
|
||||
elmnt.css("bottom", ((winHeight - maxY) + "px"));
|
||||
|
||||
/*
|
||||
console.log(`
|
||||
winWidth: ${winWidth}, winHeight: ${winHeight}
|
||||
sheldWidth: ${sheldWidth}
|
||||
X: ${$(elmnt).css('left')}
|
||||
Y: ${$(elmnt).css('top')}
|
||||
MaxX: ${maxX}, MaxY: ${maxY}
|
||||
Topbar 1st X: ${((winWidth - sheldWidth) / 2)}
|
||||
TopBar lastX: ${((winWidth - sheldWidth) / 2) + sheldWidth}
|
||||
`);
|
||||
*/
|
||||
// Height/Width here are for visuals only, and are not saved to settings
|
||||
// required because some divs do hot have a set width/height..
|
||||
// and will defaults to shrink to min value of 100px set in CSS file
|
||||
elmnt.css('height', height + "px")
|
||||
elmnt.css('width', width + "px")
|
||||
|
||||
/* console.log(`
|
||||
winWidth: ${winWidth}, winHeight: ${winHeight}
|
||||
sheldWidth: ${sheldWidth}
|
||||
X: ${$(elmnt).css('left')}
|
||||
Y: ${$(elmnt).css('top')}
|
||||
MaxX: ${maxX}, MaxY: ${maxY}
|
||||
Topbar 1st X: ${((winWidth - sheldWidth) / 2)}
|
||||
TopBar lastX: ${((winWidth - sheldWidth) / 2) + sheldWidth}
|
||||
`); */
|
||||
return
|
||||
}
|
||||
|
||||
function closeDragElement() {
|
||||
console.debug('drag finished')
|
||||
hasBeenDraggedByUser = false;
|
||||
isMouseDown = false;
|
||||
$(document).off('mouseup', closeDragElement);
|
||||
$(document).off('mousemove', elementDrag);
|
||||
$("body").css("overflow", "");
|
||||
// Clear the "data-dragged" attribute
|
||||
elmnt.attr('data-dragged', 'false');
|
||||
console.debug(`Saving ${elmntName} UI position`)
|
||||
saveSettingsDebounced();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -677,7 +672,6 @@ export async function initMovingUI() {
|
||||
await delay(1000)
|
||||
console.debug('loading AN draggable function')
|
||||
dragElement($("#floatingPrompt"))
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { callPopup, eventSource, event_types, getRequestHeaders, saveSettingsDebounced } from "../../../script.js";
|
||||
import { dragElement, isMobile } from "../../RossAscends-mods.js";
|
||||
import { getContext, getApiUrl, modules, extension_settings, ModuleWorkerWrapper, doExtrasFetch } from "../../extensions.js";
|
||||
import { power_user } from "../../power-user.js";
|
||||
import { loadMovingUIState, power_user } from "../../power-user.js";
|
||||
import { onlyUnique, debounce, getCharaFilename } from "../../utils.js";
|
||||
export { MODULE_NAME };
|
||||
|
||||
@@ -182,20 +182,20 @@ async function visualNovelUpdateLayers(container) {
|
||||
const group = context.groups.find(x => x.id == context.groupId);
|
||||
const recentMessages = context.chat.map(x => x.original_avatar).filter(x => x).reverse().filter(onlyUnique);
|
||||
const filteredMembers = group.members.filter(x => !group.disabled_members.includes(x));
|
||||
const layerIndices = filteredMembers.slice().sort((a, b) => {
|
||||
const layerIndices = filteredMembers.slice().sort((a, b) => {
|
||||
const aRecentIndex = recentMessages.indexOf(a);
|
||||
const bRecentIndex = recentMessages.indexOf(b);
|
||||
const aFilteredIndex = filteredMembers.indexOf(a);
|
||||
const bFilteredIndex = filteredMembers.indexOf(b);
|
||||
|
||||
if (aRecentIndex !== -1 && bRecentIndex !== -1) {
|
||||
return bRecentIndex - aRecentIndex;
|
||||
return bRecentIndex - aRecentIndex;
|
||||
} else if (aRecentIndex !== -1) {
|
||||
return 1;
|
||||
return 1;
|
||||
} else if (bRecentIndex !== -1) {
|
||||
return -1;
|
||||
return -1;
|
||||
} else {
|
||||
return aFilteredIndex - bFilteredIndex;
|
||||
return aFilteredIndex - bFilteredIndex;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -566,7 +566,7 @@ function getListItem(item, imageSrc, textClass) {
|
||||
<span class="expression_list_title ${textClass}">${item}</span>
|
||||
<img class="expression_list_image" src="${imageSrc}" />
|
||||
</div>
|
||||
`;
|
||||
`;
|
||||
}
|
||||
|
||||
async function getSpritesList(name) {
|
||||
@@ -905,6 +905,7 @@ function setExpressionOverrideHtml(forceClear = false) {
|
||||
</div>
|
||||
</div>`;
|
||||
$('body').append(html);
|
||||
loadMovingUIState();
|
||||
}
|
||||
function addVisualNovelMode() {
|
||||
const html = `
|
||||
@@ -959,6 +960,10 @@ function setExpressionOverrideHtml(forceClear = false) {
|
||||
$('#expression_upload_pack_button').on('click', onClickExpressionUploadPackButton);
|
||||
$('#expressions_show_default').prop('checked', extension_settings.expressions.showDefault).trigger('input');
|
||||
$('#expression_override_cleanup_button').on('click', onClickExpressionOverrideRemoveAllButton);
|
||||
$(document).on('dragstart', '.expression', (e) => {
|
||||
e.preventDefault()
|
||||
return false
|
||||
})
|
||||
$(document).on('click', '.expression_list_item', onClickExpressionImage);
|
||||
$(document).on('click', '.expression_list_upload', onClickExpressionUpload);
|
||||
$(document).on('click', '.expression_list_delete', onClickExpressionDelete);
|
||||
@@ -973,6 +978,7 @@ function setExpressionOverrideHtml(forceClear = false) {
|
||||
const updateFunction = wrapper.update.bind(wrapper);
|
||||
setInterval(updateFunction, UPDATE_INTERVAL);
|
||||
moduleWorker();
|
||||
dragElement($("#expression-holder"))
|
||||
eventSource.on(event_types.CHAT_CHANGED, () => {
|
||||
setExpressionOverrideHtml();
|
||||
|
||||
|
||||
@@ -31,6 +31,21 @@
|
||||
object-fit: cover;
|
||||
}*/
|
||||
|
||||
/* .expression-holder {
|
||||
min-width: 100px;
|
||||
min-height: 100px;
|
||||
max-height: 90vh;
|
||||
max-width: 90vh;
|
||||
width: calc((100vw - var(--sheldWidth)) /2);
|
||||
position: absolute;
|
||||
padding: 0;
|
||||
filter: drop-shadow(2px 2px 2px #51515199);
|
||||
z-index: 29;
|
||||
overflow: hidden;
|
||||
display: none;
|
||||
bottom: 0;
|
||||
} */
|
||||
|
||||
.expression-holder {
|
||||
min-width: 100px;
|
||||
min-height: 100px;
|
||||
@@ -38,7 +53,7 @@
|
||||
max-width: 90vh;
|
||||
width: calc((100vw - var(--sheldWidth)) /2);
|
||||
position: absolute;
|
||||
bottom: 1px;
|
||||
bottom: 0;
|
||||
padding: 0;
|
||||
filter: drop-shadow(2px 2px 2px #51515199);
|
||||
z-index: 2;
|
||||
@@ -166,4 +181,4 @@ img.expression.default {
|
||||
div.expression {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -505,8 +505,8 @@ function doAutoAdjust(chat, maxContext) {
|
||||
// Round up to nearest 10
|
||||
const contextMessagesRounded = Math.ceil(contextMessages / 10) * 10;
|
||||
console.debug('CHROMADB: Estimated context messages (rounded): %o', contextMessagesRounded);
|
||||
// Messages to keep (proportional, rounded to nearest 5, minimum 10, maximum 500)
|
||||
const messagesToKeep = Math.min(defaultSettings.keep_context_max, Math.max(10, Math.ceil(contextMessagesRounded * extension_settings.chromadb.keep_context_proportion / 5) * 5));
|
||||
// Messages to keep (proportional, rounded to nearest 5, minimum 5, maximum 500)
|
||||
const messagesToKeep = Math.min(defaultSettings.keep_context_max, Math.max(5, Math.floor(contextMessagesRounded * extension_settings.chromadb.keep_context_proportion / 5) * 5));
|
||||
console.debug('CHROMADB: Estimated messages to keep: %o', messagesToKeep);
|
||||
// Messages to query (rounded, maximum 500)
|
||||
const messagesToQuery = Math.min(defaultSettings.n_results_max, contextMessagesRounded - messagesToKeep);
|
||||
|
||||
@@ -35,6 +35,7 @@ async function loadSettings() {
|
||||
}
|
||||
}
|
||||
|
||||
initializeEmptySlots(extension_settings.quickReply.numberOfSlots);
|
||||
generateQuickReplyElements();
|
||||
|
||||
for (let i = 1; i <= extension_settings.quickReply.numberOfSlots; i++) {
|
||||
@@ -131,6 +132,15 @@ async function onQuickReplyNumberOfSlotsInput() {
|
||||
extension_settings.quickReply.quickReplySlots.length = numberOfSlots;
|
||||
|
||||
// Initialize new slots
|
||||
initializeEmptySlots(numberOfSlots);
|
||||
|
||||
await loadSettings();
|
||||
addQuickReplyBar();
|
||||
moduleWorker();
|
||||
saveSettingsDebounced();
|
||||
}
|
||||
|
||||
function initializeEmptySlots(numberOfSlots) {
|
||||
for (let i = 0; i < numberOfSlots; i++) {
|
||||
if (!extension_settings.quickReply.quickReplySlots[i]) {
|
||||
extension_settings.quickReply.quickReplySlots[i] = {
|
||||
@@ -140,11 +150,6 @@ async function onQuickReplyNumberOfSlotsInput() {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
await loadSettings();
|
||||
addQuickReplyBar();
|
||||
moduleWorker();
|
||||
saveSettingsDebounced();
|
||||
}
|
||||
|
||||
function generateQuickReplyElements() {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { callPopup, main_api } from "../../../script.js";
|
||||
import { getContext } from "../../extensions.js";
|
||||
import { oai_settings } from "../../openai.js";
|
||||
import { getTokenizerModel } from "../../openai.js";
|
||||
|
||||
async function doTokenCounter() {
|
||||
const selectedTokenizer = main_api == 'openai'
|
||||
? `tiktoken (${oai_settings.openai_model})`
|
||||
? `tiktoken (${getTokenizerModel()})`
|
||||
: $("#tokenizer").find(':selected').text();
|
||||
const html = `
|
||||
<div class="wide100p">
|
||||
|
||||
@@ -1234,7 +1234,7 @@ function filterGroupMembers() {
|
||||
$("#rm_group_add_members .group_member").removeClass('hiddenBySearch');
|
||||
} else {
|
||||
$("#rm_group_add_members .group_member").each(function () {
|
||||
const isValidSearch = $(this).children(".ch_name").text().toLowerCase().includes(searchValue);
|
||||
const isValidSearch = $(this).find(".ch_name").text().toLowerCase().includes(searchValue);
|
||||
$(this).toggleClass('hiddenBySearch', !isValidSearch);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -937,7 +937,7 @@ function countTokens(messages, full = false) {
|
||||
return token_count;
|
||||
}
|
||||
|
||||
function getTokenizerModel() {
|
||||
export function getTokenizerModel() {
|
||||
// OpenAI models always provide their own tokenizer
|
||||
if (oai_settings.chat_completion_source == chat_completion_sources.OPENAI) {
|
||||
return oai_settings.openai_model;
|
||||
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
|
||||
import { registerSlashCommand } from "./slash-commands.js";
|
||||
|
||||
import { delay } from "./utils.js";
|
||||
import { delay, debounce } from "./utils.js";
|
||||
|
||||
export {
|
||||
loadPowerUserSettings,
|
||||
@@ -610,6 +610,14 @@ function loadPowerUserSettings(settings, data) {
|
||||
power_user.font_scale = Number(localStorage.getItem(storage_keys.font_scale) ?? 1);
|
||||
power_user.blur_strength = Number(localStorage.getItem(storage_keys.blur_strength) ?? 10);
|
||||
|
||||
if (power_user.chat_display === '') {
|
||||
power_user.chat_display = chat_styles.DEFAULT;
|
||||
}
|
||||
|
||||
if (power_user.waifuMode === '') {
|
||||
power_user.waifuMode = false;
|
||||
}
|
||||
|
||||
$('#trim_spaces').prop("checked", power_user.trim_spaces);
|
||||
$('#continue_on_send').prop("checked", power_user.continue_on_send);
|
||||
$('#auto_swipe').prop("checked", power_user.auto_swipe);
|
||||
@@ -975,7 +983,7 @@ async function saveTheme() {
|
||||
}
|
||||
}
|
||||
|
||||
function resetMovablePanels() {
|
||||
async function resetMovablePanels(type) {
|
||||
const panelIds = [
|
||||
'sheld',
|
||||
'left-nav-panel',
|
||||
@@ -991,28 +999,38 @@ function resetMovablePanels() {
|
||||
const panel = document.getElementById(id);
|
||||
|
||||
if (panel) {
|
||||
$(panel).addClass('resizing');
|
||||
panelStyles.forEach((style) => {
|
||||
panel.style[style] = '';
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
const zoomedAvatar = document.querySelector('.zoomed_avatar');
|
||||
if (zoomedAvatar) {
|
||||
panelStyles.forEach((style) => {
|
||||
zoomedAvatar.style[style] = '';
|
||||
const zoomedAvatars = document.querySelectorAll('.zoomed_avatar');
|
||||
if (zoomedAvatars.length > 0) {
|
||||
zoomedAvatars.forEach((avatar) => {
|
||||
avatar.classList.add('resizing');
|
||||
panelStyles.forEach((style) => {
|
||||
avatar.style[style] = '';
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$('[data-dragged="true"]').removeAttr('data-dragged');
|
||||
await delay(50)
|
||||
|
||||
power_user.movingUIState = {};
|
||||
saveSettingsDebounced();
|
||||
eventSource.emit(event_types.MOVABLE_PANELS_RESET);
|
||||
|
||||
eventSource.once(event_types.SETTINGS_UPDATED, () => {
|
||||
toastr.success('Panel positions reset');
|
||||
$(".resizing").removeClass('resizing');
|
||||
if (type === 'resize') {
|
||||
toastr.warning('Panel positions reset due to zoom/resize');
|
||||
} else {
|
||||
toastr.success('Panel positions reset');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function doNewChat() {
|
||||
@@ -1105,7 +1123,252 @@ function doResetPanels() {
|
||||
$("#movingUIreset").trigger('click');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function setAvgBG() {
|
||||
const bgimg = new Image();
|
||||
bgimg.src = $('#bg1')
|
||||
.css('background-image')
|
||||
.replace(/^url\(['"]?/, '')
|
||||
.replace(/['"]?\)$/, '');
|
||||
|
||||
/* const charAvatar = new Image()
|
||||
charAvatar.src = $("#avatar_load_preview")
|
||||
.attr('src')
|
||||
.replace(/^url\(['"]?/, '')
|
||||
.replace(/['"]?\)$/, '');
|
||||
|
||||
const userAvatar = new Image()
|
||||
userAvatar.src = $("#user_avatar_block .avatar.selected img")
|
||||
.attr('src')
|
||||
.replace(/^url\(['"]?/, '')
|
||||
.replace(/['"]?\)$/, ''); */
|
||||
|
||||
|
||||
bgimg.onload = function () {
|
||||
var rgb = getAverageRGB(bgimg);
|
||||
//console.log(`average color of the bg is:`)
|
||||
//console.log(rgb);
|
||||
$("#blur-tint-color-picker").attr('color', 'rgb(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ')');
|
||||
|
||||
const backgroundColorString = $("#blur-tint-color-picker").attr('color')
|
||||
.replace('rgba', '')
|
||||
.replace('rgb', '')
|
||||
.replace('(', '[')
|
||||
.replace(')', ']'); //[50, 120, 200, 1]; // Example background color
|
||||
const backgroundColorArray = JSON.parse(backgroundColorString) //[200, 200, 200, 1]
|
||||
console.log(backgroundColorArray)
|
||||
$("#main-text-color-picker").attr('color', getReadableTextColor(backgroundColorArray));
|
||||
console.log($("#main-text-color-picker").attr('color')); // Output: 'rgba(0, 47, 126, 1)'
|
||||
}
|
||||
|
||||
/* charAvatar.onload = function () {
|
||||
var rgb = getAverageRGB(charAvatar);
|
||||
//console.log(`average color of the AI avatar is:`);
|
||||
//console.log(rgb);
|
||||
$("#bot-mes-blur-tint-color-picker").attr('color', 'rgb(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ')');
|
||||
}
|
||||
|
||||
userAvatar.onload = function () {
|
||||
var rgb = getAverageRGB(userAvatar);
|
||||
//console.log(`average color of the user avatar is:`);
|
||||
//console.log(rgb);
|
||||
$("#user-mes-blur-tint-color-picker").attr('color', 'rgb(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ')');
|
||||
} */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function getAverageRGB(imgEl) {
|
||||
|
||||
var blockSize = 5, // only visit every 5 pixels
|
||||
defaultRGB = { r: 0, g: 0, b: 0 }, // for non-supporting envs
|
||||
canvas = document.createElement('canvas'),
|
||||
context = canvas.getContext && canvas.getContext('2d'),
|
||||
data, width, height,
|
||||
i = -4,
|
||||
length,
|
||||
rgb = { r: 0, g: 0, b: 0 },
|
||||
count = 0;
|
||||
|
||||
if (!context) {
|
||||
return defaultRGB;
|
||||
}
|
||||
|
||||
height = canvas.height = imgEl.naturalHeight || imgEl.offsetHeight || imgEl.height;
|
||||
width = canvas.width = imgEl.naturalWidth || imgEl.offsetWidth || imgEl.width;
|
||||
context.drawImage(imgEl, 0, 0);
|
||||
|
||||
try {
|
||||
data = context.getImageData(0, 0, width, height);
|
||||
} catch (e) {
|
||||
/* security error, img on diff domain */alert('x');
|
||||
return defaultRGB;
|
||||
}
|
||||
|
||||
length = data.data.length;
|
||||
while ((i += blockSize * 4) < length) {
|
||||
++count;
|
||||
rgb.r += data.data[i];
|
||||
rgb.g += data.data[i + 1];
|
||||
rgb.b += data.data[i + 2];
|
||||
}
|
||||
|
||||
// ~~ used to floor values
|
||||
rgb.r = ~~(rgb.r / count);
|
||||
rgb.g = ~~(rgb.g / count);
|
||||
rgb.b = ~~(rgb.b / count);
|
||||
|
||||
return rgb;
|
||||
|
||||
}
|
||||
|
||||
function hslToRgb(h, s, l) {
|
||||
const hueToRgb = (p, q, t) => {
|
||||
if (t < 0) t += 1;
|
||||
if (t > 1) t -= 1;
|
||||
if (t < 1 / 6) return p + (q - p) * 6 * t;
|
||||
if (t < 1 / 2) return q;
|
||||
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
|
||||
return p;
|
||||
};
|
||||
|
||||
if (s === 0) {
|
||||
return [l, l, l];
|
||||
}
|
||||
|
||||
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
||||
const p = 2 * l - q;
|
||||
const r = hueToRgb(p, q, h + 1 / 3);
|
||||
const g = hueToRgb(p, q, h);
|
||||
const b = hueToRgb(p, q, h - 1 / 3);
|
||||
|
||||
return [r * 255, g * 255, b * 255];
|
||||
}
|
||||
|
||||
function rgbToLuminance(r, g, b) {
|
||||
console.log(r, g, b)
|
||||
const gammaCorrect = (color) => {
|
||||
return color <= 0.03928
|
||||
? color / 12.92
|
||||
: Math.pow((color + 0.055) / 1.055, 2.4);
|
||||
};
|
||||
|
||||
const rsRGB = r / 255;
|
||||
const gsRGB = g / 255;
|
||||
const bsRGB = b / 255;
|
||||
|
||||
const rLuminance = gammaCorrect(rsRGB).toFixed(2);
|
||||
const gLuminance = gammaCorrect(gsRGB).toFixed(2);
|
||||
const bLuminance = gammaCorrect(bsRGB).toFixed(2);
|
||||
|
||||
console.log(`rLum ${rLuminance}, gLum ${gLuminance}, bLum ${bLuminance}`)
|
||||
|
||||
return 0.2126 * rLuminance + 0.7152 * gLuminance + 0.0722 * bLuminance;
|
||||
}
|
||||
|
||||
//this version keeps BG and main text in same hue
|
||||
/* function getReadableTextColor(rgb) {
|
||||
const [r, g, b] = rgb;
|
||||
|
||||
// Convert RGB to HSL
|
||||
const rgbToHsl = (r, g, b) => {
|
||||
const max = Math.max(r, g, b);
|
||||
const min = Math.min(r, g, b);
|
||||
const d = max - min;
|
||||
const l = (max + min) / 2;
|
||||
|
||||
if (d === 0) return [0, 0, l];
|
||||
|
||||
const s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
||||
const h = (() => {
|
||||
switch (max) {
|
||||
case r:
|
||||
return (g - b) / d + (g < b ? 6 : 0);
|
||||
case g:
|
||||
return (b - r) / d + 2;
|
||||
case b:
|
||||
return (r - g) / d + 4;
|
||||
}
|
||||
})() / 6;
|
||||
|
||||
return [h, s, l];
|
||||
};
|
||||
const [h, s, l] = rgbToHsl(r / 255, g / 255, b / 255);
|
||||
|
||||
// Calculate appropriate text color based on background color
|
||||
const targetLuminance = l > 0.5 ? 0.2 : 0.8;
|
||||
const targetSaturation = s > 0.5 ? s - 0.2 : s + 0.2;
|
||||
const [rNew, gNew, bNew] = hslToRgb(h, targetSaturation, targetLuminance);
|
||||
|
||||
// Return the text color in RGBA format
|
||||
return `rgba(${rNew.toFixed(0)}, ${gNew.toFixed(0)}, ${bNew.toFixed(0)}, 1)`;
|
||||
}*/
|
||||
|
||||
//this version makes main text complimentary color to BG color
|
||||
function getReadableTextColor(rgb) {
|
||||
const [r, g, b] = rgb;
|
||||
|
||||
// Convert RGB to HSL
|
||||
const rgbToHsl = (r, g, b) => {
|
||||
const max = Math.max(r, g, b);
|
||||
const min = Math.min(r, g, b);
|
||||
const d = max - min;
|
||||
const l = (max + min) / 2;
|
||||
|
||||
if (d === 0) return [0, 0, l];
|
||||
|
||||
const s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
||||
const h = (() => {
|
||||
switch (max) {
|
||||
case r:
|
||||
return (g - b) / d + (g < b ? 6 : 0);
|
||||
case g:
|
||||
return (b - r) / d + 2;
|
||||
case b:
|
||||
return (r - g) / d + 4;
|
||||
}
|
||||
})() / 6;
|
||||
|
||||
return [h, s, l];
|
||||
};
|
||||
const [h, s, l] = rgbToHsl(r / 255, g / 255, b / 255);
|
||||
|
||||
// Calculate complementary color based on background color
|
||||
const complementaryHue = (h + 0.5) % 1;
|
||||
const complementarySaturation = s > 0.5 ? s - 0.6 : s + 0.6;
|
||||
const complementaryLuminance = l > 0.5 ? 0.2 : 0.8;
|
||||
|
||||
// Convert complementary color back to RGB
|
||||
const [rNew, gNew, bNew] = hslToRgb(complementaryHue, complementarySaturation, complementaryLuminance);
|
||||
|
||||
// Return the text color in RGBA format
|
||||
return `rgba(${rNew.toFixed(0)}, ${gNew.toFixed(0)}, ${bNew.toFixed(0)}, 1)`;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
$(document).ready(() => {
|
||||
|
||||
$(window).on('resize', async () => {
|
||||
if (isMobile()) {
|
||||
return
|
||||
}
|
||||
|
||||
//console.log('Window resized!');
|
||||
const zoomLevel = Number(window.devicePixelRatio).toFixed(2);
|
||||
const winWidth = window.innerWidth;
|
||||
const winHeight = window.innerHeight;
|
||||
console.debug(`Zoom: ${zoomLevel}, X:${winWidth}, Y:${winHeight}`);
|
||||
if (Object.keys(power_user.movingUIState).length > 0) {
|
||||
resetMovablePanels('resize');
|
||||
}
|
||||
// Adjust layout and styling here
|
||||
});
|
||||
|
||||
// Settings that go to settings.json
|
||||
$("#collapse-newlines-checkbox").change(function () {
|
||||
power_user.collapse_newlines = !!$(this).prop("checked");
|
||||
@@ -1186,7 +1449,7 @@ $(document).ready(() => {
|
||||
reloadMarkdownProcessor(power_user.render_formulas);
|
||||
});
|
||||
|
||||
$("#start_reply_with").on('input', function() {
|
||||
$("#start_reply_with").on('input', function () {
|
||||
power_user.user_prompt_bias = $(this).val();
|
||||
saveSettingsDebounced();
|
||||
});
|
||||
@@ -1537,4 +1800,5 @@ $(document).ready(() => {
|
||||
registerSlashCommand('delmode', doDelMode, ['del'], '<span class="monospace">(optional number)</span> – enter message deletion mode, and auto-deletes N messages if numeric argument is provided', true, true);
|
||||
registerSlashCommand('cut', doMesCut, [], ' <span class="monospace">(requred number)</span> – cuts the specified message from the chat', true, true);
|
||||
registerSlashCommand('resetpanels', doResetPanels, ['resetui'], ' – resets UI panels to original state.', true, true);
|
||||
registerSlashCommand('bgcol', setAvgBG, [], ' – WIP test of auto-bg avg coloring', true, true);
|
||||
});
|
||||
|
||||
@@ -17,10 +17,11 @@ import {
|
||||
comment_avatar,
|
||||
system_avatar,
|
||||
system_message_types,
|
||||
name1,
|
||||
saveSettings,
|
||||
replaceCurrentChat,
|
||||
setCharacterId,
|
||||
} from "../script.js";
|
||||
import { humanizedDateTime } from "./RossAscends-mods.js";
|
||||
import { resetSelectedGroup } from "./group-chats.js";
|
||||
import { chat_styles, power_user } from "./power-user.js";
|
||||
export {
|
||||
executeSlashCommands,
|
||||
@@ -111,11 +112,53 @@ parser.addCommand('single', setStoryModeCallback, ['story'], ' – sets the mess
|
||||
parser.addCommand('bubble', setBubbleModeCallback, ['bubbles'], ' – sets the message style to bubble chat mode', true, true);
|
||||
parser.addCommand('flat', setFlatModeCallback, ['default'], ' – sets the message style to flat chat mode', true, true);
|
||||
parser.addCommand('continue', continueChatCallback, ['cont'], ' – continues the last message in the chat', true, true);
|
||||
parser.addCommand('go', goToCharacterCallback, ['char'], '<span class="monospace">(name)</span> – opens up a chat with the character by its name', true, true);
|
||||
|
||||
const NARRATOR_NAME_KEY = 'narrator_name';
|
||||
const NARRATOR_NAME_DEFAULT = 'System';
|
||||
const COMMENT_NAME_DEFAULT = 'Note';
|
||||
|
||||
function findCharacterIndex(name) {
|
||||
const matchTypes = [
|
||||
(a, b) => a === b,
|
||||
(a, b) => a.startsWith(b),
|
||||
(a, b) => a.includes(b),
|
||||
];
|
||||
|
||||
for (const matchType of matchTypes) {
|
||||
const index = characters.findIndex(x => matchType(x.name.toLowerCase(), name.toLowerCase()));
|
||||
if (index !== -1) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
function goToCharacterCallback(_, name) {
|
||||
if (!name) {
|
||||
console.warn('WARN: No character name provided for /go command');
|
||||
return;
|
||||
}
|
||||
|
||||
name = name.trim();
|
||||
const characterIndex = findCharacterIndex(name);
|
||||
|
||||
if (characterIndex !== -1) {
|
||||
openChat(characterIndex);
|
||||
} else {
|
||||
console.warn(`No matches found for name "${name}"`);
|
||||
}
|
||||
}
|
||||
|
||||
function openChat(id) {
|
||||
resetSelectedGroup();
|
||||
setCharacterId(id);
|
||||
setTimeout(() => {
|
||||
replaceCurrentChat();
|
||||
}, 1);
|
||||
}
|
||||
|
||||
function continueChatCallback() {
|
||||
// Prevent infinite recursion
|
||||
$('#send_textarea').val('');
|
||||
@@ -276,10 +319,28 @@ async function sendCommentMessage(_, text) {
|
||||
saveChatConditional();
|
||||
}
|
||||
|
||||
function helpCommandCallback() {
|
||||
sendSystemMessage(system_message_types.HELP);
|
||||
function helpCommandCallback(_, type) {
|
||||
switch (type?.trim()) {
|
||||
case 'slash':
|
||||
case '1':
|
||||
sendSystemMessage(system_message_types.SLASH_COMMANDS);
|
||||
break;
|
||||
case 'format':
|
||||
case '2':
|
||||
sendSystemMessage(system_message_types.FORMATTING);
|
||||
break;
|
||||
case 'hotkeys':
|
||||
case '3':
|
||||
sendSystemMessage(system_message_types.HOTKEYS);
|
||||
break;
|
||||
default:
|
||||
sendSystemMessage(system_message_types.HELP);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
window['displayHelp'] = (page) => helpCommandCallback(null, page);
|
||||
|
||||
function setBackgroundCallback(_, bg) {
|
||||
if (!bg) {
|
||||
return;
|
||||
|
||||
@@ -262,6 +262,7 @@ async function importTags(imported_char) {
|
||||
};
|
||||
saveSettingsDebounced();
|
||||
await getCharacters();
|
||||
await getSettings();
|
||||
printTagFilters(tag_filter_types.character);
|
||||
printTagFilters(tag_filter_types.group_member);
|
||||
|
||||
|
||||
@@ -408,7 +408,8 @@ function appendWorldEntry(name, data, entry) {
|
||||
});
|
||||
|
||||
commentInput.val(entry.comment).trigger("input");
|
||||
commentToggle.prop("checked", entry.addMemo).trigger("input");
|
||||
commentToggle.prop("checked", true /* entry.addMemo */).trigger("input");
|
||||
commentToggle.parent().hide()
|
||||
|
||||
// content
|
||||
const countTokensDebounced = debounce(function (that, value) {
|
||||
@@ -464,7 +465,8 @@ function appendWorldEntry(name, data, entry) {
|
||||
value ? keysecondary.show() : keysecondary.hide();
|
||||
|
||||
});
|
||||
selectiveInput.prop("checked", entry.selective).trigger("input");
|
||||
selectiveInput.prop("checked", true /* entry.selective */).trigger("input");
|
||||
selectiveInput.parent().hide();
|
||||
|
||||
|
||||
// constant
|
||||
@@ -537,7 +539,7 @@ function appendWorldEntry(name, data, entry) {
|
||||
value ? probabilityContainer.show() : probabilityContainer.hide();
|
||||
|
||||
if (value && data.entries[uid].probability === null) {
|
||||
data.entries[uid].probability = 50;
|
||||
data.entries[uid].probability = 100;
|
||||
}
|
||||
|
||||
if (!value) {
|
||||
@@ -546,14 +548,15 @@ function appendWorldEntry(name, data, entry) {
|
||||
|
||||
probabilityInput.val(data.entries[uid].probability).trigger("input");
|
||||
});
|
||||
probabilityToggle.prop("checked", entry.useProbability).trigger("input");
|
||||
probabilityToggle.prop("checked", true /* entry.useProbability */).trigger("input");
|
||||
probabilityToggle.parent().hide();
|
||||
|
||||
// position
|
||||
if (entry.position === undefined) {
|
||||
entry.position = 0;
|
||||
}
|
||||
|
||||
const positionInput = template.find('input[name="position"]');
|
||||
const positionInput = template.find('select[name="position"]');
|
||||
positionInput.data("uid", entry.uid);
|
||||
positionInput.on("input", function () {
|
||||
const uid = $(this).data("uid");
|
||||
@@ -565,9 +568,10 @@ function appendWorldEntry(name, data, entry) {
|
||||
setOriginalDataValue(data, uid, "extensions.position", data.entries[uid].position);
|
||||
saveWorldInfo(name, data);
|
||||
});
|
||||
|
||||
template
|
||||
.find(`input[name="position"][value=${entry.position}]`)
|
||||
.prop("checked", true)
|
||||
.find(`select[name="position"] option[value=${entry.position}]`)
|
||||
.prop("selected", true)
|
||||
.trigger("input");
|
||||
|
||||
// display uid
|
||||
@@ -1142,8 +1146,8 @@ function convertCharacterBook(characterBook) {
|
||||
entry.id = index;
|
||||
}
|
||||
|
||||
result.entries[index] = {
|
||||
uid: entry.id || index,
|
||||
result.entries[entry.id] = {
|
||||
uid: entry.id,
|
||||
key: entry.keys,
|
||||
keysecondary: entry.secondary_keys || [],
|
||||
comment: entry.comment || "",
|
||||
|
||||
+14
-5
@@ -293,6 +293,7 @@ code {
|
||||
padding: 0 3px;
|
||||
/* max-width: calc(100svw - 95px); */
|
||||
line-height: var(--mainFontSize);
|
||||
color: var(--white70a);
|
||||
}
|
||||
|
||||
|
||||
@@ -745,7 +746,7 @@ hr {
|
||||
min-width: 50px !important;
|
||||
}
|
||||
|
||||
.hotswapAvatar.group_select .avatar img {
|
||||
.hotswapAvatar.group_select .avatar.avatar_collage img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
@@ -2148,7 +2149,7 @@ grammarly-extension {
|
||||
}
|
||||
|
||||
.delete_entry_button {
|
||||
align-self: center;
|
||||
height: min-content;
|
||||
}
|
||||
|
||||
.world_entry_form_control.world_entry_form_horizontal {
|
||||
@@ -3925,11 +3926,13 @@ label[for="extensions_autoconnect"] {
|
||||
z-index: 9999 !important;
|
||||
}
|
||||
|
||||
/*to prevent draggables from being made too small to see*/
|
||||
.fillRight,
|
||||
.fillLeft,
|
||||
#WorldInfo,
|
||||
#floatingPrompt {
|
||||
min-width: unset;
|
||||
min-width: 100px !important;
|
||||
min-height: 100px !important;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
@@ -4656,9 +4659,15 @@ body.waifuMode .zoomed_avatar {
|
||||
align-items: start;
|
||||
align-content: start;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
overflow-x: hidden
|
||||
}
|
||||
|
||||
.mes_buttons {
|
||||
font-size: calc(var(--mainFontSize)*1.2)
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
.drag-grabber,
|
||||
.pull-tab {
|
||||
display: none !important;
|
||||
@@ -5049,4 +5058,4 @@ body.waifuMode .zoomed_avatar {
|
||||
background-color: var(--SmartThemeBlurTintColor);
|
||||
text-align: center;
|
||||
line-height: 14px;
|
||||
}
|
||||
}
|
||||
@@ -1 +1,23 @@
|
||||
{"name":"Default (Minimal Light)","blur_strength":10,"main_text_color":"rgba(0, 0, 0, 1)","italics_text_color":"rgba(104, 104, 104, 1)","quote_text_color":"rgba(191, 154, 81, 1)","fastui_bg_color":"rgba(225, 225, 225, 1)","blur_tint_color":"rgba(228, 228, 228, 0.76)","shadow_color":"rgba(0, 0, 0, 0.5)","shadow_width":2,"font_scale":1,"fast_ui_mode":true,"waifuMode":false,"avatar_style":0,"chat_display":0,"noShadows":true,"sheld_width":0,"timer_enabled":false,"hotswap_enabled":false}
|
||||
{
|
||||
"name": "Default (Minimal Light) v2",
|
||||
"blur_strength": 10,
|
||||
"main_text_color": "rgba(89, 89, 89, 1)",
|
||||
"italics_text_color": "rgba(104, 104, 104, 1)",
|
||||
"quote_text_color": "rgba(191, 154, 81, 1)",
|
||||
"blur_tint_color": "rgba(228, 228, 228, 0.76)",
|
||||
"user_mes_blur_tint_color": "",
|
||||
"bot_mes_blur_tint_color": "",
|
||||
"shadow_color": "rgba(0, 0, 0, 0.5)",
|
||||
"shadow_width": 2,
|
||||
"font_scale": 1,
|
||||
"fast_ui_mode": true,
|
||||
"waifuMode": false,
|
||||
"avatar_style": 0,
|
||||
"chat_display": 0,
|
||||
"noShadows": true,
|
||||
"sheld_width": 0,
|
||||
"timer_enabled": false,
|
||||
"timestamps_enabled": "",
|
||||
"mesIDDisplay_enabled": "",
|
||||
"hotswap_enabled": false
|
||||
}
|
||||
@@ -2262,7 +2262,7 @@ app.post('/editworldinfo', jsonParser, (request, response) => {
|
||||
return response.status(400).send('Is not a valid world info file');
|
||||
}
|
||||
|
||||
const filename = `${request.body.name}.json`;
|
||||
const filename = `${sanitize(request.body.name)}.json`;
|
||||
const pathToFile = path.join(directories.worlds, filename);
|
||||
|
||||
fs.writeFileSync(pathToFile, JSON.stringify(request.body.data, null, 4));
|
||||
|
||||
Vendored
+1
@@ -5,6 +5,7 @@ declare enum ModelGenerationInputStableSamplers {
|
||||
"k_lms" = "k_lms",
|
||||
"k_heun" = "k_heun",
|
||||
"k_euler" = "k_euler",
|
||||
"k_euler_a" = "k_euler_a",
|
||||
"k_dpm_2" = "k_dpm_2",
|
||||
"k_dpm_2_a" = "k_dpm_2_a",
|
||||
"DDIM" = "DDIM",
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -312,7 +312,7 @@ function logObjectStructure(obj, indent = 0, depth = Infinity) {
|
||||
class Client {
|
||||
gql_url = "https://poe.com/api/gql_POST";
|
||||
gql_recv_url = "https://poe.com/api/receive_POST";
|
||||
home_url = "https://poe.com";
|
||||
home_url = "https://poe.com/Sage";
|
||||
settings_url = "https://poe.com/api/settings";
|
||||
|
||||
formkey = "";
|
||||
|
||||
Reference in New Issue
Block a user