Merge staging

2c1720d4f77f363fbc8129ec9fdaa847aba0ef98

Cohee <18619528+Cohee1207@users.noreply.github.com>

54 files changed, +2664 -357Showing whitespace changes
default/content/presets/textgen/Asterism.json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 1.68,
3+ "temperature_last": true,
34 "top_p": 0.17,
45 "top_k": 77,
5- "typical_p": 1,
66 "top_a": 0.42,
77 "tfs": 0.97,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.02,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/Beam Search.json+65 -3
@@ -1,23 +1,85 @@
11{
22 "temp": 0.7,
3+ "temperature_last": true,
34 "top_p": 0.92,
45 "top_k": 150,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
1010 "rep_pentypical_p": 4.51,
11+ "min_p": 0,
12+ "rep_pen": 3,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 2,
1317 "penalty_alpha": 0,
1418 "num_beams": 10,
1519 "length_penalty": 1.4,
1620 "min_length": 200,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": true,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/Big O.json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 0.87,
3+ "temperature_last": true,
34 "top_p": 0.99,
45 "top_k": 85,
5- "typical_p": 0.68,
66 "top_a": 0,
77 "tfs": 0.68,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 0.68,
11+ "min_p": 0,
1012 "rep_pen": 1.01,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/Contrastive Search.json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 1,
3+ "temperature_last": true,
34 "top_p": 1,
45 "top_k": 4,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0.6,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": false,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/Default.json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 0.7,
3+ "temperature_last": true,
34 "top_p": 0.5,
45 "top_k": 40,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.2,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/Deterministic.json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 0,
3+ "temperature_last": true,
34 "top_p": 0,
45 "top_k": 1,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.18,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": false,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/Divine Intellect.json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 1.31,
3+ "temperature_last": true,
34 "top_p": 0.14,
45 "top_k": 49,
5- "typical_p": 1,
66 "top_a": 0.52,
77 "tfs": 1,
88 "epsilon_cutoff": 1.49,
99 "eta_cutoff": 10.42,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.17,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/Kobold (Godlike).json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 0.7,
3+ "temperature_last": true,
34 "top_p": 0.5,
45 "top_k": 0,
5- "typical_p": 0.19,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 0.19,
11+ "min_p": 0,
1012 "rep_pen": 1.1,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/Kobold (Liminal Drift).json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 0.66,
3+ "temperature_last": true,
34 "top_p": 1,
45 "top_k": 0,
5- "typical_p": 0.6,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 0.6,
11+ "min_p": 0,
1012 "rep_pen": 1.1,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/LLaMa-Precise.json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 0.7,
3+ "temperature_last": true,
34 "top_p": 0.1,
45 "top_k": 40,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.18,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 200,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/Midnight Enigma.json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 0.98,
3+ "temperature_last": true,
34 "top_p": 0.37,
45 "top_k": 100,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.18,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/Miro Bronze.json+62 -1
@@ -1,24 +1,85 @@
11{
22 "temp": 1.06,
3+ "temperature_last": true,
34 "top_p": 1,
45 "top_k": 0,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 2,
2142 "mirostat_tau": 9.61,
2243 "mirostat_eta": 1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
2384 "rep_pen_size": 0
2485}
default/content/presets/textgen/Miro Gold.json+62 -1
@@ -1,24 +1,85 @@
11{
22 "temp": 1.17,
3+ "temperature_last": true,
34 "top_p": 1,
45 "top_k": 0,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 2,
2142 "mirostat_tau": 9.91,
2243 "mirostat_eta": 1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
2384 "rep_pen_size": 0
2485}
default/content/presets/textgen/Miro Silver.json+62 -1
@@ -1,24 +1,85 @@
11{
22 "temp": 1.17,
3+ "temperature_last": true,
34 "top_p": 1,
45 "top_k": 0,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 2,
2142 "mirostat_tau": 9.62,
2243 "mirostat_eta": 1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
2384 "rep_pen_size": 0
2485}
default/content/presets/textgen/Mirostat.json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 1,
3+ "temperature_last": true,
34 "top_p": 1,
45 "top_k": 0,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 2,
2142 "mirostat_tau": 8,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/Naive.json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 0.7,
3+ "temperature_last": true,
34 "top_p": 0.85,
45 "top_k": 50,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/NovelAI (Best Guess).json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 0.8,
3+ "temperature_last": true,
34 "top_p": 0.9,
45 "top_k": 100,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.15,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/NovelAI (Decadence).json+65 -3
@@ -1,23 +1,85 @@
11{
22 "temp": 1.99,
3+ "temperature_last": true,
34 "top_p": 1,
45 "top_k": 100,
5- "typical_p": 0.97,
6- "rep_pen": 1,
76 "top_a": 0,
87 "tfs": 1,
98 "epsilon_cutoff": 0,
109 "eta_cutoff": 0,
10+ "typical_p": 0.97,
11+ "min_p": 0,
12+ "rep_pen": 1,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/NovelAI (Genesis).json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 0.63,
3+ "temperature_last": true,
34 "top_p": 0.98,
45 "top_k": 0,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.05,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/NovelAI (Lycaenidae).json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 1.99,
3+ "temperature_last": true,
34 "top_p": 0.85,
45 "top_k": 12,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.15,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/NovelAI (Ouroboros).json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 1.07,
3+ "temperature_last": true,
34 "top_p": 1,
45 "top_k": 100,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.05,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/NovelAI (Pleasing Results).json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 0.44,
3+ "temperature_last": true,
34 "top_p": 1,
45 "top_k": 0,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.15,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/NovelAI (Sphinx Moth).json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 1.99,
3+ "temperature_last": true,
34 "top_p": 0.18,
45 "top_k": 30,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.15,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/NovelAI (Storywriter).json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 0.72,
3+ "temperature_last": true,
34 "top_p": 0.73,
45 "top_k": 0,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.1,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/Shortwave.json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 1.53,
3+ "temperature_last": true,
34 "top_p": 0.64,
45 "top_k": 33,
5- "typical_p": 1,
66 "top_a": 0.04,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.07,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/Simple-1.json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 0.7,
3+ "temperature_last": true,
34 "top_p": 0.9,
45 "top_k": 20,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.15,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/Space Alien.json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 1.31,
3+ "temperature_last": true,
34 "top_p": 0.29,
45 "top_k": 72,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.09,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/StarChat.json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 0.02,
3+ "temperature_last": true,
34 "top_p": 0.95,
45 "top_k": 50,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/TFS-with-Top-A.json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 0.7,
3+ "temperature_last": true,
34 "top_p": 1,
45 "top_k": 0,
5- "typical_p": 1,
66 "top_a": 0.2,
77 "tfs": 0.95,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.15,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/Titanic.json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 1.01,
3+ "temperature_last": true,
34 "top_p": 0.21,
45 "top_k": 91,
5- "typical_p": 1,
66 "top_a": 0.75,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 10.78,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.21,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1.07,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/Universal-Creative.json+39 -4
@@ -11,6 +11,8 @@
1111 "min_p": 0.1,
1212 "rep_pen": 1,
1313 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1416 "no_repeat_ngram_size": 0,
1517 "penalty_alpha": 0,
1618 "num_beams": 1,
@@ -19,24 +21,56 @@
1921 "encoder_rep_pen": 1,
2022 "freq_pen": 0,
2123 "presence_pen": 0,
24+ "skew": 0,
2225 "do_sample": true,
2326 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
2438 "add_bos_token": true,
25- "truncation_length": 2048,
2639 "ban_eos_token": false,
2740 "skip_special_tokens": true,
28- "streaming": true,
2941 "mirostat_mode": 0,
3042 "mirostat_tau": 5,
3143 "mirostat_eta": 0.1,
3244 "guidance_scale": 1,
3345 "negative_prompt": "",
3446 "grammar_string": "",
47+ "json_schema": {},
3548 "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
3671 "ignore_eos_token": false,
3772 "spaces_between_special_tokens": true,
3873 "typespeculative_ngram": "ooba"false,
39- "legacy_api": false,
4074 "sampler_order": [
4175 5,
4276 6,
@@ -46,5 +80,6 @@
4680 3,
4781 4
4882 ],
83+ "logit_bias": [],
4984 "rep_pen_size": 0
5085}
default/content/presets/textgen/Universal-Light.json+39 -4
@@ -11,6 +11,8 @@
1111 "min_p": 0.1,
1212 "rep_pen": 1,
1313 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1416 "no_repeat_ngram_size": 0,
1517 "penalty_alpha": 0,
1618 "num_beams": 1,
@@ -19,24 +21,56 @@
1921 "encoder_rep_pen": 1,
2022 "freq_pen": 0,
2123 "presence_pen": 0,
24+ "skew": 0,
2225 "do_sample": true,
2326 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
2438 "add_bos_token": true,
25- "truncation_length": 2048,
2639 "ban_eos_token": false,
2740 "skip_special_tokens": true,
28- "streaming": true,
2941 "mirostat_mode": 0,
3042 "mirostat_tau": 5,
3143 "mirostat_eta": 0.1,
3244 "guidance_scale": 1,
3345 "negative_prompt": "",
3446 "grammar_string": "",
47+ "json_schema": {},
3548 "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
3671 "ignore_eos_token": false,
3772 "spaces_between_special_tokens": true,
3873 "typespeculative_ngram": "ooba"false,
39- "legacy_api": false,
4074 "sampler_order": [
4175 5,
4276 6,
@@ -46,5 +80,6 @@
4680 3,
4781 4
4882 ],
83+ "logit_bias": [],
4984 "rep_pen_size": 0
5085}
default/content/presets/textgen/Universal-Super-Creative.json+39 -4
@@ -11,6 +11,8 @@
1111 "min_p": 0.1,
1212 "rep_pen": 1,
1313 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1416 "no_repeat_ngram_size": 0,
1517 "penalty_alpha": 0,
1618 "num_beams": 1,
@@ -19,24 +21,56 @@
1921 "encoder_rep_pen": 1,
2022 "freq_pen": 0,
2123 "presence_pen": 0,
24+ "skew": 0,
2225 "do_sample": true,
2326 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
2438 "add_bos_token": true,
25- "truncation_length": 2048,
2639 "ban_eos_token": false,
2740 "skip_special_tokens": true,
28- "streaming": true,
2941 "mirostat_mode": 0,
3042 "mirostat_tau": 5,
3143 "mirostat_eta": 0.1,
3244 "guidance_scale": 1,
3345 "negative_prompt": "",
3446 "grammar_string": "",
47+ "json_schema": {},
3548 "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
3671 "ignore_eos_token": false,
3772 "spaces_between_special_tokens": true,
3873 "typespeculative_ngram": "ooba"false,
39- "legacy_api": false,
4074 "sampler_order": [
4175 5,
4276 6,
@@ -46,5 +80,6 @@
4680 3,
4781 4
4882 ],
83+ "logit_bias": [],
4984 "rep_pen_size": 0
5085}
default/content/presets/textgen/Yara.json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 0.82,
3+ "temperature_last": true,
34 "top_p": 0.21,
45 "top_k": 72,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.19,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 5,
76+ 6,
77+ 0,
78+ 1,
79+ 2,
80+ 3,
81+ 4
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/presets/textgen/simple-proxy-for-tavern.json+64 -2
@@ -1,23 +1,85 @@
11{
22 "temp": 0.65,
3+ "temperature_last": true,
34 "top_p": 0.47,
45 "top_k": 42,
5- "typical_p": 1,
66 "top_a": 0,
77 "tfs": 1,
88 "epsilon_cutoff": 0,
99 "eta_cutoff": 0,
10+ "typical_p": 1,
11+ "min_p": 0,
1012 "rep_pen": 1.18,
1113 "rep_pen_range": 0,
14+ "rep_pen_decay": 0,
15+ "rep_pen_slope": 1,
1216 "no_repeat_ngram_size": 0,
1317 "penalty_alpha": 0,
1418 "num_beams": 1,
1519 "length_penalty": 1,
1620 "min_length": 0,
1721 "encoder_rep_pen": 1,
22+ "freq_pen": 0,
23+ "presence_pen": 0,
24+ "skew": 0,
1825 "do_sample": true,
1926 "early_stopping": false,
27+ "dynatemp": false,
28+ "min_temp": 0,
29+ "max_temp": 2,
30+ "dynatemp_exponent": 1,
31+ "smoothing_factor": 0,
32+ "smoothing_curve": 1,
33+ "dry_allowed_length": 2,
34+ "dry_multiplier": 0,
35+ "dry_base": 1.75,
36+ "dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
37+ "dry_penalty_last_n": 0,
38+ "add_bos_token": true,
39+ "ban_eos_token": false,
40+ "skip_special_tokens": true,
2041 "mirostat_mode": 0,
2142 "mirostat_tau": 5,
2243 "mirostat_eta": 0.1 ,
44+ "guidance_scale": 1,
45+ "negative_prompt": "",
46+ "grammar_string": "",
47+ "json_schema": {},
48+ "banned_tokens": "",
49+ "sampler_priority": [
50+ "temperature",
51+ "dynamic_temperature",
52+ "quadratic_sampling",
53+ "top_k",
54+ "top_p",
55+ "typical_p",
56+ "epsilon_cutoff",
57+ "eta_cutoff",
58+ "tfs",
59+ "top_a",
60+ "min_p",
61+ "mirostat"
62+ ],
63+ "samplers": [
64+ "top_k",
65+ "tfs_z",
66+ "typical_p",
67+ "top_p",
68+ "min_p",
69+ "temperature"
70+ ],
71+ "ignore_eos_token": false,
72+ "spaces_between_special_tokens": true,
73+ "speculative_ngram": false,
74+ "sampler_order": [
75+ 6,
76+ 0,
77+ 1,
78+ 3,
79+ 4,
80+ 2,
81+ 5
82+ ],
83+ "logit_bias": [],
84+ "rep_pen_size": 0
2385}
default/content/settings.json+0 -1
@@ -44,7 +44,6 @@
4444 "preset": "Default",
4545 "add_bos_token": true,
4646 "stopping_strings": [],
47- "truncation_length": 2048,
4847 "ban_eos_token": false,
4948 "skip_special_tokens": true,
5049 "streaming": false,
public/index.html+2 -19
@@ -1292,7 +1292,7 @@
12921292 </div>
12931293 </div>
12941294 <!-- Enable for llama.cpp when the PR is merged: https://github.com/ggerganov/llama.cpp/pull/6839 -->
12951295 <div data-newbie-hidden data-tg-type="ooba, koboldcpp" id="dryBlock" class="wide100p">
12961296 <h4 class="wide100p textAlignCenter" title="DRY penalizes tokens that would extend the end of the input into a sequence that has previously occurred in the input. Set multiplier to 0 to disable." data-i18n="[title]DRY_Repetition_Penalty_desc">
12971297 <label data-i18n="DRY Repetition Penalty">DRY Repetition Penalty</label>
12981298 <a href="https://github.com/oobabooga/text-generation-webui/pull/5677" target="_blank">
@@ -1315,7 +1315,7 @@
13151315 <input class="neo-range-slider" type="range" id="dry_allowed_length_textgenerationwebui" min="1" max="20" step="1" />
13161316 <input class="neo-range-input" type="number" min="1" max="20" step="1" data-for="dry_allowed_length_textgenerationwebui" id="dry_allowed_length_counter_textgenerationwebui">
13171317 </div>
13181318 <div class="alignItemsCenter flex-container flexFlowColumn flexBasis48p flexGrow flexShrink gap0" data-tg-type="llamacpp, koboldcpp">
13191319 <small data-i18n="Penalty Range">Penalty Range</small>
13201320 <input class="neo-range-slider" type="range" id="dry_penalty_last_n_textgenerationwebui" min="0" max="8192" step="1" />
13211321 <input class="neo-range-input" type="number" min="0" max="8192" step="1" data-for="dry_penalty_last_n_textgenerationwebui" id="dry_penalty_last_n_counter_textgenerationwebui">
@@ -5123,23 +5123,6 @@
51235123 </div>
51245124 </div>
51255125 <!-- templates for JS to reuse when needed -->
5126- <div id="scenario_override_template" class="template_element">
5127- <div class="scenario_override range-block flexFlowColumn flex-container">
5128- <div class="range-block-title title_restorable">
5129- <h3><span data-i18n="Chat Scenario Override" class="margin0">Chat Scenario Override</span></h3>
5130- <div title="Remove" data-i18n="[title]Remove" class="menu_button fa-solid fa-trash-can remove_scenario_override"></div>
5131- </div>
5132- <div class="range-block-counter justifyLeft flex-container flexFlowColumn">
5133- <strong>Unique to this chat.</strong>
5134- <span data-group="true">All group members will use the following scenario text instead of what is specified in their character cards.</span>
5135- <span data-character="true">The following scenario text will be used instead of the value set in the character card.</span>
5136- Checkpoints inherit the scenario override from their parent, and can be changed individually after that.
5137- </div>
5138- <div class="range-block-range wide100p">
5139- <textarea class="wide100p chat_scenario" class="text_pole" rows="15" data-i18n="[placeholder]Type here..." placeholder="Type here..."></textarea>
5140- </div>
5141- </div>
5142- </div>
51435126 <div id="chat_world_template" class="template_element">
51445127 <div class="chat_world range-block flexFlowColumn flex-container">
51455128 <div class="range-block-title">
public/script.js+32 -23
@@ -101,6 +101,7 @@ import {
101101 proxies,
102102 loadProxyPresets,
103103 selected_proxy,
104+ initOpenai,
104105} from './scripts/openai.js';
105106
106107import {
@@ -155,7 +156,6 @@ import {
155156 ensureImageFormatSupported,
156157 flashHighlight,
157158 isTrueBoolean,
158- debouncedThrottle,
159159} from './scripts/utils.js';
160160import { debounce_timeout } from './scripts/constants.js';
161161
@@ -915,6 +915,7 @@ async function firstLoadInit() {
915915 initKeyboard();
916916 initDynamicStyles();
917917 initTags();
918+ initOpenai();
918919 await getUserAvatars(true, user_avatar);
919920 await getCharacters();
920921 await getBackgrounds();
@@ -7183,20 +7184,23 @@ function updateFavButtonState(state) {
71837184 $('#favorite_button').toggleClass('fav_off', !fav_ch_checked);
71847185}
71857186
71867187export async function setScenarioOverride() {
71877188 if (!selected_group && !this_chid) {
71887189 console.warn('setScenarioOverride() -- no selected group or character');
71897190 return;
71907191 }
71917192
7192- const template = $('#scenario_override_template .scenario_override').clone();
71937193 const metadataValue = chat_metadata['scenario'] || '';
71947194 const isGroup = !!selected_group;
7195- template.find('[data-group="true"]').toggle(isGroup);
7195+
7196- template.find('[data-character="true"]').toggle(!isGroup);
7196+ const $template = $(await renderTemplateAsync('scenarioOverride'));
7197- template.find('.chat_scenario').val(metadataValue).on('input', onScenarioOverrideInput);
7197+ $template.find('[data-group="true"]').toggle(isGroup);
71987198 $template.find('.remove_scenario_override[data-character="true"]').ontoggle('click', onScenarioOverrideRemoveClick!isGroup);
7199- callPopup(template, 'text');
7199+ // TODO: Why does this save on every character input? Save on popup close
7200+ $template.find('.chat_scenario').val(metadataValue).on('input', onScenarioOverrideInput);
7201+ $template.find('.remove_scenario_override').on('click', onScenarioOverrideRemoveClick);
7202+
7203+ await callGenericPopup($template, POPUP_TYPE.TEXT, '');
72007204}
72017205
72027206function onScenarioOverrideInput() {
@@ -9125,10 +9129,6 @@ jQuery(async function () {
91259129 $('#groupCurrentMemberListToggle .inline-drawer-icon').trigger('click');
91269130 }, 200);
91279131
9128- $('#chat').on('wheel touchstart', () => {
9129- scrollLock = true;
9130- });
9131-
91329132 $(document).on('click', '.api_loading', cancelStatusCheck);
91339133
91349134 //////////INPUT BAR FOCUS-KEEPING LOGIC/////////////
@@ -9233,23 +9233,32 @@ jQuery(async function () {
92339233 */
92349234 function autoFitEditTextArea(e) {
92359235 scroll_holder = chatElement[0].scrollTop;
92369236 e.style.height = '00px';
92379237 e.style.heightconst newHeight = `${e.scrollHeight + 4}px`;
9238+ e.style.height = `${newHeight}px`;
92389239 is_use_scroll_holder = true;
92399240 }
92409241 const autoFitEditTextAreaDebounced = debouncedThrottledebounce(autoFitEditTextArea, debounce_timeout.standardshort);
92419242 document.addEventListener('input', e => {
92429243 if (e.target instanceof HTMLTextAreaElement && e.target.classList.contains('edit_textarea')) {
92439244 const immediatelyscrollbarShown = e.target.scrollHeightclientWidth >< e.target.offsetHeightoffsetWidth ||&& e.target.valueoffsetHeight ==>= ''window.innerHeight * 0.75;
9245+ const immediately = (e.target.scrollHeight > e.target.offsetHeight && !scrollbarShown) || e.target.value === '';
92449246 immediately ? autoFitEditTextArea(e.target) : autoFitEditTextAreaDebounced(e.target);
92459247 }
92469248 });
9247- document.getElementById('chat').addEventListener('scroll', function () {
9249+ const chatElementScroll = document.getElementById('chat');
9250+ chatElementScroll.addEventListener('wheel', function () {
9251+ scrollLock = true;
9252+ }, { passive: true });
9253+ chatElementScroll.addEventListener('touchstart', function () {
9254+ scrollLock = true;
9255+ }, { passive: true });
9256+ chatElementScroll.addEventListener('scroll', function () {
92489257 if (is_use_scroll_holder) {
92499258 this.scrollTop = scroll_holder;
92509259 is_use_scroll_holder = false;
92519260 }
9252- });
9261+ }, { passive: true });
92539262
92549263 $(document).on('click', '.mes', function () {
92559264 //when a 'delete message' parent div is clicked
@@ -9800,7 +9809,7 @@ jQuery(async function () {
98009809 });
98019810
98029811 //confirms message deletion with the "ok" button
98039812 $('#dialogue_del_mes_ok').clickon('click', async function () {
98049813 $('#dialogue_del_mes').css('display', 'none');
98059814 $('#send_form').css('display', css_send_form_display);
98069815 $('.del_checkbox').each(function () {
@@ -9816,7 +9825,7 @@ jQuery(async function () {
98169825 chat.length = this_del_mes;
98179826 await saveChatConditional();
98189827 chatElement.scrollTop(chatElement[0].scrollHeight);
98199828 await eventSource.emit(event_types.MESSAGE_DELETED, chat.length);
98209829 $('#chat .mes').removeClass('last_mes');
98219830 $('#chat .mes').last().addClass('last_mes');
98229831 } else {
@@ -10647,7 +10656,7 @@ jQuery(async function () {
1064710656 openCharacterWorldPopup();
1064810657 break;
1064910658 case 'set_chat_scenario':
1065010659 await setScenarioOverride();
1065110660 break;
1065210661 case 'renameCharButton':
1065310662 renameCharacter();
@@ -10668,7 +10677,7 @@ jQuery(async function () {
1066810677 const source = getCharacterSource(this_chid);
1066910678 if (source && isValidUrl(source)) {
1067010679 const url = new URL(source);
1067110680 const confirm = await callPopupPopup.show.confirm(`'Open Source', `<span>Do you want to open the link to ${url.hostname} in a new tab?</span><var>${url}</var>`, 'confirm');
1067210681 if (confirm) {
1067310682 window.open(source, '_blank');
1067410683 }
@@ -10677,7 +10686,7 @@ jQuery(async function () {
1067710686 }
1067810687 } break;
1067910688 case 'replace_update': {
1068010689 const confirm = await callPopupPopup.show.confirm('Replace Character', '<p><b>Choose a new character card to replace this character with.</b></p><p>All chats, assets and group memberships will be preserved, but local changes to the character data will be lost.<br /p><p>Proceed?</p>', 'confirm', '');
1068110690 if (confirm) {
1068210691 async function uploadReplacementCard(e) {
1068310692 const file = e.target.files[0];
public/scripts/RossAscends-mods.js+12 -10
@@ -696,18 +696,18 @@ const isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
696696function autoFitSendTextArea() {
697697 const originalScrollBottom = chatBlock.scrollHeight - (chatBlock.scrollTop + chatBlock.offsetHeight);
698698 if (Math.ceil(sendTextArea.scrollHeight + 3) >= Math.floor(sendTextArea.offsetHeight)) {
699- // Needs to be pulled dynamically because it is affected by font size changes
699+ const sendTextAreaMinHeight = '0px';
700- const sendTextAreaMinHeight = window.getComputedStyle(sendTextArea).getPropertyValue('min-height');
701700 sendTextArea.style.height = sendTextAreaMinHeight;
702701 }
703702 sendTextArea.style.heightconst newHeight = sendTextArea.scrollHeight + 3 + 'px';
703+ sendTextArea.style.height = `${newHeight}px`;
704704
705705 if (!isFirefox) {
706706 const newScrollTop = Math.round(chatBlock.scrollHeight - (chatBlock.offsetHeight + originalScrollBottom));
707707 chatBlock.scrollTop = newScrollTop;
708708 }
709709}
710710export const autoFitSendTextAreaDebounced = debounce(autoFitSendTextArea, debounce_timeout.short);
711711
712712// ---------------------------------------------------
713713
@@ -881,12 +881,14 @@ export function initRossMods() {
881881 saveSettingsDebounced();
882882 });
883883
884884 $(sendTextArea).onaddEventListener('input', () => {
885885 if (sendTextArea.scrollHeight >const sendTextArea.offsetHeighthasContent ||= sendTextArea.value =!== '') {;
886- autoFitSendTextArea();
886+ const fitsCurrentSize = sendTextArea.scrollHeight <= sendTextArea.offsetHeight;
887- } else {
887+ const isScrollbarShown = sendTextArea.clientWidth < sendTextArea.offsetWidth;
888- autoFitSendTextAreaDebounced();
888+ const isHalfScreenHeight = sendTextArea.offsetHeight >= window.innerHeight / 2;
889- }
889+ const needsDebounce = hasContent && (fitsCurrentSize || (isScrollbarShown && isHalfScreenHeight));
890+ if (needsDebounce) autoFitSendTextAreaDebounced();
891+ else autoFitSendTextArea();
890892 saveUserInputDebounced();
891893 });
892894
public/scripts/extensions/caption/index.js+3 -2
@@ -333,8 +333,9 @@ async function getCaptionForFile(file, prompt, quiet) {
333333 return caption;
334334 }
335335 catch (error) {
336- toastr.error('Failed to caption image.');
336+ const errorMessage = error.message || 'Unknown error';
337- console.log(error);
337+ toastr.error(errorMessage, "Failed to caption image.");
338+ console.error(error);
338339 return '';
339340 }
340341 finally {
public/scripts/extensions/memory/index.js+1 -1
@@ -914,7 +914,7 @@ jQuery(async function () {
914914
915915 await addExtensionControls();
916916 loadSettings();
917917 eventSource.onmakeLast(event_types.MESSAGE_RECEIVEDCHARACTER_MESSAGE_RENDERED, onChatEvent);
918918 eventSource.on(event_types.MESSAGE_DELETED, onChatEvent);
919919 eventSource.on(event_types.MESSAGE_EDITED, onChatEvent);
920920 eventSource.on(event_types.MESSAGE_SWIPED, onChatEvent);
public/scripts/extensions/quick-reply/index.js+2 -2
@@ -239,7 +239,7 @@ eventSource.on(event_types.CHAT_CHANGED, (...args)=>executeIfReadyElseQueue(onCh
239239const onUserMessage = async () => {
240240 await autoExec.handleUser();
241241};
242242eventSource.onmakeFirst(event_types.USER_MESSAGE_RENDERED, (...args)=>executeIfReadyElseQueue(onUserMessage, args));
243243
244244const onAiMessage = async (messageId) => {
245245 if (['...'].includes(chat[messageId]?.mes)) {
@@ -249,7 +249,7 @@ const onAiMessage = async (messageId) => {
249249
250250 await autoExec.handleAi();
251251};
252252eventSource.onmakeFirst(event_types.CHARACTER_MESSAGE_RENDERED, (...args)=>executeIfReadyElseQueue(onAiMessage, args));
253253
254254const onGroupMemberDraft = async () => {
255255 await autoExec.handleGroupMemberDraft();
public/scripts/extensions/stable-diffusion/index.js+7 -1
@@ -2178,6 +2178,11 @@ function getQuietPrompt(mode, trigger) {
21782178 return stringFormat(extension_settings.sd.prompts[mode], trigger);
21792179}
21802180
2181+/**
2182+ * Sanitizes generated prompt for image generation.
2183+ * @param {string} str String to process
2184+ * @returns {string} Processed reply
2185+ */
21812186function processReply(str) {
21822187 if (!str) {
21832188 return '';
@@ -2187,7 +2192,8 @@ function processReply(str) {
21872192 str = str.replaceAll('“', '');
21882193 str = str.replaceAll('.', ',');
21892194 str = str.replaceAll('\n', ', ');
2190- str = str.replace(/[^a-zA-Z0-9,:_(){}[\]\-']+/g, ' ');
2195+ str = str.normalize('NFD');
2196+ str = str.replace(/[^a-zA-Z0-9,:_(){}<>[\]\-']+/g, ' ');
21912197 str = str.replace(/\s+/g, ' '); // Collapse multiple whitespaces into one
21922198 str = str.trim();
21932199
public/scripts/instruct-mode.js+5 -0
@@ -333,6 +333,9 @@ export function formatInstructModeChat(name, mes, isUser, isNarrator, forceAvata
333333 if (power_user.instruct.macro) {
334334 prefix = substituteParams(prefix, name1, name2);
335335 prefix = prefix.replace(/{{name}}/gi, name || 'System');
336+
337+ suffix = substituteParams(suffix, name1, name2);
338+ suffix = suffix.replace(/{{name}}/gi, name || 'System');
336339 }
337340
338341 if (!suffix && power_user.instruct.wrap) {
@@ -398,6 +401,8 @@ export function formatInstructModeExamples(mesExamplesArray, name1, name2) {
398401
399402 inputPrefix = inputPrefix.replace(/{{name}}/gi, name1);
400403 outputPrefix = outputPrefix.replace(/{{name}}/gi, name2);
404+ inputSuffix = inputSuffix.replace(/{{name}}/gi, name1);
405+ outputSuffix = outputSuffix.replace(/{{name}}/gi, name2);
401406
402407 if (!inputSuffix && power_user.instruct.wrap) {
403408 inputSuffix = '\n';
public/scripts/openai.js+65 -6
@@ -53,6 +53,7 @@ import {
5353 getFileText,
5454 getImageSizeFromDataURL,
5555 getSortableDelay,
56+ getStringHash,
5657 isDataURL,
5758 parseJsonFile,
5859 resetScrollHeight,
@@ -72,6 +73,7 @@ import { SlashCommand } from './slash-commands/SlashCommand.js';
7273import { ARGUMENT_TYPE, SlashCommandArgument } from './slash-commands/SlashCommandArgument.js';
7374import { renderTemplateAsync } from './templates.js';
7475import { SlashCommandEnumValue } from './slash-commands/SlashCommandEnumValue.js';
76+import { Popup, POPUP_RESULT } from './popup.js';
7577
7678export {
7779 openai_messages_count,
@@ -202,6 +204,15 @@ const custom_prompt_post_processing_types = {
202204 CLAUDE: 'claude',
203205};
204206
207+const sensitiveFields = [
208+ 'reverse_proxy',
209+ 'proxy_password',
210+ 'custom_url',
211+ 'custom_include_body',
212+ 'custom_exclude_body',
213+ 'custom_include_headers',
214+];
215+
205216function getPrefixMap() {
206217 return selected_group ? {
207218 assistant: '',
@@ -388,7 +399,7 @@ let openai_settings;
388399
389400let promptManager = null;
390401
391402async function validateReverseProxy() {
392403 if (!oai_settings.reverse_proxy) {
393404 return;
394405 }
@@ -402,6 +413,19 @@ function validateReverseProxy() {
402413 resultCheckStatus();
403414 throw err;
404415 }
416+ const rememberKey = `Proxy_SkipConfirm_${getStringHash(oai_settings.reverse_proxy)}`;
417+ const skipConfirm = localStorage.getItem(rememberKey) === 'true';
418+
419+ const confirmation = skipConfirm || await Popup.show.confirm('Connecting To Proxy', `<span>Are you sure you want to connect to the following proxy URL?</span><var>${DOMPurify.sanitize(oai_settings.reverse_proxy)}</var>`);
420+
421+ if (!confirmation) {
422+ toastr.error('Update or remove your reverse proxy settings.');
423+ setOnlineStatus('no_connection');
424+ resultCheckStatus();
425+ throw new Error('Proxy connection denied.');
426+ }
427+
428+ localStorage.setItem(rememberKey, String(true));
405429}
406430
407431/**
@@ -1787,7 +1811,7 @@ async function sendOpenAIRequest(type, messages, signal) {
17871811
17881812 // Proxy is only supported for Claude, OpenAI, Mistral, and Google MakerSuite
17891813 if (oai_settings.reverse_proxy && [chat_completion_sources.CLAUDE, chat_completion_sources.OPENAI, chat_completion_sources.MISTRALAI, chat_completion_sources.MAKERSUITE].includes(oai_settings.chat_completion_source)) {
17901814 await validateReverseProxy();
17911815 generate_data['reverse_proxy'] = oai_settings.reverse_proxy;
17921816 generate_data['proxy_password'] = oai_settings.proxy_password;
17931817 }
@@ -3200,7 +3224,7 @@ async function getStatusOpen() {
32003224 };
32013225
32023226 if (oai_settings.reverse_proxy && (oai_settings.chat_completion_source === chat_completion_sources.OPENAI || oai_settings.chat_completion_source === chat_completion_sources.CLAUDE)) {
32033227 await validateReverseProxy();
32043228 }
32053229
32063230 if (oai_settings.chat_completion_source === chat_completion_sources.CUSTOM) {
@@ -3495,6 +3519,26 @@ async function onPresetImportFileChange(e) {
34953519 return;
34963520 }
34973521
3522+ const fields = sensitiveFields.filter(field => presetBody[field]).map(field => `<b>${field}</b>`);
3523+ const shouldConfirm = fields.length > 0;
3524+
3525+ if (shouldConfirm) {
3526+ const textHeader = 'The imported preset contains proxy and/or custom endpoint settings.';
3527+ const textMessage = fields.join('<br>');
3528+ const cancelButton = { text: 'Cancel import', result: POPUP_RESULT.CANCELLED, appendAtEnd: true };
3529+ const popupOptions = { customButtons: [cancelButton], okButton: 'Remove them', cancelButton: 'Import as-is' };
3530+ const popupResult = await Popup.show.confirm(textHeader, textMessage, popupOptions);
3531+
3532+ if (popupResult === POPUP_RESULT.CANCELLED) {
3533+ console.log('Import cancelled by user');
3534+ return;
3535+ }
3536+
3537+ if (popupResult === POPUP_RESULT.AFFIRMATIVE) {
3538+ sensitiveFields.forEach(field => delete presetBody[field]);
3539+ }
3540+ }
3541+
34983542 if (name in openai_setting_names) {
34993543 const confirm = await callPopup('Preset name already exists. Overwrite?', 'confirm');
35003544
@@ -3541,8 +3585,22 @@ async function onExportPresetClick() {
35413585
35423586 const preset = structuredClone(openai_settings[openai_setting_names[oai_settings.preset_settings_openai]]);
35433587
3544- delete preset.reverse_proxy;
3588+ const fieldValues = sensitiveFields.filter(field => preset[field]).map(field => `<b>${field}</b>: <code>${preset[field]}</code>`);
3545- delete preset.proxy_password;
3589+ const shouldConfirm = fieldValues.length > 0;
3590+ const textHeader = 'Your preset contains proxy and/or custom endpoint settings.';
3591+ const textMessage = `<div>Do you want to remove these fields before exporting?</div><br>${DOMPurify.sanitize(fieldValues.join('<br>'))}`;
3592+ const cancelButton = { text: 'Cancel', result: POPUP_RESULT.CANCELLED, appendAtEnd: true };
3593+ const popupOptions = { customButtons: [cancelButton] };
3594+ const popupResult = await Popup.show.confirm(textHeader, textMessage, popupOptions);
3595+
3596+ if (popupResult === POPUP_RESULT.CANCELLED) {
3597+ console.log('Export cancelled by user');
3598+ return;
3599+ }
3600+
3601+ if (!shouldConfirm || popupResult === POPUP_RESULT.AFFIRMATIVE) {
3602+ sensitiveFields.forEach(field => delete preset[field]);
3603+ }
35463604
35473605 const presetJsonString = JSON.stringify(preset, null, 4);
35483606 const presetFileName = `${oai_settings.preset_settings_openai}.json`;
@@ -4679,6 +4737,7 @@ function runProxyCallback(_, value) {
46794737 return foundName;
46804738}
46814739
4740+export function initOpenai() {
46824741 SlashCommandParser.addCommandObject(SlashCommand.fromProps({
46834742 name: 'proxy',
46844743 callback: runProxyCallback,
@@ -4694,7 +4753,7 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({
46944753 ],
46954754 helpString: 'Sets a proxy preset by name.',
46964755 }));
4697-
4756+}
46984757
46994758$(document).ready(async function () {
47004759 $('#test_api_button').on('click', testApiConnection);
public/scripts/personas.js+4 -7
@@ -395,19 +395,16 @@ export async function convertCharacterToPersona(characterId = null) {
395395 const overwriteName = `${name} (Persona).png`;
396396
397397 if (overwriteName in power_user.personas) {
398398 const confirmationconfirm = await callPopupPopup.show.confirm('Overwrite Existing Persona', 'This character exists as a persona already. AreDo you sure want to overwrite it?', 'confirm', '', { okButton: 'Yes' });
399-
399+ if (!confirm) {
400- if (confirmation === false) {
401400 console.log('User cancelled the overwrite of the persona');
402401 return;
403402 }
404403 }
405404
406405 if (description.includes('{{char}}') || description.includes('{{user}}')) {
407- await delay(500);
406+ const confirm = await Popup.show.confirm('Persona Description Macros', 'This character has a description that uses <code>{{char}}</code> or <code>{{user}}</code> macros. Do you want to swap them in the persona description?');
408- const confirmation = await callPopup('This character has a description that uses {{char}} or {{user}} macros. Do you want to swap them in the persona description?', 'confirm', '', { okButton: 'Yes' });
407+ if (confirm) {
409-
410- if (confirmation) {
411408 description = description.replace(/{{char}}/gi, '{{personaChar}}').replace(/{{user}}/gi, '{{personaUser}}');
412409 description = description.replace(/{{personaUser}}/gi, '{{char}}').replace(/{{personaChar}}/gi, '{{user}}');
413410 }
public/scripts/popup.js+9 -4
@@ -194,7 +194,7 @@ export class Popup {
194194 const buttonElement = document.createElement('div');
195195 buttonElement.classList.add('menu_button', 'popup-button-custom', 'result-control');
196196 buttonElement.classList.add(...(button.classes ?? []));
197- buttonElement.dataset.result = String(button.result ?? undefined);
197+ buttonElement.dataset.result = String(button.result); // This is expected to also write 'null' or 'staging', to indicate cancel and no action respectively
198198 buttonElement.textContent = button.text;
199199 buttonElement.dataset.i18n = buttonElement.textContent;
200200 buttonElement.tabIndex = 0;
@@ -317,9 +317,14 @@ export class Popup {
317317 // Bind event listeners for all result controls to their defined event type
318318 this.dlg.querySelectorAll('[data-result]').forEach(resultControl => {
319319 if (!(resultControl instanceof HTMLElement)) return;
320- const result = Number(resultControl.dataset.result);
320+ // If no value was set, we exit out and don't bind an action
321321 if (String(undefinedresultControl.dataset.result) === String(resultControl.dataset.resultundefined)) return;
322- if (isNaN(result)) throw new Error('Invalid result control. Result must be a number. ' + resultControl.dataset.result);
322+
323+ // Make sure that both `POPUP_RESULT` numbers and also `null` as 'cancelled' are supported
324+ const result = String(resultControl.dataset.result) === String(null) ? null
325+ : Number(resultControl.dataset.result);
326+
327+ if (result !== null && isNaN(result)) throw new Error('Invalid result control. Result must be a number. ' + resultControl.dataset.result);
323328 const type = resultControl.dataset.resultEvent || 'click';
324329 resultControl.addEventListener(type, async () => await this.complete(result));
325330 });
public/scripts/power-user.js+9 -28
@@ -2734,45 +2734,26 @@ async function doDelMode(_, text) {
27342734 return '';
27352735 }
27362736
27372737 //first Just enter delmodethe delete mode.
2738+ if (!text) {
27382739 $('#option_delete_mes').trigger('click', { fromSlashCommand: true });
2739-
2740- //parse valid args
2741- if (text) {
2742- await delay(300); //same as above, need event signal for 'entered del mode'
2743- console.debug('parsing msgs to del');
2744- let numMesToDel = Number(text);
2745- let lastMesID = Number($('#chat .mes').last().attr('mesid'));
2746- let oldestMesIDToDel = lastMesID - numMesToDel + 1;
2747-
2748- if (oldestMesIDToDel < 0) {
2749- toastr.warning(`Cannot delete more than ${chat.length} messages.`);
27502740 return '';
27512741 }
27522742
2753- let oldestMesToDel = $('#chat').find(`.mes[mesid=${oldestMesIDToDel}]`);
2743+ const count = Number(text);
2754-
2755- if (!oldestMesIDToDel && lastMesID > 0) {
2756- oldestMesToDel = await loadUntilMesId(oldestMesIDToDel);
27572744
2758- if (!oldestMesToDel || !oldestMesToDel.length) {
2745+ // Nothing to delete.
2746+ if (count < 1) {
27592747 return '';
27602748 }
2761- }
2762-
2763- let oldestDelMesCheckbox = $(oldestMesToDel).find('.del_checkbox');
2764- let newLastMesID = oldestMesIDToDel - 1;
2765- console.debug(`DelMesReport -- numMesToDel: ${numMesToDel}, lastMesID: ${lastMesID}, oldestMesIDToDel:${oldestMesIDToDel}, newLastMesID: ${newLastMesID}`);
2766- oldestDelMesCheckbox.trigger('click');
2767- let trueNumberOfDeletedMessage = lastMesID - oldestMesIDToDel + 1;
27682749
2769- //await delay(1)
2750+ if (count > chat.length) {
2770- $('#dialogue_del_mes_ok').trigger('click');
2751+ toastr.warning(`Cannot delete more than ${chat.length} messages.`);
2771- toastr.success(`Deleted ${trueNumberOfDeletedMessage} messages.`);
27722752 return '';
27732753 }
27742754
2775- return '';
2755+ const range = `${chat.length - count}-${chat.length - 1}`;
2756+ return doMesCut(_, range);
27762757}
27772758
27782759function doResetPanels() {
public/scripts/preset-manager.js+10 -13
@@ -1,6 +1,5 @@
11import {
22 amount_gen,
3- callPopup,
43 characters,
54 eventSource,
65 event_types,
@@ -19,6 +18,7 @@ import {
1918import { groups, selected_group } from './group-chats.js';
2019import { instruct_presets } from './instruct-mode.js';
2120import { kai_settings } from './kai-settings.js';
21+import { Popup } from './popup.js';
2222import { context_presets, getContextSettings, power_user } from './power-user.js';
2323import { SlashCommand } from './slash-commands/SlashCommand.js';
2424import { ARGUMENT_TYPE, SlashCommandArgument } from './slash-commands/SlashCommandArgument.js';
@@ -165,11 +165,8 @@ class PresetManager {
165165
166166 async savePresetAs() {
167167 const inputValue = this.getSelectedPresetName();
168- const popupText = `
168+ const popupText = !this.isNonGenericApi() ? '<h4>Hint: Use a character/group name to bind preset to a specific chat.</h4>' : '';
169- <h3>Preset name:</h3>
169+ const name = await Popup.show.input('Preset name:', popupText, inputValue);
170- ${!this.isNonGenericApi() ? '<h4>Hint: Use a character/group name to bind preset to a specific chat.</h4>' : ''}`;
171- const name = await callPopup(popupText, 'input', inputValue);
172-
173170 if (!name) {
174171 console.log('Preset name not provided');
175172 return;
@@ -304,6 +301,9 @@ class PresetManager {
304301
305302 const filteredKeys = [
306303 'preset',
304+ 'streaming',
305+ 'truncation_length',
306+ 'n',
307307 'streaming_url',
308308 'stopping_strings',
309309 'can_use_tokenization',
@@ -372,7 +372,7 @@ class PresetManager {
372372 if (Object.keys(preset_names).length) {
373373 const nextPresetName = Object.keys(preset_names)[0];
374374 const newValue = preset_names[nextPresetName];
375375 $(this.select).find(`option[value="${newValue}"]`).attr('selected', 'true');
376376 $(this.select).trigger('change');
377377 }
378378
@@ -597,8 +597,7 @@ export async function initPresetManager() {
597597 return;
598598 }
599599
600600 const confirm = await callPopupPopup.show.confirm('Delete the preset?', 'This action is irreversible and your current settings will be overwritten.', 'confirm');
601-
602601 if (!confirm) {
603602 return;
604603 }
@@ -641,8 +640,7 @@ export async function initPresetManager() {
641640 return;
642641 }
643642
644643 const confirm = await callPopupPopup.show.confirm('<h3>Are you sure?</h3>', 'Resetting a <b>default preset</b> will restore the default settings.', 'confirm');
645-
646644 if (!confirm) {
647645 return;
648646 }
@@ -653,8 +651,7 @@ export async function initPresetManager() {
653651 presetManager.selectPreset(option);
654652 toastr.success('Default preset restored');
655653 } else {
656654 const confirm = await callPopupPopup.show.confirm('<h3>Are you sure?</h3>', 'Resetting a <b>custom preset</b> will restore to the last saved state.', 'confirm');
657-
658655 if (!confirm) {
659656 return;
660657 }
public/scripts/slash-commands.js+65 -10
@@ -952,14 +952,36 @@ export function initDefaultSlashCommands() {
952952 SlashCommandParser.addCommandObject(SlashCommand.fromProps({
953953 name: 'fuzzy',
954954 callback: fuzzyCallback,
955955 returns: 'first matching item',
956956 namedArgumentList: [
957957 new SlashCommandNamedArgument.fromProps({
958- 'list', 'list of items to match against', [ARGUMENT_TYPE.LIST], true,
958+ name: 'list',
959- ),
959+ description: 'list of items to match against',
960- new SlashCommandNamedArgument(
960+ acceptsMultiple: false,
961- 'threshold', 'fuzzy match threshold (0.0 to 1.0)', [ARGUMENT_TYPE.NUMBER], false, false, '0.4',
961+ isRequired: true,
962- ),
962+ typeList: [ARGUMENT_TYPE.LIST, ARGUMENT_TYPE.VARIABLE_NAME],
963+ enumProvider: commonEnumProviders.variables('all'),
964+ }),
965+ SlashCommandNamedArgument.fromProps({
966+ name: 'threshold',
967+ description: 'fuzzy match threshold (0.0 to 1.0)',
968+ typeList: [ARGUMENT_TYPE.NUMBER],
969+ isRequired: false,
970+ defaultValue: '0.4',
971+ acceptsMultiple: false,
972+ }),
973+ SlashCommandNamedArgument.fromProps({
974+ name: 'mode',
975+ description: 'fuzzy match mode',
976+ typeList: [ARGUMENT_TYPE.STRING],
977+ isRequired: false,
978+ defaultValue: 'first',
979+ acceptsMultiple: false,
980+ enumList: [
981+ new SlashCommandEnumValue('first', 'first match below the threshold', enumTypes.enum, enumIcons.default),
982+ new SlashCommandEnumValue('best', 'best match below the threshold', enumTypes.enum, enumIcons.default),
983+ ],
984+ }),
963985 ],
964986 unnamedArgumentList: [
965987 new SlashCommandArgument(
@@ -977,6 +999,13 @@ export function initDefaultSlashCommands() {
977999 At 1.0 (max) the match is very loose and will match anything.
9781000 </div>
9791001 <div>
1002+ The optional <code>mode</code> argument allows to control the behavior when multiple items match the text.
1003+ <ul>
1004+ <li><code>first</code> (default) returns the first match below the threshold.</li>
1005+ <li><code>best</code> returns the best match below the threshold.</li>
1006+ </ul>
1007+ </div>
1008+ <div>
9801009 The returned value passes to the next command through the pipe.
9811010 </div>
9821011 <div>
@@ -1865,7 +1894,7 @@ async function inputCallback(args, prompt) {
18651894 * @param {FuzzyCommandArgs} args - arguments containing "list" (JSON array) and optionaly "threshold" (float between 0.0 and 1.0)
18661895 * @param {string} searchInValue - the string where items of list are searched
18671896 * @returns {string} - the matched item from the list
18681897 * @typedef {{list: string, threshold: string, mode:string}} FuzzyCommandArgs - arguments for /fuzzy command
18691898 * @example /fuzzy list=["down","left","up","right"] "he looks up" | /echo // should return "up"
18701899 * @link https://www.fusejs.io/
18711900 */
@@ -1895,7 +1924,7 @@ function fuzzyCallback(args, searchInValue) {
18951924 };
18961925 // threshold determines how strict is the match, low threshold value is very strict, at 1 (nearly?) everything matches
18971926 if ('threshold' in args) {
18981927 params.threshold = parseFloat(resolveVariable(args.threshold));
18991928 if (isNaN(params.threshold)) {
19001929 console.warn('WARN: \'threshold\' argument must be a float between 0.0 and 1.0 for /fuzzy command');
19011930 return '';
@@ -1908,16 +1937,42 @@ function fuzzyCallback(args, searchInValue) {
19081937 }
19091938 }
19101939
1940+ function getFirstMatch() {
19111941 const fuse = new Fuse([searchInValue], params);
19121942 // each item in the "list" is searched within "search_item", if any matches it returns the matched "item"
19131943 for (const searchItem of list) {
19141944 const result = fuse.search(searchItem);
1945+ console.debug('/fuzzy: result', result);
19151946 if (result.length > 0) {
19161947 console.info('fuzzyCallback Matched/fuzzy: 'first +matched', searchItem);
19171948 return searchItem;
19181949 }
19191950 }
1951+
1952+ console.info('/fuzzy: no match');
19201953 return '';
1954+ }
1955+
1956+ function getBestMatch() {
1957+ const fuse = new Fuse(list, params);
1958+ const result = fuse.search(searchInValue);
1959+ console.debug('/fuzzy: result', result);
1960+ if (result.length > 0) {
1961+ console.info('/fuzzy: best matched', result[0].item);
1962+ return result[0].item;
1963+ }
1964+
1965+ console.info('/fuzzy: no match');
1966+ return '';
1967+ }
1968+
1969+ switch (String(args.mode).trim().toLowerCase()) {
1970+ case 'best':
1971+ return getBestMatch();
1972+ case 'first':
1973+ default:
1974+ return getFirstMatch();
1975+ }
19211976 } catch {
19221977 console.warn('WARN: Invalid list argument provided for /fuzzy command');
19231978 return '';
public/scripts/slash-commands/SlashCommandCommonEnumsProvider.js+13 -13
@@ -1,11 +1,11 @@
11import { chat_metadata, characters, substituteParams, chat, extension_prompt_roles, extension_prompt_types } from "'../../script.js"';
22import { extension_settings } from "'../extensions.js"';
33import { getGroupMembers, groups, selected_group } from "'../group-chats.js"';
44import { power_user } from "'../power-user.js"';
55import { searchCharByName, getTagsList, tags } from "'../tags.js"';
66import { SlashCommandClosureworld_names } from "'../SlashCommandClosureworld-info.js"';
77import { SlashCommandEnumValue, enumTypesSlashCommandClosure } from "'./SlashCommandEnumValueSlashCommandClosure.js"';
88import { SlashCommandExecutorSlashCommandEnumValue, enumTypes } from "'./SlashCommandExecutorSlashCommandEnumValue.js"';
99
1010/**
1111 * A collection of regularly used enum icons
@@ -103,8 +103,8 @@ export const enumIcons = {
103103 // Remove possible nullable types definition to match type icon
104104 type = type.replace(/\?$/, '');
105105 return enumIcons[type] ?? enumIcons.default;
106106 },
107107};
108108
109109/**
110110 * A collection of common enum providers
@@ -143,7 +143,7 @@ export const commonEnumProviders = {
143143 ...isAll || types.includes('global') ? Object.keys(extension_settings.variables.global ?? []).map(name => new SlashCommandEnumValue(name, null, enumTypes.macro, enumIcons.globalVariable)) : [],
144144 ...isAll || types.includes('local') ? Object.keys(chat_metadata.variables ?? []).map(name => new SlashCommandEnumValue(name, null, enumTypes.name, enumIcons.localVariable)) : [],
145145 ...isAll || types.includes('scope') ? [].map(name => new SlashCommandEnumValue(name, null, enumTypes.variable, enumIcons.scopeVariable)) : [], // TODO: Add scoped variables here, Lenny
146146 ];
147147 },
148148
149149 /**
@@ -180,7 +180,7 @@ export const commonEnumProviders = {
180180 * @param {('all' | 'existing' | 'not-existing')?} [mode='all'] - Which types of tags to show
181181 * @returns {() => SlashCommandEnumValue[]}
182182 */
183183 tagsForChar: (mode = 'all') => (/** @type {import('./SlashCommandExecutor.js').SlashCommandExecutor} */ executor) => {
184184 // Try to see if we can find the char during execution to filter down the tags list some more. Otherwise take all tags.
185185 const charName = executor.namedArgumentList.find(it => it.name == 'name')?.value;
186186 if (charName instanceof SlashCommandClosure) throw new Error('Argument \'name\' does not support closures');
@@ -213,7 +213,7 @@ export const commonEnumProviders = {
213213 *
214214 * @returns {SlashCommandEnumValue[]}
215215 */
216216 worlds: () => $('#world_info').children().toArray()world_names.map(xworldName => new SlashCommandEnumValue(x.textContentworldName, null, enumTypes.name, enumIcons.world)),
217217
218218 /**
219219 * All existing injects for the current chat
public/scripts/templates/scenarioOverride.html+17 -0
@@ -0,0 +1,17 @@
1+<div class="scenario_override range-block flexFlowColumn flex-container">
2+ <div class="range-block-title title_restorable">
3+ <h3><span data-i18n="Chat Scenario Override" class="margin0">Chat Scenario Override</span></h3>
4+ <div title="Remove" data-i18n="[title]Remove"
5+ class="menu_button fa-solid fa-trash-can remove_scenario_override"></div>
6+ </div>
7+ <div class="range-block-counter justifyLeft flex-container flexFlowColumn">
8+ <strong>Unique to this chat.</strong>
9+ <span data-group="true">All group members will use the following scenario text instead of what is specified in their character cards.</span>
10+ <span data-character="true">The following scenario text will be used instead of the value set in the character card.</span>
11+ Checkpoints inherit the scenario override from their parent, and can be changed individually after that.
12+ </div>
13+ <div class="range-block-range wide100p">
14+ <textarea class="wide100p chat_scenario" class="text_pole" rows="15" data-i18n="[placeholder]Type here..."
15+ placeholder="Type here..."></textarea>
16+ </div>
17+</div>
public/scripts/world-info.js+245 -142
@@ -14,7 +14,6 @@ import { SlashCommand } from './slash-commands/SlashCommand.js';
1414import { ARGUMENT_TYPE, SlashCommandArgument, SlashCommandNamedArgument } from './slash-commands/SlashCommandArgument.js';
1515import { SlashCommandEnumValue, enumTypes } from './slash-commands/SlashCommandEnumValue.js';
1616import { commonEnumProviders, enumIcons } from './slash-commands/SlashCommandCommonEnumsProvider.js';
17-import { SlashCommandExecutor } from './slash-commands/SlashCommandExecutor.js';
1817import { SlashCommandClosure } from './slash-commands/SlashCommandClosure.js';
1918import { callGenericPopup, Popup, POPUP_TYPE } from './popup.js';
2019
@@ -171,7 +170,7 @@ class WorldInfoBuffer {
171170 #skew = 0;
172171
173172 /**
174- * @type {number} The starting depth of the global scan depth. Incremented by "min activations" feature to not repeat scans. When > 0 it means a complete scan was done up to #startDepth already, and `advanceScanPosition` was called.
173+ * @type {number} The starting depth of the global scan depth.
175174 */
176175 #startDepth = 0;
177176
@@ -224,12 +223,12 @@ class WorldInfoBuffer {
224223 }
225224
226225 if (depth < 0) {
227226 console.error(`[WI] Invalid WI scan depth ${depth}. Must be >= 0`);
228227 return '';
229228 }
230229
231230 if (depth > MAX_SCAN_DEPTH) {
232231 console.warn(`[WI] Invalid WI scan depth ${depth}. Truncating to ${MAX_SCAN_DEPTH}`);
233232 depth = MAX_SCAN_DEPTH;
234233 }
235234
@@ -303,10 +302,17 @@ class WorldInfoBuffer {
303302 }
304303
305304 /**
306305 * IncrementsChecks skewif andthe setsrecursion startDepthbuffer tois previousnot depthempty.
306+ * @returns {boolean} Returns true if the recursion buffer is not empty, otherwise false
307307 */
308308 advanceScanPositionhasRecurse() {
309309 return this.#startDepthrecurseBuffer.length => this.getDepth()0;
310+ }
311+
312+ /**
313+ * Increments skew to advance the scan range.
314+ */
315+ advanceScan() {
310316 this.#skew++;
311317 }
312318
@@ -438,7 +444,7 @@ class WorldInfoTimedEffects {
438444 const key = this.#getEntryKey(entry);
439445 const effect = this.#getEntryTimedEffect('cooldown', entry, true);
440446 chat_metadata.timedWorldInfo.cooldown[key] = effect;
441447 console.log(`[WI] Adding cooldown entry ${key} on ended sticky: start=${effect.start}, end=${effect.end}, protected=${effect.protected}`);
442448 // Set the cooldown immediately for this evaluation
443449 this.#buffer.cooldown.push(entry);
444450 },
@@ -449,7 +455,7 @@ class WorldInfoTimedEffects {
449455 * @param {WIScanEntry} entry Entry that ended cooldown
450456 */
451457 'cooldown': (entry) => {
452458 console.debug('[WI] Cooldown ended for entry', entry.uid);
453459 },
454460
455461 'delay': () => { },
@@ -539,11 +545,11 @@ class WorldInfoTimedEffects {
539545 /** @type {[string, WITimedEffect][]} */
540546 const effects = Object.entries(chat_metadata.timedWorldInfo[type]);
541547 for (const [key, value] of effects) {
542548 console.log(`[WI] Processing ${type} entry ${key}`, value);
543549 const entry = this.#entries.find(x => String(this.#getEntryHash(x)) === String(value.hash));
544550
545551 if (this.#chat.length <= Number(value.start) && !value.protected) {
546552 console.log(`[WI] Removing ${type} entry ${key} from timedWorldInfo: chat not advanced`, value);
547553 delete chat_metadata.timedWorldInfo[type][key];
548554 continue;
549555 }
@@ -551,7 +557,7 @@ class WorldInfoTimedEffects {
551557 // Missing entries (they could be from another character's lorebook)
552558 if (!entry) {
553559 if (this.#chat.length >= Number(value.end)) {
554560 console.log(`[WI] Removing ${type} entry from timedWorldInfo: entry not found and interval passed`, entry);
555561 delete chat_metadata.timedWorldInfo[type][key];
556562 }
557563 continue;
@@ -559,13 +565,13 @@ class WorldInfoTimedEffects {
559565
560566 // Ignore invalid entries (not configured for timed effects)
561567 if (!entry[type]) {
562568 console.log(`[WI] Removing ${type} entry from timedWorldInfo: entry not ${type}`, entry);
563569 delete chat_metadata.timedWorldInfo[type][key];
564570 continue;
565571 }
566572
567573 if (this.#chat.length >= Number(value.end)) {
568574 console.log(`[WI] Removing ${type} entry from timedWorldInfo: ${type} interval passed`, entry);
569575 delete chat_metadata.timedWorldInfo[type][key];
570576 if (typeof onEnded === 'function') {
571577 onEnded(entry);
@@ -574,7 +580,7 @@ class WorldInfoTimedEffects {
574580 }
575581
576582 buffer.push(entry);
577583 console.log(`[WI] Timed effect "${type}" applied to entry`, entry);
578584 }
579585 }
580586
@@ -590,7 +596,7 @@ class WorldInfoTimedEffects {
590596
591597 if (this.#chat.length < entry.delay) {
592598 buffer.push(entry);
593599 console.log('[WI] Timed effect "delay" applied to entry', entry);
594600 }
595601 }
596602
@@ -637,7 +643,7 @@ class WorldInfoTimedEffects {
637643 const effect = this.#getEntryTimedEffect(type, entry, false);
638644 chat_metadata.timedWorldInfo[type][key] = effect;
639645
640646 console.log(`[WI] Adding ${type} entry ${key}: start=${effect.start}, end=${effect.end}, protected=${effect.protected}`);
641647 }
642648 }
643649
@@ -669,7 +675,7 @@ class WorldInfoTimedEffects {
669675 if (newState) {
670676 const effect = this.#getEntryTimedEffect(type, entry, false);
671677 chat_metadata.timedWorldInfo[type][key] = effect;
672678 console.log(`[WI] Adding ${type} entry ${key}: start=${effect.start}, end=${effect.end}, protected=${effect.protected}`);
673679 }
674680 }
675681
@@ -1216,7 +1222,7 @@ function registerWorldInfoSlashCommands() {
12161222 enumTypes.enum, enumIcons.getDataTypeIcon(value.type))),
12171223
12181224 /** All existing UIDs based on the file argument as world name */
12191225 wiUids: (/** @type {import('./slash-commands/SlashCommandExecutor.js').SlashCommandExecutor} */ executor) => {
12201226 const file = executor.namedArgumentList.find(it => it.name == 'file')?.value;
12211227 if (file instanceof SlashCommandClosure) throw new Error('Argument \'file\' does not support closures');
12221228 // Try find world from cache
@@ -3162,7 +3168,8 @@ function duplicateWorldInfoEntry(data, uid) {
31623168 }
31633169
31643170 // Exclude uid and gather the rest of the properties
31653171 const { uid:originalData _,= ..Object.originalData assign({} =, data.entries[uid]);
3172+ delete originalData.uid;
31663173
31673174 // Create new entry and copy over data
31683175 const entry = createWorldInfoEntry(data.name, data);
@@ -3420,13 +3427,12 @@ async function createNewWorldInfo(worldName, { interactive = false } = {}) {
34203427async function getCharacterLore() {
34213428 const character = characters[this_chid];
34223429 const name = character?.name;
3430+ /** @type {Set<string>} */
34233431 let worldsToSearch = new Set();
34243432
34253433 const baseWorldName = character?.data?.extensions?.world;
34263434 if (baseWorldName) {
34273435 worldsToSearch.add(baseWorldName);
3428- } else {
3429- console.debug(`Character ${name}'s base world could not be found or is empty! Skipping...`);
34303436 }
34313437
34323438 // TODO: Maybe make the utility function not use the window context?
@@ -3436,40 +3442,48 @@ async function getCharacterLore() {
34363442 worldsToSearch = new Set([...worldsToSearch, ...extraCharLore.extraBooks]);
34373443 }
34383444
3445+ if (!worldsToSearch.size) {
3446+ return [];
3447+ }
3448+
34393449 let entries = [];
34403450 for (const worldName of worldsToSearch) {
34413451 if (selected_world_info.includes(worldName)) {
34423452 console.debug(`[WI] Character ${name}'s world ${worldName} is already activated in global world info! Skipping...`);
34433453 continue;
34443454 }
34453455
34463456 if (chat_metadata[METADATA_KEY] === worldName) {
34473457 console.debug(`[WI] Character ${name}'s world ${worldName} is already activated in chat lore! Skipping...`);
34483458 continue;
34493459 }
34503460
34513461 const data = await loadWorldInfoData(worldName);
34523462 const newEntries = data ? Object.keys(data.entries).map((x) => data.entries[x]).map(x({ uid, ...rest }) => ({ ...xuid, world: worldName, ...rest })) : [];
34533463 entries = entries.concat(newEntries);
3464+
3465+ if (!newEntries.length) {
3466+ console.debug(`[WI] Character ${name}'s world ${worldName} could not be found or is empty`);
3467+ }
34543468 }
34553469
34563470 console.debug(`[WI] Character ${name}'s lore (${Array.from(worldsToSearch)}) has ${entries.length} world info entries`, [...worldsToSearch]);
34573471 return entries;
34583472}
34593473
34603474async function getGlobalLore() {
34613475 if (!selected_world_info?.length) {
34623476 return [];
34633477 }
34643478
34653479 let entries = [];
34663480 for (const worldName of selected_world_info) {
34673481 const data = await loadWorldInfoData(worldName);
34683482 const newEntries = data ? Object.keys(data.entries).map((x) => data.entries[x]).map(x({ uid, ...rest }) => ({ ...xuid, world: worldName, ...rest })) : [];
34693483 entries = entries.concat(newEntries);
34703484 }
34713485
34723486 console.debug(`[WI] Global world info has ${entries.length} entries`, selected_world_info);
34733487
34743488 return entries;
34753489}
@@ -3482,14 +3496,14 @@ async function getChatLore() {
34823496 }
34833497
34843498 if (selected_world_info.includes(chatWorld)) {
34853499 console.debug(`[WI] Chat world ${chatWorld} is already activated in global world info! Skipping...`);
34863500 return [];
34873501 }
34883502
34893503 const data = await loadWorldInfoData(chatWorld);
34903504 const entries = data ? Object.keys(data.entries).map((x) => data.entries[x]).map(x({ uid, ...rest }) => ({ ...xuid, world: chatWorld, ...rest })) : [];
34913505
34923506 console.debug(`[WI] Chat lore has ${entries.length} entries`, [chatWorld]);
34933507
34943508 return entries;
34953509}
@@ -3513,7 +3527,7 @@ export async function getSortedEntries() {
35133527 entries = [...globalLore.sort(sortFn), ...characterLore.sort(sortFn)];
35143528 break;
35153529 default:
35163530 console.error('[WI] Unknown WI insertion strategy: ', world_info_character_strategy, 'defaulting to evenly');
35173531 entries = [...globalLore, ...characterLore].sort(sortFn);
35183532 break;
35193533 }
@@ -3521,7 +3535,13 @@ export async function getSortedEntries() {
35213535 // Chat lore always goes first
35223536 entries = [...chatLore.sort(sortFn), ...entries];
35233537
3524- console.debug(`Sorted ${entries.length} world lore entries using strategy ${world_info_character_strategy}`);
3538+ // Parse decorators
3539+ entries = entries.map((entry) => {
3540+ const [decorators, content] = parseDecorators(entry.content);
3541+ return { ...entry, decorators, content };
3542+ });
3543+
3544+ console.debug(`[WI] Found ${entries.length} world lore entries. Sorted by strategy`, Object.entries(world_info_insertion_strategy).find((x) => x[1] === world_info_character_strategy));
35253545
35263546 // Need to deep clone the entries to avoid modifying the cached data
35273547 return structuredClone(entries);
@@ -3600,6 +3620,8 @@ async function checkWorldInfo(chat, maxContext, isDryRun) {
36003620 const context = getContext();
36013621 const buffer = new WorldInfoBuffer(chat);
36023622
3623+ console.debug(`[WI] --- START WI SCAN (on ${chat.length} messages) ---`);
3624+
36033625 // Combine the chat
36043626
36053627 // Add the depth or AN if enabled
@@ -3623,11 +3645,11 @@ async function checkWorldInfo(chat, maxContext, isDryRun) {
36233645 let budget = Math.round(world_info_budget * maxContext / 100) || 1;
36243646
36253647 if (world_info_budget_cap > 0 && budget > world_info_budget_cap) {
36263648 console.debug(`[WI] Budget ${budget} exceeds cap ${world_info_budget_cap}, using cap`);
36273649 budget = world_info_budget_cap;
36283650 }
36293651
36303652 console.debug(`[WI] Context size: ${maxContext}; WI budget: ${budget} (max% = ${world_info_budget}%, cap = ${world_info_budget_cap})`);
36313653 const sortedEntries = await getSortedEntries();
36323654 const timedEffects = new WorldInfoTimedEffects(chat, sortedEntries);
36333655
@@ -3637,19 +3659,40 @@ async function checkWorldInfo(chat, maxContext, isDryRun) {
36373659 return { worldInfoBefore: '', worldInfoAfter: '', WIDepthEntries: [], EMEntries: [], allActivatedEntries: new Set() };
36383660 }
36393661
3662+ console.debug(`[WI] --- SEARCHING ENTRIES (on ${sortedEntries.length} entries) ---`);
3663+
36403664 while (scanState) {
36413665 // Track how many times the loop has run. May be useful for debugging.
3642- // eslint-disable-next-line no-unused-vars
36433666 count++;
36443667
3668+ console.debug(`[WI] Loop #${count}. Search state`, Object.entries(scan_state).find(x => x[1] === scanState));
3669+
3670+ // Until decided otherwise, we set the loop to stop scanning after this
3671+ let nextScanState = scan_state.NONE;
3672+
3673+ // Loop and find all entries that can activate here
36453674 let activatedNow = new Set();
36463675
36473676 for (let entry of sortedEntries) {
3677+ // Logging preparation
3678+ let headerLogged = false;
3679+ function log(...args) {
3680+ if (!headerLogged) {
3681+ console.debug(`[WI] Entry ${entry.uid}`, `from '${entry.world}' processing`, entry);
3682+ headerLogged = true;
3683+ }
3684+ console.debug(`[WI] Entry ${entry.uid}`, ...args);
3685+ }
36483686
3649- //oarse decorators
3687+ // Already processed, considered and then skipped entries should still be skipped
3650- const [decorators, content] = parseDecorators(entry.content);
3688+ if (failedProbabilityChecks.has(entry) || allActivatedEntries.has(entry)) {
3651- entry.decorators = decorators;
3689+ continue;
3652- entry.content = content;
3690+ }
3691+
3692+ if (entry.disable == true) {
3693+ log('disabled');
3694+ continue;
3695+ }
36533696
36543697 // Check if this entry applies to the character or if it's excluded
36553698 if (entry.characterFilter && entry.characterFilter?.names?.length > 0) {
@@ -3657,7 +3700,7 @@ async function checkWorldInfo(chat, maxContext, isDryRun) {
36573700 const filtered = entry.characterFilter.isExclude ? nameIncluded : !nameIncluded;
36583701
36593702 if (filtered) {
36603703 console.debuglog(`WI entry ${entry.uid} 'filtered out by character`');
36613704 continue;
36623705 }
36633706 }
@@ -3674,7 +3717,7 @@ async function checkWorldInfo(chat, maxContext, isDryRun) {
36743717 const filtered = entry.characterFilter.isExclude ? includesTag : !includesTag;
36753718
36763719 if (filtered) {
36773720 console.debuglog(`WI entry ${entry.uid} 'filtered out by tag`');
36783721 continue;
36793722 }
36803723 }
@@ -3686,198 +3729,253 @@ async function checkWorldInfo(chat, maxContext, isDryRun) {
36863729 const isDelay = timedEffects.isEffectActive('delay', entry);
36873730
36883731 if (isDelay) {
3689- console.debug(`WI entry ${entry.uid} suppressed by delay`, entry);
3732+ log('suppressed by delay');
36903733 continue;
36913734 }
36923735
36933736 if (isCooldown && !isSticky) {
3694- console.debug(`WI entry ${entry.uid} suppressed by cooldown`, entry);
3737+ log('suppressed by cooldown');
36953738 continue;
36963739 }
36973740
3698- if (failedProbabilityChecks.has(entry)) {
3741+ // Only use checks for recursion flags if the scan step was activated by recursion
3742+ if (scanState !== scan_state.RECURSION && entry.delayUntilRecursion) {
3743+ log('suppressed by delay until recursion');
36993744 continue;
37003745 }
37013746
3702- if (allActivatedEntries.has(entry) || entry.disable == true) {
3747+ if (scanState === scan_state.RECURSION && world_info_recursive && entry.excludeRecursion) {
3748+ log('suppressed by exclude recursion');
37033749 continue;
37043750 }
37053751
3706- // Only use checks for recursion flags if the scan step was activated by recursion
3752+ if (entry.decorators.includes('@@activate')) {
3707- if (scanState !== scan_state.RECURSION && entry.delayUntilRecursion) {
3753+ log('activated by @@activate decorator');
3708- console.debug(`WI entry ${entry.uid} suppressed by delay until recursion`, entry);
3754+ activatedNow.add(entry);
37093755 continue;
37103756 }
37113757
3712- if (scanState === scan_state.RECURSION && world_info_recursive && entry.excludeRecursion) {
3758+ if (entry.decorators.includes('@@dont_activate')) {
3713- console.debug(`WI entry ${entry.uid} suppressed by exclude recursion`, entry);
3759+ log('suppressed by @@dont_activate decorator');
37143760 continue;
37153761 }
37163762
3717- if (decorators.includes('@@activate')) {
3763+ // Now do checks for immediate activations
3718- //activate in any case
3764+ if (entry.constant) {
3765+ log('activated because of constant');
37193766 activatedNow.add(entry);
37203767 continue;
37213768 }
37223769
37233770 if (decoratorsbuffer.includesisExternallyActivated('@@dont_activate'entry)) {
3724- //deactivate in any case if @@activate is not present
3771+ log('externally activated');
3772+ activatedNow.add(entry);
37253773 continue;
37263774 }
37273775
3728- if (entry.constant || buffer.isExternallyActivated(entry) || isSticky) {
3776+ if (isSticky) {
3777+ log('activated because active sticky');
37293778 activatedNow.add(entry);
37303779 continue;
37313780 }
37323781
3782+ if (!Array.isArray(entry.key) || !entry.key.length) {
3783+ log('has no keys defined, skipped');
3784+ continue;
3785+ }
37333786
3734- if (Array.isArray(entry.key) && entry.key.length) { //check for keywords existing
3787+ // Cache the text to scan before the loop, it won't change its content
3735- // If selectiveLogic isn't found, assume it's AND, only do this once per entry
3788+ const textToScan = buffer.get(entry, scanState);
3736- const selectiveLogic = entry.selectiveLogic ?? 0;
37373789
3738- primary: for (let key of entry.key) {
3790+ // PRIMARY KEYWORDS
3791+ let primaryKeyMatch = entry.key.find(key => {
37393792 const substituted = substituteParams(key);
3740- const textToScan = buffer.get(entry, scanState);
3793+ return substituted && buffer.matchKeys(textToScan, substituted.trim(), entry);
3794+ });
37413795
3742- if (substituted && buffer.matchKeys(textToScan, substituted.trim(), entry)) {
3796+ if (!primaryKeyMatch) {
3743- console.debug(`WI UID ${entry.uid} found by primary match: ${substituted}.`);
3797+ // Don't write logs for simple no-matches
3798+ continue;
3799+ }
37443800
3745- //selective logic begins
3801+ const hasSecondaryKeywords = (
3746- if (
37473802 entry.selective && //all entries are selective now
37483803 Array.isArray(entry.keysecondary) && //always true
37493804 entry.keysecondary.length //ignore empties
3750- ) {
3805+ );
3751- console.debug(`WI UID:${entry.uid} found. Checking logic: ${entry.selectiveLogic}`);
3806+
3807+ if (!hasSecondaryKeywords) {
3808+ // Handle cases where secondary is empty
3809+ log('activated by primary key match', primaryKeyMatch);
3810+ activatedNow.add(entry);
3811+ continue;
3812+ }
3813+
3814+
3815+ // SECONDARY KEYWORDS
3816+ const selectiveLogic = entry.selectiveLogic ?? 0; // If selectiveLogic isn't found, assume it's AND, only do this once per entry
3817+ log('Entry with primary key match', primaryKeyMatch, 'has secondary keywords. Checking with logic logic', Object.entries(world_info_logic).find(x => x[1] === entry.selectiveLogic));
3818+
3819+ /** @type {() => boolean} */
3820+ function matchSecondaryKeys() {
37523821 let hasAnyMatch = false;
37533822 let hasAllMatch = true;
37543823 secondary: for (let keysecondary of entry.keysecondary) {
37553824 const secondarySubstituted = substituteParams(keysecondary);
37563825 const hasSecondaryMatch = secondarySubstituted && buffer.matchKeys(textToScan, secondarySubstituted.trim(), entry);
3757- console.debug(`WI UID:${entry.uid}: Filtering for secondary keyword - "${secondarySubstituted}".`);
3758-
3759- if (hasSecondaryMatch) {
3760- hasAnyMatch = true;
3761- }
37623826
37633827 if (!hasSecondaryMatch) {hasAnyMatch = true;
37643828 if (!hasSecondaryMatch) hasAllMatch = false;
3765- }
37663829
37673830 // Simplified AND ANY / NOT ALL if statement. (Proper fix for PR#1356 by Bronya)
37683831 // If AND ANY logic and the main checks pass OR if NOT ALL logic and the main checks do not pass
37693832 if ((selectiveLogic === world_info_logic.AND_ANY && hasSecondaryMatch) || (selectiveLogic === world_info_logic.NOT_ALL && !hasSecondaryMatch)) {
3770- // Differ both logic statements in the debugger
3833+ log('activated. (AND ANY) Found match secondary keyword', secondarySubstituted);
3771- if (selectiveLogic === world_info_logic.AND_ANY) {
3834+ return true;
3772- console.debug(`(AND ANY Check) Activating WI Entry ${entry.uid}. Found match for word: ${substituted} ${secondarySubstituted}`);
3773- } else {
3774- console.debug(`(NOT ALL Check) Activating WI Entry ${entry.uid}. Found match for word "${substituted}" without secondary keyword: ${secondarySubstituted}`);
37753835 }
3776- activatedNow.add(entry);
3836+ if (selectiveLogic === world_info_logic.NOT_ALL && !hasSecondaryMatch) {
3777- break secondary;
3837+ log('activated. (NOT ALL) Found not matching secondary keyword', secondarySubstituted);
3838+ return true;
37783839 }
37793840 }
37803841
37813842 // Handle NOT ANY logic
37823843 if (selectiveLogic === world_info_logic.NOT_ANY && !hasAnyMatch) {
3783- console.debug(`(NOT ANY Check) Activating WI Entry ${entry.uid}, no secondary keywords found.`);
3844+ log('activated. (NOT ANY) No secondary keywords found', entry.keysecondary);
3784- activatedNow.add(entry);
3845+ return true;
37853846 }
37863847
37873848 // Handle AND ALL logic
37883849 if (selectiveLogic === world_info_logic.AND_ALL && hasAllMatch) {
3789- console.debug(`(AND ALL Check) Activating WI Entry ${entry.uid}, all secondary keywords found.`);
3850+ log('activated. (AND ALL) All secondary keywords found', entry.keysecondary);
3790- activatedNow.add(entry);
3851+ return true;
3791- }
3792- } else {
3793- // Handle cases where secondary is empty
3794- console.debug(`WI UID ${entry.uid}: Activated without filter logic.`);
3795- activatedNow.add(entry);
3796- break primary;
3797- }
37983852 }
3853+
3854+ return false;
37993855 }
3856+
3857+ const matched = matchSecondaryKeys();
3858+ if (!matched) {
3859+ log('skipped. Secondary keywords not satisfied', entry.keysecondary);
3860+ continue;
38003861 }
3862+
3863+ // Success logging was already done inside the function, so just add the entry
3864+ activatedNow.add(entry);
3865+ continue;
38013866 }
38023867
3803- scanState = world_info_recursive && activatedNow.size > 0 ? scan_state.RECURSION : scan_state.NONE;
3868+ console.debug(`[WI] Search done. Found ${activatedNow.size} possible entries.`);
38043869 const newEntries = [...activatedNow]
38053870 .sort((a, b) => sortedEntries.indexOf(a) - sortedEntries.indexOf(b));
38063871 let newContent = '';
38073872 const textToScanTokens = await getTokenCountAsync(allActivatedText);
3808- const probabilityChecksBefore = failedProbabilityChecks.size;
38093873
38103874 filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanState);
38113875
38123876 console.debug('[WI] --- PROBABILITY CHECKS BEGIN ---');
38133877 for (const entry of newEntries) {
3814- const rollValue = Math.random() * 100;
3878+ function verifyProbability() {
3879+ // If we don't need to roll, it's always true
3880+ if (!entry.useProbability || entry.probability === 100) {
3881+ console.debug(`WI entry ${entry.uid} does not use probability`);
3882+ return true;
3883+ }
38153884
3816- if (entry.useProbability && rollValue > entry.probability) {
38173885 const isSticky = timedEffects.isEffectActive('sticky', entry);
38183886 if (!isSticky) {
38193887 console.debug(`WI entry ${entry.uid} ${entry.key}is failedsticky, probabilitydoes check,not skippingneed to re-roll probability`);
3888+ return true;
3889+ }
3890+
3891+ const rollValue = Math.random() * 100;
3892+ if (rollValue <= entry.probability) {
3893+ console.debug(`WI entry ${entry.uid} passed probability check of ${entry.probability}%`);
3894+ return true;
3895+ }
3896+
38203897 failedProbabilityChecks.add(entry);
3898+ return false;
3899+ }
3900+
3901+ const success = verifyProbability();
3902+ if (!success) {
3903+ console.debug(`WI entry ${entry.uid} failed probability check, removing from activated entries`, entry);
38213904 continue;
38223905 }
3823- } else { console.debug(`uid:${entry.uid} passed probability check, inserting to prompt`); }
38243906
38253907 // Substitute macros inline, for both this checking and also future processing
38263908 entry.content = substituteParams(entry.content);
38273909 newContent += `${entry.content}\n`;
38283910
38293911 if ((textToScanTokens + (await getTokenCountAsync(newContent))) >= budget) {
3830- console.debug('WI budget reached, stopping');
38313912 if (world_info_overflow_alert) {
3832- console.log('Alerting');
3913+ console.warn(`[WI] budget of ${budget} reached, stopping after ${allActivatedEntries.size} entries`);
38333914 toastr.warning(`World info budget reached after ${allActivatedEntries.size} entries.`, 'World Info');
3915+ } else {
3916+ console.debug(`[WI] budget of ${budget} reached, stopping after ${allActivatedEntries.size} entries`);
38343917 }
3835- scanState = scan_state.NONE;
38363918 token_budget_overflowed = true;
38373919 break;
38383920 }
38393921
38403922 allActivatedEntries.add(entry);
38413923 console.debug('`[WI] Entry ${entry.uid} activated:'activation successful, adding to prompt`, entry);
38423924 }
38433925
38443926 const probabilityChecksAftersuccessfulNewEntries = newEntries.filter(x => !failedProbabilityChecks.sizehas(x));
3927+ const successfulNewEntriesForRecursion = successfulNewEntries.filter(x => !x.preventRecursion);
38453928
3846- if ((probabilityChecksAfter - probabilityChecksBefore) === activatedNow.size) {
3929+ if (!newEntries.length) {
38473930 console.debug('[WI probability checks] failedNo fornew allentries activated entries, stopping');
3848- scanState = scan_state.NONE;
3931+ } else if (!successfulNewEntries.length) {
3932+ console.debug('[WI] Probability checks failed for all activated entries, stopping');
3933+ } else {
3934+ console.debug(`[WI] Successfully activated ${successfulNewEntries.length} new entries to prompt. ${allActivatedEntries.size} total entries activated.`, successfulNewEntries);
38493935 }
38503936
3851- if (newEntries.length === 0) {
3937+ // After processing and rolling entries is done, see if we should continue with normal recursion
3852- console.debug('No new entries activated, stopping');
3938+ if (world_info_recursive && !token_budget_overflowed && successfulNewEntriesForRecursion.length) {
38533939 scanStatenextScanState = scan_state.NONERECURSION;
38543940 }
38553941
3856- if (scanState) {
3942+ // If we are inside min activations scan, and we have recursive buffer, we should do a recursive scan before increasing the buffer again
3857- const text = newEntries
3943+ // There might be recurse-trigger-able entries that match the buffer, so we need to check that
3858- .filter(x => !failedProbabilityChecks.has(x))
3944+ if (world_info_recursive && !token_budget_overflowed && scanState === scan_state.MIN_ACTIVATIONS && buffer.hasRecurse()) {
3859- .filter(x => !x.preventRecursion)
3945+ nextScanState = scan_state.RECURSION;
3860- .map(x => x.content).join('\n');
3861- buffer.addRecurse(text);
3862- allActivatedText = (text + '\n' + allActivatedText);
38633946 }
38643947
3865- // world_info_min_activations
3948+ // If scanning is planned to stop, but min activations is set and not satisfied, check if we should continue
3866- if (!scanState && !token_budget_overflowed) {
3949+ const minActivationsNotSatisfied = world_info_min_activations > 0 && (allActivatedEntries.size < world_info_min_activations);
38673950 if (world_info_min_activations > 0!nextScanState && (allActivatedEntries.size!token_budget_overflowed <&& world_info_min_activations)minActivationsNotSatisfied) {
3951+ console.debug('[WI] --- MIN ACTIVATIONS CHECK ---');
3952+
38683953 let over_max = (
38693954 world_info_min_activations_depth_max > 0 &&
38703955 buffer.getDepth() > world_info_min_activations_depth_max
38713956 ) || (buffer.getDepth() > chat.length);
38723957
38733958 if (!over_max) {
3874- scanState = scan_state.MIN_ACTIVATIONS; // loop
3959+ console.debug(`[WI] Min activations not reached (${allActivatedEntries.size}/${world_info_min_activations}), advancing depth to ${buffer.getDepth() + 1} and checking again`);
3875- buffer.advanceScanPosition();
3960+ nextScanState = scan_state.MIN_ACTIVATIONS; // loop
3961+ buffer.advanceScan();
3962+ } else {
3963+ console.debug(`[WI] Min activations not reached (${allActivatedEntries.size}/${world_info_min_activations}), but reached on of depth. Stopping`);
38763964 }
38773965 }
3966+
3967+ // Final check if we should really continue scan, and extend the current WI recurse buffer
3968+ scanState = nextScanState;
3969+ if (scanState) {
3970+ const text = successfulNewEntriesForRecursion
3971+ .map(x => x.content).join('\n');
3972+ buffer.addRecurse(text);
3973+ allActivatedText = (text + '\n' + allActivatedText);
38783974 }
38793975 }
38803976
3977+ console.debug('[WI] --- BUILDING PROMPT ---');
3978+
38813979 // Forward-sorted list of entries for joining
38823980 const WIBeforeEntries = [];
38833981 const WIAfterEntries = [];
@@ -3893,7 +3991,7 @@ async function checkWorldInfo(chat, maxContext, isDryRun) {
38933991 const content = getRegexedString(entry.content, regex_placement.WORLD_INFO, { depth: regexDepth, isMarkdown: false, isPrompt: true });
38943992
38953993 if (!content) {
38963994 console.debug('Skipping adding `[WI] Entry ${entry.uid}`, 'skipped adding to prompt due to empty content:', entry);
38973995 return;
38983996 }
38993997
@@ -3951,6 +4049,9 @@ async function checkWorldInfo(chat, maxContext, isDryRun) {
39514049 buffer.resetExternalEffects();
39524050 timedEffects.cleanUp();
39534051
4052+ console.log(`[WI] Adding ${allActivatedEntries.size} entries to prompt`, Array.from(allActivatedEntries));
4053+ console.debug('[WI] --- DONE ---');
4054+
39544055 return { worldInfoBefore, worldInfoAfter, EMEntries, WIDepthEntries, allActivatedEntries };
39554056}
39564057
@@ -3965,13 +4066,13 @@ function filterGroupsByScoring(groups, buffer, removeEntry, scanState) {
39654066 for (const [key, group] of Object.entries(groups)) {
39664067 // Group scoring is disabled both globally and for the group entries
39674068 if (!world_info_use_group_scoring && !group.some(x => x.useGroupScoring)) {
39684069 console.debug(`[WI] Skipping group scoring for group '${key}'`);
39694070 continue;
39704071 }
39714072
39724073 const scores = group.map(entry => buffer.getScore(entry, scanState));
39734074 const maxScore = Math.max(...scores);
39744075 console.debug(`[WI] Group '${key}' max score:`, ${maxScore}`);
39754076 //console.table(group.map((entry, i) => ({ uid: entry.uid, key: JSON.stringify(entry.key), score: scores[i] })));
39764077
39774078 for (let i = 0; i < group.length; i++) {
@@ -3982,7 +4083,7 @@ function filterGroupsByScoring(groups, buffer, removeEntry, scanState) {
39824083 }
39834084
39844085 if (scores[i] < maxScore) {
39854086 console.debug(`Removing[WI] Entry ${group[i].uid}`, `removed as score loser from inclusion group '${key}' entry '${group[i].uid}'`, group[i]);
39864087 removeEntry(group[i]);
39874088 group.splice(i, 1);
39884089 scores.splice(i, 1);
@@ -4000,7 +4101,8 @@ function filterGroupsByScoring(groups, buffer, removeEntry, scanState) {
40004101 * @param {number} scanState The current scan state
40014102 */
40024103function filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanState) {
40034104 console.debug('[WI] --- INCLUSION GROUP CHECKS BEGIN ---');
4105+
40044106 const grouped = newEntries.filter(x => x.group).reduce((acc, item) => {
40054107 item.group.split(/,\s*/).filter(x => x).forEach(group => {
40064108 if (!acc[group]) {
@@ -4012,7 +4114,7 @@ function filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanSt
40124114 }, {});
40134115
40144116 if (Object.keys(grouped).length === 0) {
40154117 console.debug('[WI] No inclusion groups found');
40164118 return;
40174119 }
40184120
@@ -4023,7 +4125,7 @@ function filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanSt
40234125 continue;
40244126 }
40254127
40264128 if (logging) console.debug(`Removing[WI] Entry ${entry.uid}`, `removed as loser from inclusion group '${entry.group}' entry '${entry.uid}'`, entry);
40274129 removeEntry(entry);
40284130 }
40294131 }
@@ -4031,24 +4133,24 @@ function filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanSt
40314133 filterGroupsByScoring(grouped, buffer, removeEntry, scanState);
40324134
40334135 for (const [key, group] of Object.entries(grouped)) {
40344136 console.debug(`[WI] Checking inclusion group '${key}' with ${group.length} entries`, group);
40354137
40364138 if (Array.from(allActivatedEntries).some(x => x.group === key)) {
40374139 console.debug(`[WI] Skipping inclusion group check, group already activated '${key}' was already activated`);
40384140 // We need to forcefully deactivate all other entries in the group
40394141 removeAllBut(group, null, false);
40404142 continue;
40414143 }
40424144
40434145 if (!Array.isArray(group) || group.length <= 1) {
40444146 console.debug('[WI] Skipping inclusion group check, only one entry');
40454147 continue;
40464148 }
40474149
40484150 // Check for group prio
40494151 const prios = group.filter(x => x.groupOverride).sort(sortFn);
40504152 if (prios.length) {
40514153 console.debug(`Activated inclusion[WI] groupEntry '${keyprios[0].uid}'`, with`activated byas prio winner entryfrom inclusion group '${prios[0].uidkey}'`, prios[0]);
40524154 removeAllBut(group, prios[0]);
40534155 continue;
40544156 }
@@ -4063,14 +4165,14 @@ function filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanSt
40634165 currentWeight += (entry.groupWeight ?? DEFAULT_WEIGHT);
40644166
40654167 if (rollValue <= currentWeight) {
40664168 console.debug(`Activated inclusion[WI] groupEntry '${keyentry.uid}'`, with`activated as roll winner entryfrom inclusion group '${entry.uidkey}'`, entry);
40674169 winner = entry;
40684170 break;
40694171 }
40704172 }
40714173
40724174 if (!winner) {
40734175 console.debug(`[WI] Failed to activate inclusion group '${key}', no winner found`);
40744176 continue;
40754177 }
40764178
@@ -4401,8 +4503,9 @@ function onWorldInfoChange(args, text) {
44014503 $('#world_info').val(null).trigger('change');
44024504 }
44034505 } else { //if it's a pointer selection
44044506 letconst tempWorldInfo = [];
4405- let selectedWorlds = $('#world_info').val().map((e) => Number(e)).filter((e) => !isNaN(e));
4507+ const val = $('#world_info').val();
4508+ const selectedWorlds = (Array.isArray(val) ? val : [val]).map((e) => Number(e)).filter((e) => !isNaN(e));
44064509 if (selectedWorlds.length > 0) {
44074510 selectedWorlds.forEach((worldIndex) => {
44084511 const existingWorldName = world_names[worldIndex];
public/style.css+2 -0
@@ -3910,6 +3910,8 @@ input[type="range"]::-webkit-slider-thumb {
39103910 outline: none;
39113911 background-color: var(--black50a);
39123912 line-height: calc(var(--mainFontSize) + .25rem);
3913+ max-height: 75vh;
3914+ max-height: 75dvh;
39133915}
39143916
39153917#anchor_order {