Merge staging
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 1.68, | 2 | "temp": 1.68, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.17, | 4 | "top_p": 0.17, |
| 4 | "top_k": 77, | 5 | "top_k": 77, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0.42, | 6 | "top_a": 0.42, |
| 7 | "tfs": 0.97, | 7 | "tfs": 0.97, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.02, | 12 | "rep_pen": 1.02, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 0.7, | 2 | "temp": 0.7, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.92, | 4 | "top_p": 0.92, |
| 4 | "top_k": 150, | 5 | "top_k": 150, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "rep_pen": 4.5, | 10 | "typical_p": 1, |
| 11 | "min_p": 0, | ||
| 12 | "rep_pen": 3, | ||
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 2, | 16 | "no_repeat_ngram_size": 2, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 10, | 18 | "num_beams": 10, |
| 15 | "length_penalty": 1.4, | 19 | "length_penalty": 1.4, |
| 16 | "min_length": 200, | 20 | "min_length": 200, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": true, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 0.87, | 2 | "temp": 0.87, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.99, | 4 | "top_p": 0.99, |
| 4 | "top_k": 85, | 5 | "top_k": 85, |
| 5 | "typical_p": 0.68, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 0.68, | 7 | "tfs": 0.68, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 0.68, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.01, | 12 | "rep_pen": 1.01, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 1, | 2 | "temp": 1, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 1, | 4 | "top_p": 1, |
| 4 | "top_k": 4, | 5 | "top_k": 4, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1, | 12 | "rep_pen": 1, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0.6, | 17 | "penalty_alpha": 0.6, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": false, | 25 | "do_sample": false, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 0.7, | 2 | "temp": 0.7, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.5, | 4 | "top_p": 0.5, |
| 4 | "top_k": 40, | 5 | "top_k": 40, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.2, | 12 | "rep_pen": 1.2, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 0, | 2 | "temp": 0, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0, | 4 | "top_p": 0, |
| 4 | "top_k": 1, | 5 | "top_k": 1, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.18, | 12 | "rep_pen": 1.18, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": false, | 25 | "do_sample": false, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 1.31, | 2 | "temp": 1.31, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.14, | 4 | "top_p": 0.14, |
| 4 | "top_k": 49, | 5 | "top_k": 49, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0.52, | 6 | "top_a": 0.52, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 1.49, | 8 | "epsilon_cutoff": 1.49, |
| 9 | "eta_cutoff": 10.42, | 9 | "eta_cutoff": 10.42, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.17, | 12 | "rep_pen": 1.17, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 0.7, | 2 | "temp": 0.7, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.5, | 4 | "top_p": 0.5, |
| 4 | "top_k": 0, | 5 | "top_k": 0, |
| 5 | "typical_p": 0.19, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 0.19, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.1, | 12 | "rep_pen": 1.1, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 0.66, | 2 | "temp": 0.66, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 1, | 4 | "top_p": 1, |
| 4 | "top_k": 0, | 5 | "top_k": 0, |
| 5 | "typical_p": 0.6, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 0.6, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.1, | 12 | "rep_pen": 1.1, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 0.7, | 2 | "temp": 0.7, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.1, | 4 | "top_p": 0.1, |
| 4 | "top_k": 40, | 5 | "top_k": 40, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.18, | 12 | "rep_pen": 1.18, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 200, | 20 | "min_length": 200, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 0.98, | 2 | "temp": 0.98, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.37, | 4 | "top_p": 0.37, |
| 4 | "top_k": 100, | 5 | "top_k": 100, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.18, | 12 | "rep_pen": 1.18, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,24 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 1.06, | 2 | "temp": 1.06, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 1, | 4 | "top_p": 1, |
| 4 | "top_k": 0, | 5 | "top_k": 0, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1, | 12 | "rep_pen": 1, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 2, | 41 | "mirostat_mode": 2, |
| 21 | "mirostat_tau": 9.61, | 42 | "mirostat_tau": 9.61, |
| 22 | "mirostat_eta": 1, | 43 | "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": [], | ||
| 23 | "rep_pen_size": 0 | 84 | "rep_pen_size": 0 |
| 24 | } | 85 | } |
| @@ -1,24 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 1.17, | 2 | "temp": 1.17, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 1, | 4 | "top_p": 1, |
| 4 | "top_k": 0, | 5 | "top_k": 0, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1, | 12 | "rep_pen": 1, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 2, | 41 | "mirostat_mode": 2, |
| 21 | "mirostat_tau": 9.91, | 42 | "mirostat_tau": 9.91, |
| 22 | "mirostat_eta": 1, | 43 | "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": [], | ||
| 23 | "rep_pen_size": 0 | 84 | "rep_pen_size": 0 |
| 24 | } | 85 | } |
| @@ -1,24 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 1.17, | 2 | "temp": 1.17, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 1, | 4 | "top_p": 1, |
| 4 | "top_k": 0, | 5 | "top_k": 0, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1, | 12 | "rep_pen": 1, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 2, | 41 | "mirostat_mode": 2, |
| 21 | "mirostat_tau": 9.62, | 42 | "mirostat_tau": 9.62, |
| 22 | "mirostat_eta": 1, | 43 | "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": [], | ||
| 23 | "rep_pen_size": 0 | 84 | "rep_pen_size": 0 |
| 24 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 1, | 2 | "temp": 1, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 1, | 4 | "top_p": 1, |
| 4 | "top_k": 0, | 5 | "top_k": 0, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1, | 12 | "rep_pen": 1, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 2, | 41 | "mirostat_mode": 2, |
| 21 | "mirostat_tau": 8, | 42 | "mirostat_tau": 8, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 0.7, | 2 | "temp": 0.7, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.85, | 4 | "top_p": 0.85, |
| 4 | "top_k": 50, | 5 | "top_k": 50, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1, | 12 | "rep_pen": 1, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 0.8, | 2 | "temp": 0.8, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.9, | 4 | "top_p": 0.9, |
| 4 | "top_k": 100, | 5 | "top_k": 100, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.15, | 12 | "rep_pen": 1.15, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 1.99, | 2 | "temp": 1.99, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 1, | 4 | "top_p": 1, |
| 4 | "top_k": 100, | 5 | "top_k": 100, |
| 5 | "typical_p": 0.97, | ||
| 6 | "rep_pen": 1, | ||
| 7 | "top_a": 0, | 6 | "top_a": 0, |
| 8 | "tfs": 1, | 7 | "tfs": 1, |
| 9 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 10 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 0.97, | ||
| 11 | "min_p": 0, | ||
| 12 | "rep_pen": 1, | ||
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 0.63, | 2 | "temp": 0.63, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.98, | 4 | "top_p": 0.98, |
| 4 | "top_k": 0, | 5 | "top_k": 0, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.05, | 12 | "rep_pen": 1.05, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 1.99, | 2 | "temp": 1.99, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.85, | 4 | "top_p": 0.85, |
| 4 | "top_k": 12, | 5 | "top_k": 12, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.15, | 12 | "rep_pen": 1.15, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 1.07, | 2 | "temp": 1.07, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 1, | 4 | "top_p": 1, |
| 4 | "top_k": 100, | 5 | "top_k": 100, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.05, | 12 | "rep_pen": 1.05, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 0.44, | 2 | "temp": 0.44, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 1, | 4 | "top_p": 1, |
| 4 | "top_k": 0, | 5 | "top_k": 0, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.15, | 12 | "rep_pen": 1.15, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 1.99, | 2 | "temp": 1.99, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.18, | 4 | "top_p": 0.18, |
| 4 | "top_k": 30, | 5 | "top_k": 30, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.15, | 12 | "rep_pen": 1.15, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 0.72, | 2 | "temp": 0.72, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.73, | 4 | "top_p": 0.73, |
| 4 | "top_k": 0, | 5 | "top_k": 0, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.1, | 12 | "rep_pen": 1.1, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 1.53, | 2 | "temp": 1.53, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.64, | 4 | "top_p": 0.64, |
| 4 | "top_k": 33, | 5 | "top_k": 33, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0.04, | 6 | "top_a": 0.04, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.07, | 12 | "rep_pen": 1.07, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 0.7, | 2 | "temp": 0.7, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.9, | 4 | "top_p": 0.9, |
| 4 | "top_k": 20, | 5 | "top_k": 20, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.15, | 12 | "rep_pen": 1.15, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 1.31, | 2 | "temp": 1.31, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.29, | 4 | "top_p": 0.29, |
| 4 | "top_k": 72, | 5 | "top_k": 72, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.09, | 12 | "rep_pen": 1.09, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 0.02, | 2 | "temp": 0.02, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.95, | 4 | "top_p": 0.95, |
| 4 | "top_k": 50, | 5 | "top_k": 50, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1, | 12 | "rep_pen": 1, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 0.7, | 2 | "temp": 0.7, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 1, | 4 | "top_p": 1, |
| 4 | "top_k": 0, | 5 | "top_k": 0, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0.2, | 6 | "top_a": 0.2, |
| 7 | "tfs": 0.95, | 7 | "tfs": 0.95, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.15, | 12 | "rep_pen": 1.15, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 1.01, | 2 | "temp": 1.01, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.21, | 4 | "top_p": 0.21, |
| 4 | "top_k": 91, | 5 | "top_k": 91, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0.75, | 6 | "top_a": 0.75, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 10.78, | 9 | "eta_cutoff": 10.78, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.21, | 12 | "rep_pen": 1.21, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1.07, | 21 | "encoder_rep_pen": 1.07, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -11,6 +11,8 @@ | |||
| 11 | "min_p": 0.1, | 11 | "min_p": 0.1, |
| 12 | "rep_pen": 1, | 12 | "rep_pen": 1, |
| 13 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 14 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 15 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 16 | "num_beams": 1, | 18 | "num_beams": 1, |
| @@ -19,24 +21,56 @@ | |||
| 19 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 20 | "freq_pen": 0, | 22 | "freq_pen": 0, |
| 21 | "presence_pen": 0, | 23 | "presence_pen": 0, |
| 24 | "skew": 0, | ||
| 22 | "do_sample": true, | 25 | "do_sample": true, |
| 23 | "early_stopping": false, | 26 | "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, | ||
| 24 | "add_bos_token": true, | 38 | "add_bos_token": true, |
| 25 | "truncation_length": 2048, | ||
| 26 | "ban_eos_token": false, | 39 | "ban_eos_token": false, |
| 27 | "skip_special_tokens": true, | 40 | "skip_special_tokens": true, |
| 28 | "streaming": true, | ||
| 29 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 30 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 31 | "mirostat_eta": 0.1, | 43 | "mirostat_eta": 0.1, |
| 32 | "guidance_scale": 1, | 44 | "guidance_scale": 1, |
| 33 | "negative_prompt": "", | 45 | "negative_prompt": "", |
| 34 | "grammar_string": "", | 46 | "grammar_string": "", |
| 47 | "json_schema": {}, | ||
| 35 | "banned_tokens": "", | 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 | ], | ||
| 36 | "ignore_eos_token": false, | 71 | "ignore_eos_token": false, |
| 37 | "spaces_between_special_tokens": true, | 72 | "spaces_between_special_tokens": true, |
| 38 | "type": "ooba", | 73 | "speculative_ngram": false, |
| 39 | "legacy_api": false, | ||
| 40 | "sampler_order": [ | 74 | "sampler_order": [ |
| 41 | 5, | 75 | 5, |
| 42 | 6, | 76 | 6, |
| @@ -46,5 +80,6 @@ | |||
| 46 | 3, | 80 | 3, |
| 47 | 4 | 81 | 4 |
| 48 | ], | 82 | ], |
| 83 | "logit_bias": [], | ||
| 49 | "rep_pen_size": 0 | 84 | "rep_pen_size": 0 |
| 50 | } | 85 | } |
| @@ -11,6 +11,8 @@ | |||
| 11 | "min_p": 0.1, | 11 | "min_p": 0.1, |
| 12 | "rep_pen": 1, | 12 | "rep_pen": 1, |
| 13 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 14 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 15 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 16 | "num_beams": 1, | 18 | "num_beams": 1, |
| @@ -19,24 +21,56 @@ | |||
| 19 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 20 | "freq_pen": 0, | 22 | "freq_pen": 0, |
| 21 | "presence_pen": 0, | 23 | "presence_pen": 0, |
| 24 | "skew": 0, | ||
| 22 | "do_sample": true, | 25 | "do_sample": true, |
| 23 | "early_stopping": false, | 26 | "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, | ||
| 24 | "add_bos_token": true, | 38 | "add_bos_token": true, |
| 25 | "truncation_length": 2048, | ||
| 26 | "ban_eos_token": false, | 39 | "ban_eos_token": false, |
| 27 | "skip_special_tokens": true, | 40 | "skip_special_tokens": true, |
| 28 | "streaming": true, | ||
| 29 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 30 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 31 | "mirostat_eta": 0.1, | 43 | "mirostat_eta": 0.1, |
| 32 | "guidance_scale": 1, | 44 | "guidance_scale": 1, |
| 33 | "negative_prompt": "", | 45 | "negative_prompt": "", |
| 34 | "grammar_string": "", | 46 | "grammar_string": "", |
| 47 | "json_schema": {}, | ||
| 35 | "banned_tokens": "", | 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 | ], | ||
| 36 | "ignore_eos_token": false, | 71 | "ignore_eos_token": false, |
| 37 | "spaces_between_special_tokens": true, | 72 | "spaces_between_special_tokens": true, |
| 38 | "type": "ooba", | 73 | "speculative_ngram": false, |
| 39 | "legacy_api": false, | ||
| 40 | "sampler_order": [ | 74 | "sampler_order": [ |
| 41 | 5, | 75 | 5, |
| 42 | 6, | 76 | 6, |
| @@ -46,5 +80,6 @@ | |||
| 46 | 3, | 80 | 3, |
| 47 | 4 | 81 | 4 |
| 48 | ], | 82 | ], |
| 83 | "logit_bias": [], | ||
| 49 | "rep_pen_size": 0 | 84 | "rep_pen_size": 0 |
| 50 | } | 85 | } |
| @@ -11,6 +11,8 @@ | |||
| 11 | "min_p": 0.1, | 11 | "min_p": 0.1, |
| 12 | "rep_pen": 1, | 12 | "rep_pen": 1, |
| 13 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 14 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 15 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 16 | "num_beams": 1, | 18 | "num_beams": 1, |
| @@ -19,24 +21,56 @@ | |||
| 19 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 20 | "freq_pen": 0, | 22 | "freq_pen": 0, |
| 21 | "presence_pen": 0, | 23 | "presence_pen": 0, |
| 24 | "skew": 0, | ||
| 22 | "do_sample": true, | 25 | "do_sample": true, |
| 23 | "early_stopping": false, | 26 | "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, | ||
| 24 | "add_bos_token": true, | 38 | "add_bos_token": true, |
| 25 | "truncation_length": 2048, | ||
| 26 | "ban_eos_token": false, | 39 | "ban_eos_token": false, |
| 27 | "skip_special_tokens": true, | 40 | "skip_special_tokens": true, |
| 28 | "streaming": true, | ||
| 29 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 30 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 31 | "mirostat_eta": 0.1, | 43 | "mirostat_eta": 0.1, |
| 32 | "guidance_scale": 1, | 44 | "guidance_scale": 1, |
| 33 | "negative_prompt": "", | 45 | "negative_prompt": "", |
| 34 | "grammar_string": "", | 46 | "grammar_string": "", |
| 47 | "json_schema": {}, | ||
| 35 | "banned_tokens": "", | 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 | ], | ||
| 36 | "ignore_eos_token": false, | 71 | "ignore_eos_token": false, |
| 37 | "spaces_between_special_tokens": true, | 72 | "spaces_between_special_tokens": true, |
| 38 | "type": "ooba", | 73 | "speculative_ngram": false, |
| 39 | "legacy_api": false, | ||
| 40 | "sampler_order": [ | 74 | "sampler_order": [ |
| 41 | 5, | 75 | 5, |
| 42 | 6, | 76 | 6, |
| @@ -46,5 +80,6 @@ | |||
| 46 | 3, | 80 | 3, |
| 47 | 4 | 81 | 4 |
| 48 | ], | 82 | ], |
| 83 | "logit_bias": [], | ||
| 49 | "rep_pen_size": 0 | 84 | "rep_pen_size": 0 |
| 50 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 0.82, | 2 | "temp": 0.82, |
| 3 | "temperature_last": true, | ||
| 3 | "top_p": 0.21, | 4 | "top_p": 0.21, |
| 4 | "top_k": 72, | 5 | "top_k": 72, |
| 5 | "typical_p": 1, | ||
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "typical_p": 1, | ||
| 11 | "min_p": 0, | ||
| 10 | "rep_pen": 1.19, | 12 | "rep_pen": 1.19, |
| 11 | "rep_pen_range": 0, | 13 | "rep_pen_range": 0, |
| 14 | "rep_pen_decay": 0, | ||
| 15 | "rep_pen_slope": 1, | ||
| 12 | "no_repeat_ngram_size": 0, | 16 | "no_repeat_ngram_size": 0, |
| 13 | "penalty_alpha": 0, | 17 | "penalty_alpha": 0, |
| 14 | "num_beams": 1, | 18 | "num_beams": 1, |
| 15 | "length_penalty": 1, | 19 | "length_penalty": 1, |
| 16 | "min_length": 0, | 20 | "min_length": 0, |
| 17 | "encoder_rep_pen": 1, | 21 | "encoder_rep_pen": 1, |
| 22 | "freq_pen": 0, | ||
| 23 | "presence_pen": 0, | ||
| 24 | "skew": 0, | ||
| 18 | "do_sample": true, | 25 | "do_sample": true, |
| 19 | "early_stopping": false, | 26 | "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, | ||
| 20 | "mirostat_mode": 0, | 41 | "mirostat_mode": 0, |
| 21 | "mirostat_tau": 5, | 42 | "mirostat_tau": 5, |
| 22 | "mirostat_eta": 0.1 | 43 | "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 | ||
| 23 | } | 85 | } |
| @@ -1,23 +1,85 @@ | |||
| 1 | { | 1 | { |
| 2 | "temp": 0.65, | 2 | "temp": 0.65, |
| 3 | "top_p": 0.47, | 3 | "temperature_last": true, |
| 4 | "top_k": 42, | 4 | "top_p": 0.47, |
| 5 | "typical_p": 1, | 5 | "top_k": 42, |
| 6 | "top_a": 0, | 6 | "top_a": 0, |
| 7 | "tfs": 1, | 7 | "tfs": 1, |
| 8 | "epsilon_cutoff": 0, | 8 | "epsilon_cutoff": 0, |
| 9 | "eta_cutoff": 0, | 9 | "eta_cutoff": 0, |
| 10 | "rep_pen": 1.18, | 10 | "typical_p": 1, |
| 11 | "rep_pen_range": 0, | 11 | "min_p": 0, |
| 12 | "no_repeat_ngram_size": 0, | 12 | "rep_pen": 1.18, |
| 13 | "penalty_alpha": 0, | 13 | "rep_pen_range": 0, |
| 14 | "num_beams": 1, | 14 | "rep_pen_decay": 0, |
| 15 | "length_penalty": 1, | 15 | "rep_pen_slope": 1, |
| 16 | "min_length": 0, | 16 | "no_repeat_ngram_size": 0, |
| 17 | "encoder_rep_pen": 1, | 17 | "penalty_alpha": 0, |
| 18 | "do_sample": true, | 18 | "num_beams": 1, |
| 19 | "early_stopping": false, | 19 | "length_penalty": 1, |
| 20 | "mirostat_mode": 0, | 20 | "min_length": 0, |
| 21 | "mirostat_tau": 5, | 21 | "encoder_rep_pen": 1, |
| 22 | "mirostat_eta": 0.1 | 22 | "freq_pen": 0, |
| 23 | } | 23 | "presence_pen": 0, |
| 24 | "skew": 0, | ||
| 25 | "do_sample": true, | ||
| 26 | "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, | ||
| 41 | "mirostat_mode": 0, | ||
| 42 | "mirostat_tau": 5, | ||
| 43 | "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 | ||
| 85 | } | ||
| @@ -44,7 +44,6 @@ | |||
| 44 | "preset": "Default", | 44 | "preset": "Default", |
| 45 | "add_bos_token": true, | 45 | "add_bos_token": true, |
| 46 | "stopping_strings": [], | 46 | "stopping_strings": [], |
| 47 | "truncation_length": 2048, | ||
| 48 | "ban_eos_token": false, | 47 | "ban_eos_token": false, |
| 49 | "skip_special_tokens": true, | 48 | "skip_special_tokens": true, |
| 50 | "streaming": false, | 49 | "streaming": false, |
| @@ -1292,7 +1292,7 @@ | |||
| 1292 | </div> | 1292 | </div> |
| 1293 | </div> | 1293 | </div> |
| 1294 | <!-- Enable for llama.cpp when the PR is merged: https://github.com/ggerganov/llama.cpp/pull/6839 --> | 1294 | <!-- Enable for llama.cpp when the PR is merged: https://github.com/ggerganov/llama.cpp/pull/6839 --> |
| 1295 | <div data-newbie-hidden data-tg-type="ooba" id="dryBlock" class="wide100p"> | 1295 | <div data-newbie-hidden data-tg-type="ooba, koboldcpp" id="dryBlock" class="wide100p"> |
| 1296 | <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"> | 1296 | <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"> |
| 1297 | <label data-i18n="DRY Repetition Penalty">DRY Repetition Penalty</label> | 1297 | <label data-i18n="DRY Repetition Penalty">DRY Repetition Penalty</label> |
| 1298 | <a href="https://github.com/oobabooga/text-generation-webui/pull/5677" target="_blank"> | 1298 | <a href="https://github.com/oobabooga/text-generation-webui/pull/5677" target="_blank"> |
| @@ -1315,7 +1315,7 @@ | |||
| 1315 | <input class="neo-range-slider" type="range" id="dry_allowed_length_textgenerationwebui" min="1" max="20" step="1" /> | 1315 | <input class="neo-range-slider" type="range" id="dry_allowed_length_textgenerationwebui" min="1" max="20" step="1" /> |
| 1316 | <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"> | 1316 | <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"> |
| 1317 | </div> | 1317 | </div> |
| 1318 | <div class="alignItemsCenter flex-container flexFlowColumn flexBasis48p flexGrow flexShrink gap0" data-tg-type="llamacpp"> | 1318 | <div class="alignItemsCenter flex-container flexFlowColumn flexBasis48p flexGrow flexShrink gap0" data-tg-type="llamacpp, koboldcpp"> |
| 1319 | <small data-i18n="Penalty Range">Penalty Range</small> | 1319 | <small data-i18n="Penalty Range">Penalty Range</small> |
| 1320 | <input class="neo-range-slider" type="range" id="dry_penalty_last_n_textgenerationwebui" min="0" max="8192" step="1" /> | 1320 | <input class="neo-range-slider" type="range" id="dry_penalty_last_n_textgenerationwebui" min="0" max="8192" step="1" /> |
| 1321 | <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"> | 1321 | <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 @@ | |||
| 5123 | </div> | 5123 | </div> |
| 5124 | </div> | 5124 | </div> |
| 5125 | <!-- templates for JS to reuse when needed --> | 5125 | <!-- 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> | ||
| 5143 | <div id="chat_world_template" class="template_element"> | 5126 | <div id="chat_world_template" class="template_element"> |
| 5144 | <div class="chat_world range-block flexFlowColumn flex-container"> | 5127 | <div class="chat_world range-block flexFlowColumn flex-container"> |
| 5145 | <div class="range-block-title"> | 5128 | <div class="range-block-title"> |
| @@ -101,6 +101,7 @@ import { | |||
| 101 | proxies, | 101 | proxies, |
| 102 | loadProxyPresets, | 102 | loadProxyPresets, |
| 103 | selected_proxy, | 103 | selected_proxy, |
| 104 | initOpenai, | ||
| 104 | } from './scripts/openai.js'; | 105 | } from './scripts/openai.js'; |
| 105 | 106 | ||
| 106 | import { | 107 | import { |
| @@ -155,7 +156,6 @@ import { | |||
| 155 | ensureImageFormatSupported, | 156 | ensureImageFormatSupported, |
| 156 | flashHighlight, | 157 | flashHighlight, |
| 157 | isTrueBoolean, | 158 | isTrueBoolean, |
| 158 | debouncedThrottle, | ||
| 159 | } from './scripts/utils.js'; | 159 | } from './scripts/utils.js'; |
| 160 | import { debounce_timeout } from './scripts/constants.js'; | 160 | import { debounce_timeout } from './scripts/constants.js'; |
| 161 | 161 | ||
| @@ -915,6 +915,7 @@ async function firstLoadInit() { | |||
| 915 | initKeyboard(); | 915 | initKeyboard(); |
| 916 | initDynamicStyles(); | 916 | initDynamicStyles(); |
| 917 | initTags(); | 917 | initTags(); |
| 918 | initOpenai(); | ||
| 918 | await getUserAvatars(true, user_avatar); | 919 | await getUserAvatars(true, user_avatar); |
| 919 | await getCharacters(); | 920 | await getCharacters(); |
| 920 | await getBackgrounds(); | 921 | await getBackgrounds(); |
| @@ -7183,20 +7184,23 @@ function updateFavButtonState(state) { | |||
| 7183 | $('#favorite_button').toggleClass('fav_off', !fav_ch_checked); | 7184 | $('#favorite_button').toggleClass('fav_off', !fav_ch_checked); |
| 7184 | } | 7185 | } |
| 7185 | 7186 | ||
| 7186 | export function setScenarioOverride() { | 7187 | export async function setScenarioOverride() { |
| 7187 | if (!selected_group && !this_chid) { | 7188 | if (!selected_group && !this_chid) { |
| 7188 | console.warn('setScenarioOverride() -- no selected group or character'); | 7189 | console.warn('setScenarioOverride() -- no selected group or character'); |
| 7189 | return; | 7190 | return; |
| 7190 | } | 7191 | } |
| 7191 | 7192 | ||
| 7192 | const template = $('#scenario_override_template .scenario_override').clone(); | ||
| 7193 | const metadataValue = chat_metadata['scenario'] || ''; | 7193 | const metadataValue = chat_metadata['scenario'] || ''; |
| 7194 | const isGroup = !!selected_group; | 7194 | 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); |
| 7198 | template.find('.remove_scenario_override').on('click', onScenarioOverrideRemoveClick); | 7198 | $template.find('[data-character="true"]').toggle(!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, ''); | ||
| 7200 | } | 7204 | } |
| 7201 | 7205 | ||
| 7202 | function onScenarioOverrideInput() { | 7206 | function onScenarioOverrideInput() { |
| @@ -9125,10 +9129,6 @@ jQuery(async function () { | |||
| 9125 | $('#groupCurrentMemberListToggle .inline-drawer-icon').trigger('click'); | 9129 | $('#groupCurrentMemberListToggle .inline-drawer-icon').trigger('click'); |
| 9126 | }, 200); | 9130 | }, 200); |
| 9127 | 9131 | ||
| 9128 | $('#chat').on('wheel touchstart', () => { | ||
| 9129 | scrollLock = true; | ||
| 9130 | }); | ||
| 9131 | |||
| 9132 | $(document).on('click', '.api_loading', cancelStatusCheck); | 9132 | $(document).on('click', '.api_loading', cancelStatusCheck); |
| 9133 | 9133 | ||
| 9134 | //////////INPUT BAR FOCUS-KEEPING LOGIC///////////// | 9134 | //////////INPUT BAR FOCUS-KEEPING LOGIC///////////// |
| @@ -9233,23 +9233,32 @@ jQuery(async function () { | |||
| 9233 | */ | 9233 | */ |
| 9234 | function autoFitEditTextArea(e) { | 9234 | function autoFitEditTextArea(e) { |
| 9235 | scroll_holder = chatElement[0].scrollTop; | 9235 | scroll_holder = chatElement[0].scrollTop; |
| 9236 | e.style.height = '0'; | 9236 | e.style.height = '0px'; |
| 9237 | e.style.height = `${e.scrollHeight + 4}px`; | 9237 | const newHeight = e.scrollHeight + 4; |
| 9238 | e.style.height = `${newHeight}px`; | ||
| 9238 | is_use_scroll_holder = true; | 9239 | is_use_scroll_holder = true; |
| 9239 | } | 9240 | } |
| 9240 | const autoFitEditTextAreaDebounced = debouncedThrottle(autoFitEditTextArea, debounce_timeout.standard); | 9241 | const autoFitEditTextAreaDebounced = debounce(autoFitEditTextArea, debounce_timeout.short); |
| 9241 | document.addEventListener('input', e => { | 9242 | document.addEventListener('input', e => { |
| 9242 | if (e.target instanceof HTMLTextAreaElement && e.target.classList.contains('edit_textarea')) { | 9243 | if (e.target instanceof HTMLTextAreaElement && e.target.classList.contains('edit_textarea')) { |
| 9243 | const immediately = e.target.scrollHeight > e.target.offsetHeight || e.target.value === ''; | 9244 | const scrollbarShown = e.target.clientWidth < e.target.offsetWidth && e.target.offsetHeight >= window.innerHeight * 0.75; |
| 9245 | const immediately = (e.target.scrollHeight > e.target.offsetHeight && !scrollbarShown) || e.target.value === ''; | ||
| 9244 | immediately ? autoFitEditTextArea(e.target) : autoFitEditTextAreaDebounced(e.target); | 9246 | immediately ? autoFitEditTextArea(e.target) : autoFitEditTextAreaDebounced(e.target); |
| 9245 | } | 9247 | } |
| 9246 | }); | 9248 | }); |
| 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 () { | ||
| 9248 | if (is_use_scroll_holder) { | 9257 | if (is_use_scroll_holder) { |
| 9249 | this.scrollTop = scroll_holder; | 9258 | this.scrollTop = scroll_holder; |
| 9250 | is_use_scroll_holder = false; | 9259 | is_use_scroll_holder = false; |
| 9251 | } | 9260 | } |
| 9252 | }); | 9261 | }, { passive: true }); |
| 9253 | 9262 | ||
| 9254 | $(document).on('click', '.mes', function () { | 9263 | $(document).on('click', '.mes', function () { |
| 9255 | //when a 'delete message' parent div is clicked | 9264 | //when a 'delete message' parent div is clicked |
| @@ -9800,7 +9809,7 @@ jQuery(async function () { | |||
| 9800 | }); | 9809 | }); |
| 9801 | 9810 | ||
| 9802 | //confirms message deletion with the "ok" button | 9811 | //confirms message deletion with the "ok" button |
| 9803 | $('#dialogue_del_mes_ok').click(async function () { | 9812 | $('#dialogue_del_mes_ok').on('click', async function () { |
| 9804 | $('#dialogue_del_mes').css('display', 'none'); | 9813 | $('#dialogue_del_mes').css('display', 'none'); |
| 9805 | $('#send_form').css('display', css_send_form_display); | 9814 | $('#send_form').css('display', css_send_form_display); |
| 9806 | $('.del_checkbox').each(function () { | 9815 | $('.del_checkbox').each(function () { |
| @@ -9816,7 +9825,7 @@ jQuery(async function () { | |||
| 9816 | chat.length = this_del_mes; | 9825 | chat.length = this_del_mes; |
| 9817 | await saveChatConditional(); | 9826 | await saveChatConditional(); |
| 9818 | chatElement.scrollTop(chatElement[0].scrollHeight); | 9827 | chatElement.scrollTop(chatElement[0].scrollHeight); |
| 9819 | eventSource.emit(event_types.MESSAGE_DELETED, chat.length); | 9828 | await eventSource.emit(event_types.MESSAGE_DELETED, chat.length); |
| 9820 | $('#chat .mes').removeClass('last_mes'); | 9829 | $('#chat .mes').removeClass('last_mes'); |
| 9821 | $('#chat .mes').last().addClass('last_mes'); | 9830 | $('#chat .mes').last().addClass('last_mes'); |
| 9822 | } else { | 9831 | } else { |
| @@ -10647,7 +10656,7 @@ jQuery(async function () { | |||
| 10647 | openCharacterWorldPopup(); | 10656 | openCharacterWorldPopup(); |
| 10648 | break; | 10657 | break; |
| 10649 | case 'set_chat_scenario': | 10658 | case 'set_chat_scenario': |
| 10650 | setScenarioOverride(); | 10659 | await setScenarioOverride(); |
| 10651 | break; | 10660 | break; |
| 10652 | case 'renameCharButton': | 10661 | case 'renameCharButton': |
| 10653 | renameCharacter(); | 10662 | renameCharacter(); |
| @@ -10668,7 +10677,7 @@ jQuery(async function () { | |||
| 10668 | const source = getCharacterSource(this_chid); | 10677 | const source = getCharacterSource(this_chid); |
| 10669 | if (source && isValidUrl(source)) { | 10678 | if (source && isValidUrl(source)) { |
| 10670 | const url = new URL(source); | 10679 | const url = new URL(source); |
| 10671 | const confirm = await callPopup(`Open ${url.hostname} in a new tab?`, 'confirm'); | 10680 | const confirm = await Popup.show.confirm('Open Source', `<span>Do you want to open the link to ${url.hostname} in a new tab?</span><var>${url}</var>`); |
| 10672 | if (confirm) { | 10681 | if (confirm) { |
| 10673 | window.open(source, '_blank'); | 10682 | window.open(source, '_blank'); |
| 10674 | } | 10683 | } |
| @@ -10677,7 +10686,7 @@ jQuery(async function () { | |||
| 10677 | } | 10686 | } |
| 10678 | } break; | 10687 | } break; |
| 10679 | case 'replace_update': { | 10688 | case 'replace_update': { |
| 10680 | const confirm = await callPopup('<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.</p><p>Proceed?</p>', 'confirm', ''); | 10689 | const confirm = await Popup.show.confirm('Replace Character', '<p>Choose a new character card to replace this character with.</p>All chats, assets and group memberships will be preserved, but local changes to the character data will be lost.<br />Proceed?'); |
| 10681 | if (confirm) { | 10690 | if (confirm) { |
| 10682 | async function uploadReplacementCard(e) { | 10691 | async function uploadReplacementCard(e) { |
| 10683 | const file = e.target.files[0]; | 10692 | const file = e.target.files[0]; |
| @@ -696,18 +696,18 @@ const isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1; | |||
| 696 | function autoFitSendTextArea() { | 696 | function autoFitSendTextArea() { |
| 697 | const originalScrollBottom = chatBlock.scrollHeight - (chatBlock.scrollTop + chatBlock.offsetHeight); | 697 | const originalScrollBottom = chatBlock.scrollHeight - (chatBlock.scrollTop + chatBlock.offsetHeight); |
| 698 | if (Math.ceil(sendTextArea.scrollHeight + 3) >= Math.floor(sendTextArea.offsetHeight)) { | 698 | 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'); | ||
| 701 | sendTextArea.style.height = sendTextAreaMinHeight; | 700 | sendTextArea.style.height = sendTextAreaMinHeight; |
| 702 | } | 701 | } |
| 703 | sendTextArea.style.height = sendTextArea.scrollHeight + 3 + 'px'; | 702 | const newHeight = sendTextArea.scrollHeight + 3; |
| 703 | sendTextArea.style.height = `${newHeight}px`; | ||
| 704 | 704 | ||
| 705 | if (!isFirefox) { | 705 | if (!isFirefox) { |
| 706 | const newScrollTop = Math.round(chatBlock.scrollHeight - (chatBlock.offsetHeight + originalScrollBottom)); | 706 | const newScrollTop = Math.round(chatBlock.scrollHeight - (chatBlock.offsetHeight + originalScrollBottom)); |
| 707 | chatBlock.scrollTop = newScrollTop; | 707 | chatBlock.scrollTop = newScrollTop; |
| 708 | } | 708 | } |
| 709 | } | 709 | } |
| 710 | export const autoFitSendTextAreaDebounced = debounce(autoFitSendTextArea); | 710 | export const autoFitSendTextAreaDebounced = debounce(autoFitSendTextArea, debounce_timeout.short); |
| 711 | 711 | ||
| 712 | // --------------------------------------------------- | 712 | // --------------------------------------------------- |
| 713 | 713 | ||
| @@ -881,12 +881,14 @@ export function initRossMods() { | |||
| 881 | saveSettingsDebounced(); | 881 | saveSettingsDebounced(); |
| 882 | }); | 882 | }); |
| 883 | 883 | ||
| 884 | $(sendTextArea).on('input', () => { | 884 | sendTextArea.addEventListener('input', () => { |
| 885 | if (sendTextArea.scrollHeight > sendTextArea.offsetHeight || sendTextArea.value === '') { | 885 | const hasContent = 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(); | ||
| 890 | saveUserInputDebounced(); | 892 | saveUserInputDebounced(); |
| 891 | }); | 893 | }); |
| 892 | 894 | ||
| @@ -333,8 +333,9 @@ async function getCaptionForFile(file, prompt, quiet) { | |||
| 333 | return caption; | 333 | return caption; |
| 334 | } | 334 | } |
| 335 | catch (error) { | 335 | 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); | ||
| 338 | return ''; | 339 | return ''; |
| 339 | } | 340 | } |
| 340 | finally { | 341 | finally { |
| @@ -914,7 +914,7 @@ jQuery(async function () { | |||
| 914 | 914 | ||
| 915 | await addExtensionControls(); | 915 | await addExtensionControls(); |
| 916 | loadSettings(); | 916 | loadSettings(); |
| 917 | eventSource.on(event_types.MESSAGE_RECEIVED, onChatEvent); | 917 | eventSource.makeLast(event_types.CHARACTER_MESSAGE_RENDERED, onChatEvent); |
| 918 | eventSource.on(event_types.MESSAGE_DELETED, onChatEvent); | 918 | eventSource.on(event_types.MESSAGE_DELETED, onChatEvent); |
| 919 | eventSource.on(event_types.MESSAGE_EDITED, onChatEvent); | 919 | eventSource.on(event_types.MESSAGE_EDITED, onChatEvent); |
| 920 | eventSource.on(event_types.MESSAGE_SWIPED, onChatEvent); | 920 | eventSource.on(event_types.MESSAGE_SWIPED, onChatEvent); |
| @@ -239,7 +239,7 @@ eventSource.on(event_types.CHAT_CHANGED, (...args)=>executeIfReadyElseQueue(onCh | |||
| 239 | const onUserMessage = async () => { | 239 | const onUserMessage = async () => { |
| 240 | await autoExec.handleUser(); | 240 | await autoExec.handleUser(); |
| 241 | }; | 241 | }; |
| 242 | eventSource.on(event_types.USER_MESSAGE_RENDERED, (...args)=>executeIfReadyElseQueue(onUserMessage, args)); | 242 | eventSource.makeFirst(event_types.USER_MESSAGE_RENDERED, (...args)=>executeIfReadyElseQueue(onUserMessage, args)); |
| 243 | 243 | ||
| 244 | const onAiMessage = async (messageId) => { | 244 | const onAiMessage = async (messageId) => { |
| 245 | if (['...'].includes(chat[messageId]?.mes)) { | 245 | if (['...'].includes(chat[messageId]?.mes)) { |
| @@ -249,7 +249,7 @@ const onAiMessage = async (messageId) => { | |||
| 249 | 249 | ||
| 250 | await autoExec.handleAi(); | 250 | await autoExec.handleAi(); |
| 251 | }; | 251 | }; |
| 252 | eventSource.on(event_types.CHARACTER_MESSAGE_RENDERED, (...args)=>executeIfReadyElseQueue(onAiMessage, args)); | 252 | eventSource.makeFirst(event_types.CHARACTER_MESSAGE_RENDERED, (...args)=>executeIfReadyElseQueue(onAiMessage, args)); |
| 253 | 253 | ||
| 254 | const onGroupMemberDraft = async () => { | 254 | const onGroupMemberDraft = async () => { |
| 255 | await autoExec.handleGroupMemberDraft(); | 255 | await autoExec.handleGroupMemberDraft(); |
| @@ -2178,6 +2178,11 @@ function getQuietPrompt(mode, trigger) { | |||
| 2178 | return stringFormat(extension_settings.sd.prompts[mode], trigger); | 2178 | return stringFormat(extension_settings.sd.prompts[mode], trigger); |
| 2179 | } | 2179 | } |
| 2180 | 2180 | ||
| 2181 | /** | ||
| 2182 | * Sanitizes generated prompt for image generation. | ||
| 2183 | * @param {string} str String to process | ||
| 2184 | * @returns {string} Processed reply | ||
| 2185 | */ | ||
| 2181 | function processReply(str) { | 2186 | function processReply(str) { |
| 2182 | if (!str) { | 2187 | if (!str) { |
| 2183 | return ''; | 2188 | return ''; |
| @@ -2187,7 +2192,8 @@ function processReply(str) { | |||
| 2187 | str = str.replaceAll('“', ''); | 2192 | str = str.replaceAll('“', ''); |
| 2188 | str = str.replaceAll('.', ','); | 2193 | str = str.replaceAll('.', ','); |
| 2189 | str = str.replaceAll('\n', ', '); | 2194 | 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, ' '); | ||
| 2191 | str = str.replace(/\s+/g, ' '); // Collapse multiple whitespaces into one | 2197 | str = str.replace(/\s+/g, ' '); // Collapse multiple whitespaces into one |
| 2192 | str = str.trim(); | 2198 | str = str.trim(); |
| 2193 | 2199 | ||
| @@ -333,6 +333,9 @@ export function formatInstructModeChat(name, mes, isUser, isNarrator, forceAvata | |||
| 333 | if (power_user.instruct.macro) { | 333 | if (power_user.instruct.macro) { |
| 334 | prefix = substituteParams(prefix, name1, name2); | 334 | prefix = substituteParams(prefix, name1, name2); |
| 335 | prefix = prefix.replace(/{{name}}/gi, name || 'System'); | 335 | prefix = prefix.replace(/{{name}}/gi, name || 'System'); |
| 336 | |||
| 337 | suffix = substituteParams(suffix, name1, name2); | ||
| 338 | suffix = suffix.replace(/{{name}}/gi, name || 'System'); | ||
| 336 | } | 339 | } |
| 337 | 340 | ||
| 338 | if (!suffix && power_user.instruct.wrap) { | 341 | if (!suffix && power_user.instruct.wrap) { |
| @@ -398,6 +401,8 @@ export function formatInstructModeExamples(mesExamplesArray, name1, name2) { | |||
| 398 | 401 | ||
| 399 | inputPrefix = inputPrefix.replace(/{{name}}/gi, name1); | 402 | inputPrefix = inputPrefix.replace(/{{name}}/gi, name1); |
| 400 | outputPrefix = outputPrefix.replace(/{{name}}/gi, name2); | 403 | outputPrefix = outputPrefix.replace(/{{name}}/gi, name2); |
| 404 | inputSuffix = inputSuffix.replace(/{{name}}/gi, name1); | ||
| 405 | outputSuffix = outputSuffix.replace(/{{name}}/gi, name2); | ||
| 401 | 406 | ||
| 402 | if (!inputSuffix && power_user.instruct.wrap) { | 407 | if (!inputSuffix && power_user.instruct.wrap) { |
| 403 | inputSuffix = '\n'; | 408 | inputSuffix = '\n'; |
| @@ -53,6 +53,7 @@ import { | |||
| 53 | getFileText, | 53 | getFileText, |
| 54 | getImageSizeFromDataURL, | 54 | getImageSizeFromDataURL, |
| 55 | getSortableDelay, | 55 | getSortableDelay, |
| 56 | getStringHash, | ||
| 56 | isDataURL, | 57 | isDataURL, |
| 57 | parseJsonFile, | 58 | parseJsonFile, |
| 58 | resetScrollHeight, | 59 | resetScrollHeight, |
| @@ -72,6 +73,7 @@ import { SlashCommand } from './slash-commands/SlashCommand.js'; | |||
| 72 | import { ARGUMENT_TYPE, SlashCommandArgument } from './slash-commands/SlashCommandArgument.js'; | 73 | import { ARGUMENT_TYPE, SlashCommandArgument } from './slash-commands/SlashCommandArgument.js'; |
| 73 | import { renderTemplateAsync } from './templates.js'; | 74 | import { renderTemplateAsync } from './templates.js'; |
| 74 | import { SlashCommandEnumValue } from './slash-commands/SlashCommandEnumValue.js'; | 75 | import { SlashCommandEnumValue } from './slash-commands/SlashCommandEnumValue.js'; |
| 76 | import { Popup, POPUP_RESULT } from './popup.js'; | ||
| 75 | 77 | ||
| 76 | export { | 78 | export { |
| 77 | openai_messages_count, | 79 | openai_messages_count, |
| @@ -202,6 +204,15 @@ const custom_prompt_post_processing_types = { | |||
| 202 | CLAUDE: 'claude', | 204 | CLAUDE: 'claude', |
| 203 | }; | 205 | }; |
| 204 | 206 | ||
| 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 | |||
| 205 | function getPrefixMap() { | 216 | function getPrefixMap() { |
| 206 | return selected_group ? { | 217 | return selected_group ? { |
| 207 | assistant: '', | 218 | assistant: '', |
| @@ -388,7 +399,7 @@ let openai_settings; | |||
| 388 | 399 | ||
| 389 | let promptManager = null; | 400 | let promptManager = null; |
| 390 | 401 | ||
| 391 | function validateReverseProxy() { | 402 | async function validateReverseProxy() { |
| 392 | if (!oai_settings.reverse_proxy) { | 403 | if (!oai_settings.reverse_proxy) { |
| 393 | return; | 404 | return; |
| 394 | } | 405 | } |
| @@ -402,6 +413,19 @@ function validateReverseProxy() { | |||
| 402 | resultCheckStatus(); | 413 | resultCheckStatus(); |
| 403 | throw err; | 414 | throw err; |
| 404 | } | 415 | } |
| 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)); | ||
| 405 | } | 429 | } |
| 406 | 430 | ||
| 407 | /** | 431 | /** |
| @@ -1787,7 +1811,7 @@ async function sendOpenAIRequest(type, messages, signal) { | |||
| 1787 | 1811 | ||
| 1788 | // Proxy is only supported for Claude, OpenAI, Mistral, and Google MakerSuite | 1812 | // Proxy is only supported for Claude, OpenAI, Mistral, and Google MakerSuite |
| 1789 | 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)) { | 1813 | 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)) { |
| 1790 | validateReverseProxy(); | 1814 | await validateReverseProxy(); |
| 1791 | generate_data['reverse_proxy'] = oai_settings.reverse_proxy; | 1815 | generate_data['reverse_proxy'] = oai_settings.reverse_proxy; |
| 1792 | generate_data['proxy_password'] = oai_settings.proxy_password; | 1816 | generate_data['proxy_password'] = oai_settings.proxy_password; |
| 1793 | } | 1817 | } |
| @@ -3200,7 +3224,7 @@ async function getStatusOpen() { | |||
| 3200 | }; | 3224 | }; |
| 3201 | 3225 | ||
| 3202 | if (oai_settings.reverse_proxy && (oai_settings.chat_completion_source === chat_completion_sources.OPENAI || oai_settings.chat_completion_source === chat_completion_sources.CLAUDE)) { | 3226 | if (oai_settings.reverse_proxy && (oai_settings.chat_completion_source === chat_completion_sources.OPENAI || oai_settings.chat_completion_source === chat_completion_sources.CLAUDE)) { |
| 3203 | validateReverseProxy(); | 3227 | await validateReverseProxy(); |
| 3204 | } | 3228 | } |
| 3205 | 3229 | ||
| 3206 | if (oai_settings.chat_completion_source === chat_completion_sources.CUSTOM) { | 3230 | if (oai_settings.chat_completion_source === chat_completion_sources.CUSTOM) { |
| @@ -3495,6 +3519,26 @@ async function onPresetImportFileChange(e) { | |||
| 3495 | return; | 3519 | return; |
| 3496 | } | 3520 | } |
| 3497 | 3521 | ||
| 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 | |||
| 3498 | if (name in openai_setting_names) { | 3542 | if (name in openai_setting_names) { |
| 3499 | const confirm = await callPopup('Preset name already exists. Overwrite?', 'confirm'); | 3543 | const confirm = await callPopup('Preset name already exists. Overwrite?', 'confirm'); |
| 3500 | 3544 | ||
| @@ -3541,8 +3585,22 @@ async function onExportPresetClick() { | |||
| 3541 | 3585 | ||
| 3542 | const preset = structuredClone(openai_settings[openai_setting_names[oai_settings.preset_settings_openai]]); | 3586 | const preset = structuredClone(openai_settings[openai_setting_names[oai_settings.preset_settings_openai]]); |
| 3543 | 3587 | ||
| 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 | } | ||
| 3546 | 3604 | ||
| 3547 | const presetJsonString = JSON.stringify(preset, null, 4); | 3605 | const presetJsonString = JSON.stringify(preset, null, 4); |
| 3548 | const presetFileName = `${oai_settings.preset_settings_openai}.json`; | 3606 | const presetFileName = `${oai_settings.preset_settings_openai}.json`; |
| @@ -4679,22 +4737,23 @@ function runProxyCallback(_, value) { | |||
| 4679 | return foundName; | 4737 | return foundName; |
| 4680 | } | 4738 | } |
| 4681 | 4739 | ||
| 4682 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ | 4740 | export function initOpenai() { |
| 4683 | name: 'proxy', | 4741 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 4684 | callback: runProxyCallback, | 4742 | name: 'proxy', |
| 4685 | returns: 'current proxy', | 4743 | callback: runProxyCallback, |
| 4686 | namedArgumentList: [], | 4744 | returns: 'current proxy', |
| 4687 | unnamedArgumentList: [ | 4745 | namedArgumentList: [], |
| 4688 | SlashCommandArgument.fromProps({ | 4746 | unnamedArgumentList: [ |
| 4689 | description: 'name', | 4747 | SlashCommandArgument.fromProps({ |
| 4690 | typeList: [ARGUMENT_TYPE.STRING], | 4748 | description: 'name', |
| 4691 | isRequired: true, | 4749 | typeList: [ARGUMENT_TYPE.STRING], |
| 4692 | enumProvider: () => proxies.map(preset => new SlashCommandEnumValue(preset.name, preset.url)), | 4750 | isRequired: true, |
| 4693 | }), | 4751 | enumProvider: () => proxies.map(preset => new SlashCommandEnumValue(preset.name, preset.url)), |
| 4694 | ], | 4752 | }), |
| 4695 | helpString: 'Sets a proxy preset by name.', | 4753 | ], |
| 4696 | })); | 4754 | helpString: 'Sets a proxy preset by name.', |
| 4697 | 4755 | })); | |
| 4756 | } | ||
| 4698 | 4757 | ||
| 4699 | $(document).ready(async function () { | 4758 | $(document).ready(async function () { |
| 4700 | $('#test_api_button').on('click', testApiConnection); | 4759 | $('#test_api_button').on('click', testApiConnection); |
| @@ -395,19 +395,16 @@ export async function convertCharacterToPersona(characterId = null) { | |||
| 395 | const overwriteName = `${name} (Persona).png`; | 395 | const overwriteName = `${name} (Persona).png`; |
| 396 | 396 | ||
| 397 | if (overwriteName in power_user.personas) { | 397 | if (overwriteName in power_user.personas) { |
| 398 | const confirmation = await callPopup('This character exists as a persona already. Are you sure want to overwrite it?', 'confirm', '', { okButton: 'Yes' }); | 398 | const confirm = await Popup.show.confirm('Overwrite Existing Persona', 'This character exists as a persona already. Do you want to overwrite it?'); |
| 399 | 399 | if (!confirm) { | |
| 400 | if (confirmation === false) { | ||
| 401 | console.log('User cancelled the overwrite of the persona'); | 400 | console.log('User cancelled the overwrite of the persona'); |
| 402 | return; | 401 | return; |
| 403 | } | 402 | } |
| 404 | } | 403 | } |
| 405 | 404 | ||
| 406 | if (description.includes('{{char}}') || description.includes('{{user}}')) { | 405 | 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) { | ||
| 411 | description = description.replace(/{{char}}/gi, '{{personaChar}}').replace(/{{user}}/gi, '{{personaUser}}'); | 408 | description = description.replace(/{{char}}/gi, '{{personaChar}}').replace(/{{user}}/gi, '{{personaUser}}'); |
| 412 | description = description.replace(/{{personaUser}}/gi, '{{char}}').replace(/{{personaChar}}/gi, '{{user}}'); | 409 | description = description.replace(/{{personaUser}}/gi, '{{char}}').replace(/{{personaChar}}/gi, '{{user}}'); |
| 413 | } | 410 | } |
| @@ -194,7 +194,7 @@ export class Popup { | |||
| 194 | const buttonElement = document.createElement('div'); | 194 | const buttonElement = document.createElement('div'); |
| 195 | buttonElement.classList.add('menu_button', 'popup-button-custom', 'result-control'); | 195 | buttonElement.classList.add('menu_button', 'popup-button-custom', 'result-control'); |
| 196 | buttonElement.classList.add(...(button.classes ?? [])); | 196 | 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 |
| 198 | buttonElement.textContent = button.text; | 198 | buttonElement.textContent = button.text; |
| 199 | buttonElement.dataset.i18n = buttonElement.textContent; | 199 | buttonElement.dataset.i18n = buttonElement.textContent; |
| 200 | buttonElement.tabIndex = 0; | 200 | buttonElement.tabIndex = 0; |
| @@ -317,9 +317,14 @@ export class Popup { | |||
| 317 | // Bind event listeners for all result controls to their defined event type | 317 | // Bind event listeners for all result controls to their defined event type |
| 318 | this.dlg.querySelectorAll('[data-result]').forEach(resultControl => { | 318 | this.dlg.querySelectorAll('[data-result]').forEach(resultControl => { |
| 319 | if (!(resultControl instanceof HTMLElement)) return; | 319 | 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 |
| 321 | if (String(undefined) === String(resultControl.dataset.result)) return; | 321 | if (String(resultControl.dataset.result) === String(undefined)) 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); | ||
| 323 | const type = resultControl.dataset.resultEvent || 'click'; | 328 | const type = resultControl.dataset.resultEvent || 'click'; |
| 324 | resultControl.addEventListener(type, async () => await this.complete(result)); | 329 | resultControl.addEventListener(type, async () => await this.complete(result)); |
| 325 | }); | 330 | }); |
| @@ -2734,45 +2734,26 @@ async function doDelMode(_, text) { | |||
| 2734 | return ''; | 2734 | return ''; |
| 2735 | } | 2735 | } |
| 2736 | 2736 | ||
| 2737 | //first enter delmode | 2737 | // Just enter the delete mode. |
| 2738 | $('#option_delete_mes').trigger('click', { fromSlashCommand: true }); | 2738 | if (!text) { |
| 2739 | 2739 | $('#option_delete_mes').trigger('click', { fromSlashCommand: true }); | |
| 2740 | //parse valid args | 2740 | return ''; |
| 2741 | if (text) { | 2741 | } |
| 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.`); | ||
| 2750 | return ''; | ||
| 2751 | } | ||
| 2752 | |||
| 2753 | let oldestMesToDel = $('#chat').find(`.mes[mesid=${oldestMesIDToDel}]`); | ||
| 2754 | 2742 | ||
| 2755 | if (!oldestMesIDToDel && lastMesID > 0) { | 2743 | const count = Number(text); |
| 2756 | oldestMesToDel = await loadUntilMesId(oldestMesIDToDel); | ||
| 2757 | 2744 | ||
| 2758 | if (!oldestMesToDel || !oldestMesToDel.length) { | 2745 | // Nothing to delete. |
| 2759 | return ''; | 2746 | if (count < 1) { |
| 2760 | } | 2747 | return ''; |
| 2761 | } | 2748 | } |
| 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; | ||
| 2768 | 2749 | ||
| 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.`); | ||
| 2772 | return ''; | 2752 | return ''; |
| 2773 | } | 2753 | } |
| 2774 | 2754 | ||
| 2775 | return ''; | 2755 | const range = `${chat.length - count}-${chat.length - 1}`; |
| 2756 | return doMesCut(_, range); | ||
| 2776 | } | 2757 | } |
| 2777 | 2758 | ||
| 2778 | function doResetPanels() { | 2759 | function doResetPanels() { |
| @@ -1,6 +1,5 @@ | |||
| 1 | import { | 1 | import { |
| 2 | amount_gen, | 2 | amount_gen, |
| 3 | callPopup, | ||
| 4 | characters, | 3 | characters, |
| 5 | eventSource, | 4 | eventSource, |
| 6 | event_types, | 5 | event_types, |
| @@ -19,6 +18,7 @@ import { | |||
| 19 | import { groups, selected_group } from './group-chats.js'; | 18 | import { groups, selected_group } from './group-chats.js'; |
| 20 | import { instruct_presets } from './instruct-mode.js'; | 19 | import { instruct_presets } from './instruct-mode.js'; |
| 21 | import { kai_settings } from './kai-settings.js'; | 20 | import { kai_settings } from './kai-settings.js'; |
| 21 | import { Popup } from './popup.js'; | ||
| 22 | import { context_presets, getContextSettings, power_user } from './power-user.js'; | 22 | import { context_presets, getContextSettings, power_user } from './power-user.js'; |
| 23 | import { SlashCommand } from './slash-commands/SlashCommand.js'; | 23 | import { SlashCommand } from './slash-commands/SlashCommand.js'; |
| 24 | import { ARGUMENT_TYPE, SlashCommandArgument } from './slash-commands/SlashCommandArgument.js'; | 24 | import { ARGUMENT_TYPE, SlashCommandArgument } from './slash-commands/SlashCommandArgument.js'; |
| @@ -165,11 +165,8 @@ class PresetManager { | |||
| 165 | 165 | ||
| 166 | async savePresetAs() { | 166 | async savePresetAs() { |
| 167 | const inputValue = this.getSelectedPresetName(); | 167 | 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 | |||
| 173 | if (!name) { | 170 | if (!name) { |
| 174 | console.log('Preset name not provided'); | 171 | console.log('Preset name not provided'); |
| 175 | return; | 172 | return; |
| @@ -304,6 +301,9 @@ class PresetManager { | |||
| 304 | 301 | ||
| 305 | const filteredKeys = [ | 302 | const filteredKeys = [ |
| 306 | 'preset', | 303 | 'preset', |
| 304 | 'streaming', | ||
| 305 | 'truncation_length', | ||
| 306 | 'n', | ||
| 307 | 'streaming_url', | 307 | 'streaming_url', |
| 308 | 'stopping_strings', | 308 | 'stopping_strings', |
| 309 | 'can_use_tokenization', | 309 | 'can_use_tokenization', |
| @@ -372,7 +372,7 @@ class PresetManager { | |||
| 372 | if (Object.keys(preset_names).length) { | 372 | if (Object.keys(preset_names).length) { |
| 373 | const nextPresetName = Object.keys(preset_names)[0]; | 373 | const nextPresetName = Object.keys(preset_names)[0]; |
| 374 | const newValue = preset_names[nextPresetName]; | 374 | const newValue = preset_names[nextPresetName]; |
| 375 | $(this.select).find(`option[value="${newValue}"]`).attr('selected', true); | 375 | $(this.select).find(`option[value="${newValue}"]`).attr('selected', 'true'); |
| 376 | $(this.select).trigger('change'); | 376 | $(this.select).trigger('change'); |
| 377 | } | 377 | } |
| 378 | 378 | ||
| @@ -597,8 +597,7 @@ export async function initPresetManager() { | |||
| 597 | return; | 597 | return; |
| 598 | } | 598 | } |
| 599 | 599 | ||
| 600 | const confirm = await callPopup('Delete the preset? This action is irreversible and your current settings will be overwritten.', 'confirm'); | 600 | const confirm = await Popup.show.confirm('Delete the preset?', 'This action is irreversible and your current settings will be overwritten.'); |
| 601 | |||
| 602 | if (!confirm) { | 601 | if (!confirm) { |
| 603 | return; | 602 | return; |
| 604 | } | 603 | } |
| @@ -641,8 +640,7 @@ export async function initPresetManager() { | |||
| 641 | return; | 640 | return; |
| 642 | } | 641 | } |
| 643 | 642 | ||
| 644 | const confirm = await callPopup('<h3>Are you sure?</h3>Resetting a <b>default preset</b> will restore the default settings.', 'confirm'); | 643 | const confirm = await Popup.show.confirm('Are you sure?', 'Resetting a <b>default preset</b> will restore the default settings.'); |
| 645 | |||
| 646 | if (!confirm) { | 644 | if (!confirm) { |
| 647 | return; | 645 | return; |
| 648 | } | 646 | } |
| @@ -653,8 +651,7 @@ export async function initPresetManager() { | |||
| 653 | presetManager.selectPreset(option); | 651 | presetManager.selectPreset(option); |
| 654 | toastr.success('Default preset restored'); | 652 | toastr.success('Default preset restored'); |
| 655 | } else { | 653 | } else { |
| 656 | const confirm = await callPopup('<h3>Are you sure?</h3>Resetting a <b>custom preset</b> will restore to the last saved state.', 'confirm'); | 654 | const confirm = await Popup.show.confirm('Are you sure?', 'Resetting a <b>custom preset</b> will restore to the last saved state.'); |
| 657 | |||
| 658 | if (!confirm) { | 655 | if (!confirm) { |
| 659 | return; | 656 | return; |
| 660 | } | 657 | } |
| @@ -952,14 +952,36 @@ export function initDefaultSlashCommands() { | |||
| 952 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ | 952 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 953 | name: 'fuzzy', | 953 | name: 'fuzzy', |
| 954 | callback: fuzzyCallback, | 954 | callback: fuzzyCallback, |
| 955 | returns: 'first matching item', | 955 | returns: 'matching item', |
| 956 | namedArgumentList: [ | 956 | namedArgumentList: [ |
| 957 | new SlashCommandNamedArgument( | 957 | 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 | }), | ||
| 963 | ], | 985 | ], |
| 964 | unnamedArgumentList: [ | 986 | unnamedArgumentList: [ |
| 965 | new SlashCommandArgument( | 987 | new SlashCommandArgument( |
| @@ -977,6 +999,13 @@ export function initDefaultSlashCommands() { | |||
| 977 | At 1.0 (max) the match is very loose and will match anything. | 999 | At 1.0 (max) the match is very loose and will match anything. |
| 978 | </div> | 1000 | </div> |
| 979 | <div> | 1001 | <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> | ||
| 980 | The returned value passes to the next command through the pipe. | 1009 | The returned value passes to the next command through the pipe. |
| 981 | </div> | 1010 | </div> |
| 982 | <div> | 1011 | <div> |
| @@ -1865,7 +1894,7 @@ async function inputCallback(args, prompt) { | |||
| 1865 | * @param {FuzzyCommandArgs} args - arguments containing "list" (JSON array) and optionaly "threshold" (float between 0.0 and 1.0) | 1894 | * @param {FuzzyCommandArgs} args - arguments containing "list" (JSON array) and optionaly "threshold" (float between 0.0 and 1.0) |
| 1866 | * @param {string} searchInValue - the string where items of list are searched | 1895 | * @param {string} searchInValue - the string where items of list are searched |
| 1867 | * @returns {string} - the matched item from the list | 1896 | * @returns {string} - the matched item from the list |
| 1868 | * @typedef {{list: string, threshold: string}} FuzzyCommandArgs - arguments for /fuzzy command | 1897 | * @typedef {{list: string, threshold: string, mode:string}} FuzzyCommandArgs - arguments for /fuzzy command |
| 1869 | * @example /fuzzy list=["down","left","up","right"] "he looks up" | /echo // should return "up" | 1898 | * @example /fuzzy list=["down","left","up","right"] "he looks up" | /echo // should return "up" |
| 1870 | * @link https://www.fusejs.io/ | 1899 | * @link https://www.fusejs.io/ |
| 1871 | */ | 1900 | */ |
| @@ -1895,7 +1924,7 @@ function fuzzyCallback(args, searchInValue) { | |||
| 1895 | }; | 1924 | }; |
| 1896 | // threshold determines how strict is the match, low threshold value is very strict, at 1 (nearly?) everything matches | 1925 | // threshold determines how strict is the match, low threshold value is very strict, at 1 (nearly?) everything matches |
| 1897 | if ('threshold' in args) { | 1926 | if ('threshold' in args) { |
| 1898 | params.threshold = parseFloat(resolveVariable(args.threshold)); | 1927 | params.threshold = parseFloat(args.threshold); |
| 1899 | if (isNaN(params.threshold)) { | 1928 | if (isNaN(params.threshold)) { |
| 1900 | console.warn('WARN: \'threshold\' argument must be a float between 0.0 and 1.0 for /fuzzy command'); | 1929 | console.warn('WARN: \'threshold\' argument must be a float between 0.0 and 1.0 for /fuzzy command'); |
| 1901 | return ''; | 1930 | return ''; |
| @@ -1908,16 +1937,42 @@ function fuzzyCallback(args, searchInValue) { | |||
| 1908 | } | 1937 | } |
| 1909 | } | 1938 | } |
| 1910 | 1939 | ||
| 1911 | const fuse = new Fuse([searchInValue], params); | 1940 | function getFirstMatch() { |
| 1912 | // each item in the "list" is searched within "search_item", if any matches it returns the matched "item" | 1941 | const fuse = new Fuse([searchInValue], params); |
| 1913 | for (const searchItem of list) { | 1942 | // each item in the "list" is searched within "search_item", if any matches it returns the matched "item" |
| 1914 | const result = fuse.search(searchItem); | 1943 | for (const searchItem of list) { |
| 1944 | const result = fuse.search(searchItem); | ||
| 1945 | console.debug('/fuzzy: result', result); | ||
| 1946 | if (result.length > 0) { | ||
| 1947 | console.info('/fuzzy: first matched', searchItem); | ||
| 1948 | return searchItem; | ||
| 1949 | } | ||
| 1950 | } | ||
| 1951 | |||
| 1952 | console.info('/fuzzy: no match'); | ||
| 1953 | 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); | ||
| 1915 | if (result.length > 0) { | 1960 | if (result.length > 0) { |
| 1916 | console.info('fuzzyCallback Matched: ' + searchItem); | 1961 | console.info('/fuzzy: best matched', result[0].item); |
| 1917 | return searchItem; | 1962 | return result[0].item; |
| 1918 | } | 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(); | ||
| 1919 | } | 1975 | } |
| 1920 | return ''; | ||
| 1921 | } catch { | 1976 | } catch { |
| 1922 | console.warn('WARN: Invalid list argument provided for /fuzzy command'); | 1977 | console.warn('WARN: Invalid list argument provided for /fuzzy command'); |
| 1923 | return ''; | 1978 | return ''; |
| @@ -1,11 +1,11 @@ | |||
| 1 | import { chat_metadata, characters, substituteParams, chat, extension_prompt_roles, extension_prompt_types } from "../../script.js"; | 1 | import { chat_metadata, characters, substituteParams, chat, extension_prompt_roles, extension_prompt_types } from '../../script.js'; |
| 2 | import { extension_settings } from "../extensions.js"; | 2 | import { extension_settings } from '../extensions.js'; |
| 3 | import { getGroupMembers, groups, selected_group } from "../group-chats.js"; | 3 | import { getGroupMembers, groups } from '../group-chats.js'; |
| 4 | import { power_user } from "../power-user.js"; | 4 | import { power_user } from '../power-user.js'; |
| 5 | import { searchCharByName, getTagsList, tags } from "../tags.js"; | 5 | import { searchCharByName, getTagsList, tags } from '../tags.js'; |
| 6 | import { SlashCommandClosure } from "./SlashCommandClosure.js"; | 6 | import { world_names } from '../world-info.js'; |
| 7 | import { SlashCommandEnumValue, enumTypes } from "./SlashCommandEnumValue.js"; | 7 | import { SlashCommandClosure } from './SlashCommandClosure.js'; |
| 8 | import { SlashCommandExecutor } from "./SlashCommandExecutor.js"; | 8 | import { SlashCommandEnumValue, enumTypes } from './SlashCommandEnumValue.js'; |
| 9 | 9 | ||
| 10 | /** | 10 | /** |
| 11 | * A collection of regularly used enum icons | 11 | * A collection of regularly used enum icons |
| @@ -103,8 +103,8 @@ export const enumIcons = { | |||
| 103 | // Remove possible nullable types definition to match type icon | 103 | // Remove possible nullable types definition to match type icon |
| 104 | type = type.replace(/\?$/, ''); | 104 | type = type.replace(/\?$/, ''); |
| 105 | return enumIcons[type] ?? enumIcons.default; | 105 | return enumIcons[type] ?? enumIcons.default; |
| 106 | } | 106 | }, |
| 107 | } | 107 | }; |
| 108 | 108 | ||
| 109 | /** | 109 | /** |
| 110 | * A collection of common enum providers | 110 | * A collection of common enum providers |
| @@ -143,7 +143,7 @@ export const commonEnumProviders = { | |||
| 143 | ...isAll || types.includes('global') ? Object.keys(extension_settings.variables.global ?? []).map(name => new SlashCommandEnumValue(name, null, enumTypes.macro, enumIcons.globalVariable)) : [], | 143 | ...isAll || types.includes('global') ? Object.keys(extension_settings.variables.global ?? []).map(name => new SlashCommandEnumValue(name, null, enumTypes.macro, enumIcons.globalVariable)) : [], |
| 144 | ...isAll || types.includes('local') ? Object.keys(chat_metadata.variables ?? []).map(name => new SlashCommandEnumValue(name, null, enumTypes.name, enumIcons.localVariable)) : [], | 144 | ...isAll || types.includes('local') ? Object.keys(chat_metadata.variables ?? []).map(name => new SlashCommandEnumValue(name, null, enumTypes.name, enumIcons.localVariable)) : [], |
| 145 | ...isAll || types.includes('scope') ? [].map(name => new SlashCommandEnumValue(name, null, enumTypes.variable, enumIcons.scopeVariable)) : [], // TODO: Add scoped variables here, Lenny | 145 | ...isAll || types.includes('scope') ? [].map(name => new SlashCommandEnumValue(name, null, enumTypes.variable, enumIcons.scopeVariable)) : [], // TODO: Add scoped variables here, Lenny |
| 146 | ] | 146 | ]; |
| 147 | }, | 147 | }, |
| 148 | 148 | ||
| 149 | /** | 149 | /** |
| @@ -180,7 +180,7 @@ export const commonEnumProviders = { | |||
| 180 | * @param {('all' | 'existing' | 'not-existing')?} [mode='all'] - Which types of tags to show | 180 | * @param {('all' | 'existing' | 'not-existing')?} [mode='all'] - Which types of tags to show |
| 181 | * @returns {() => SlashCommandEnumValue[]} | 181 | * @returns {() => SlashCommandEnumValue[]} |
| 182 | */ | 182 | */ |
| 183 | tagsForChar: (mode = 'all') => (/** @type {SlashCommandExecutor} */ executor) => { | 183 | tagsForChar: (mode = 'all') => (/** @type {import('./SlashCommandExecutor.js').SlashCommandExecutor} */ executor) => { |
| 184 | // Try to see if we can find the char during execution to filter down the tags list some more. Otherwise take all tags. | 184 | // Try to see if we can find the char during execution to filter down the tags list some more. Otherwise take all tags. |
| 185 | const charName = executor.namedArgumentList.find(it => it.name == 'name')?.value; | 185 | const charName = executor.namedArgumentList.find(it => it.name == 'name')?.value; |
| 186 | if (charName instanceof SlashCommandClosure) throw new Error('Argument \'name\' does not support closures'); | 186 | if (charName instanceof SlashCommandClosure) throw new Error('Argument \'name\' does not support closures'); |
| @@ -213,7 +213,7 @@ export const commonEnumProviders = { | |||
| 213 | * | 213 | * |
| 214 | * @returns {SlashCommandEnumValue[]} | 214 | * @returns {SlashCommandEnumValue[]} |
| 215 | */ | 215 | */ |
| 216 | worlds: () => $('#world_info').children().toArray().map(x => new SlashCommandEnumValue(x.textContent, null, enumTypes.name, enumIcons.world)), | 216 | worlds: () => world_names.map(worldName => new SlashCommandEnumValue(worldName, null, enumTypes.name, enumIcons.world)), |
| 217 | 217 | ||
| 218 | /** | 218 | /** |
| 219 | * All existing injects for the current chat | 219 | * All existing injects for the current chat |
| @@ -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> | ||
| @@ -14,7 +14,6 @@ import { SlashCommand } from './slash-commands/SlashCommand.js'; | |||
| 14 | import { ARGUMENT_TYPE, SlashCommandArgument, SlashCommandNamedArgument } from './slash-commands/SlashCommandArgument.js'; | 14 | import { ARGUMENT_TYPE, SlashCommandArgument, SlashCommandNamedArgument } from './slash-commands/SlashCommandArgument.js'; |
| 15 | import { SlashCommandEnumValue, enumTypes } from './slash-commands/SlashCommandEnumValue.js'; | 15 | import { SlashCommandEnumValue, enumTypes } from './slash-commands/SlashCommandEnumValue.js'; |
| 16 | import { commonEnumProviders, enumIcons } from './slash-commands/SlashCommandCommonEnumsProvider.js'; | 16 | import { commonEnumProviders, enumIcons } from './slash-commands/SlashCommandCommonEnumsProvider.js'; |
| 17 | import { SlashCommandExecutor } from './slash-commands/SlashCommandExecutor.js'; | ||
| 18 | import { SlashCommandClosure } from './slash-commands/SlashCommandClosure.js'; | 17 | import { SlashCommandClosure } from './slash-commands/SlashCommandClosure.js'; |
| 19 | import { callGenericPopup, Popup, POPUP_TYPE } from './popup.js'; | 18 | import { callGenericPopup, Popup, POPUP_TYPE } from './popup.js'; |
| 20 | 19 | ||
| @@ -171,7 +170,7 @@ class WorldInfoBuffer { | |||
| 171 | #skew = 0; | 170 | #skew = 0; |
| 172 | 171 | ||
| 173 | /** | 172 | /** |
| 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. |
| 175 | */ | 174 | */ |
| 176 | #startDepth = 0; | 175 | #startDepth = 0; |
| 177 | 176 | ||
| @@ -224,12 +223,12 @@ class WorldInfoBuffer { | |||
| 224 | } | 223 | } |
| 225 | 224 | ||
| 226 | if (depth < 0) { | 225 | if (depth < 0) { |
| 227 | console.error(`Invalid WI scan depth ${depth}. Must be >= 0`); | 226 | console.error(`[WI] Invalid WI scan depth ${depth}. Must be >= 0`); |
| 228 | return ''; | 227 | return ''; |
| 229 | } | 228 | } |
| 230 | 229 | ||
| 231 | if (depth > MAX_SCAN_DEPTH) { | 230 | if (depth > MAX_SCAN_DEPTH) { |
| 232 | console.warn(`Invalid WI scan depth ${depth}. Truncating to ${MAX_SCAN_DEPTH}`); | 231 | console.warn(`[WI] Invalid WI scan depth ${depth}. Truncating to ${MAX_SCAN_DEPTH}`); |
| 233 | depth = MAX_SCAN_DEPTH; | 232 | depth = MAX_SCAN_DEPTH; |
| 234 | } | 233 | } |
| 235 | 234 | ||
| @@ -303,10 +302,17 @@ class WorldInfoBuffer { | |||
| 303 | } | 302 | } |
| 304 | 303 | ||
| 305 | /** | 304 | /** |
| 306 | * Increments skew and sets startDepth to previous depth. | 305 | * Checks if the recursion buffer is not empty. |
| 306 | * @returns {boolean} Returns true if the recursion buffer is not empty, otherwise false | ||
| 307 | */ | 307 | */ |
| 308 | advanceScanPosition() { | 308 | hasRecurse() { |
| 309 | this.#startDepth = this.getDepth(); | 309 | return this.#recurseBuffer.length > 0; |
| 310 | } | ||
| 311 | |||
| 312 | /** | ||
| 313 | * Increments skew to advance the scan range. | ||
| 314 | */ | ||
| 315 | advanceScan() { | ||
| 310 | this.#skew++; | 316 | this.#skew++; |
| 311 | } | 317 | } |
| 312 | 318 | ||
| @@ -438,7 +444,7 @@ class WorldInfoTimedEffects { | |||
| 438 | const key = this.#getEntryKey(entry); | 444 | const key = this.#getEntryKey(entry); |
| 439 | const effect = this.#getEntryTimedEffect('cooldown', entry, true); | 445 | const effect = this.#getEntryTimedEffect('cooldown', entry, true); |
| 440 | chat_metadata.timedWorldInfo.cooldown[key] = effect; | 446 | chat_metadata.timedWorldInfo.cooldown[key] = effect; |
| 441 | console.log(`Adding cooldown entry ${key} on ended sticky: start=${effect.start}, end=${effect.end}, protected=${effect.protected}`); | 447 | console.log(`[WI] Adding cooldown entry ${key} on ended sticky: start=${effect.start}, end=${effect.end}, protected=${effect.protected}`); |
| 442 | // Set the cooldown immediately for this evaluation | 448 | // Set the cooldown immediately for this evaluation |
| 443 | this.#buffer.cooldown.push(entry); | 449 | this.#buffer.cooldown.push(entry); |
| 444 | }, | 450 | }, |
| @@ -449,10 +455,10 @@ class WorldInfoTimedEffects { | |||
| 449 | * @param {WIScanEntry} entry Entry that ended cooldown | 455 | * @param {WIScanEntry} entry Entry that ended cooldown |
| 450 | */ | 456 | */ |
| 451 | 'cooldown': (entry) => { | 457 | 'cooldown': (entry) => { |
| 452 | console.debug('Cooldown ended for entry', entry.uid); | 458 | console.debug('[WI] Cooldown ended for entry', entry.uid); |
| 453 | }, | 459 | }, |
| 454 | 460 | ||
| 455 | 'delay': () => {}, | 461 | 'delay': () => { }, |
| 456 | }; | 462 | }; |
| 457 | 463 | ||
| 458 | /** | 464 | /** |
| @@ -539,11 +545,11 @@ class WorldInfoTimedEffects { | |||
| 539 | /** @type {[string, WITimedEffect][]} */ | 545 | /** @type {[string, WITimedEffect][]} */ |
| 540 | const effects = Object.entries(chat_metadata.timedWorldInfo[type]); | 546 | const effects = Object.entries(chat_metadata.timedWorldInfo[type]); |
| 541 | for (const [key, value] of effects) { | 547 | for (const [key, value] of effects) { |
| 542 | console.log(`Processing ${type} entry ${key}`, value); | 548 | console.log(`[WI] Processing ${type} entry ${key}`, value); |
| 543 | const entry = this.#entries.find(x => String(this.#getEntryHash(x)) === String(value.hash)); | 549 | const entry = this.#entries.find(x => String(this.#getEntryHash(x)) === String(value.hash)); |
| 544 | 550 | ||
| 545 | if (this.#chat.length <= Number(value.start) && !value.protected) { | 551 | if (this.#chat.length <= Number(value.start) && !value.protected) { |
| 546 | console.log(`Removing ${type} entry ${key} from timedWorldInfo: chat not advanced`, value); | 552 | console.log(`[WI] Removing ${type} entry ${key} from timedWorldInfo: chat not advanced`, value); |
| 547 | delete chat_metadata.timedWorldInfo[type][key]; | 553 | delete chat_metadata.timedWorldInfo[type][key]; |
| 548 | continue; | 554 | continue; |
| 549 | } | 555 | } |
| @@ -551,7 +557,7 @@ class WorldInfoTimedEffects { | |||
| 551 | // Missing entries (they could be from another character's lorebook) | 557 | // Missing entries (they could be from another character's lorebook) |
| 552 | if (!entry) { | 558 | if (!entry) { |
| 553 | if (this.#chat.length >= Number(value.end)) { | 559 | if (this.#chat.length >= Number(value.end)) { |
| 554 | console.log(`Removing ${type} entry from timedWorldInfo: entry not found and interval passed`, entry); | 560 | console.log(`[WI] Removing ${type} entry from timedWorldInfo: entry not found and interval passed`, entry); |
| 555 | delete chat_metadata.timedWorldInfo[type][key]; | 561 | delete chat_metadata.timedWorldInfo[type][key]; |
| 556 | } | 562 | } |
| 557 | continue; | 563 | continue; |
| @@ -559,13 +565,13 @@ class WorldInfoTimedEffects { | |||
| 559 | 565 | ||
| 560 | // Ignore invalid entries (not configured for timed effects) | 566 | // Ignore invalid entries (not configured for timed effects) |
| 561 | if (!entry[type]) { | 567 | if (!entry[type]) { |
| 562 | console.log(`Removing ${type} entry from timedWorldInfo: entry not ${type}`, entry); | 568 | console.log(`[WI] Removing ${type} entry from timedWorldInfo: entry not ${type}`, entry); |
| 563 | delete chat_metadata.timedWorldInfo[type][key]; | 569 | delete chat_metadata.timedWorldInfo[type][key]; |
| 564 | continue; | 570 | continue; |
| 565 | } | 571 | } |
| 566 | 572 | ||
| 567 | if (this.#chat.length >= Number(value.end)) { | 573 | if (this.#chat.length >= Number(value.end)) { |
| 568 | console.log(`Removing ${type} entry from timedWorldInfo: ${type} interval passed`, entry); | 574 | console.log(`[WI] Removing ${type} entry from timedWorldInfo: ${type} interval passed`, entry); |
| 569 | delete chat_metadata.timedWorldInfo[type][key]; | 575 | delete chat_metadata.timedWorldInfo[type][key]; |
| 570 | if (typeof onEnded === 'function') { | 576 | if (typeof onEnded === 'function') { |
| 571 | onEnded(entry); | 577 | onEnded(entry); |
| @@ -574,7 +580,7 @@ class WorldInfoTimedEffects { | |||
| 574 | } | 580 | } |
| 575 | 581 | ||
| 576 | buffer.push(entry); | 582 | buffer.push(entry); |
| 577 | console.log(`Timed effect "${type}" applied to entry`, entry); | 583 | console.log(`[WI] Timed effect "${type}" applied to entry`, entry); |
| 578 | } | 584 | } |
| 579 | } | 585 | } |
| 580 | 586 | ||
| @@ -590,7 +596,7 @@ class WorldInfoTimedEffects { | |||
| 590 | 596 | ||
| 591 | if (this.#chat.length < entry.delay) { | 597 | if (this.#chat.length < entry.delay) { |
| 592 | buffer.push(entry); | 598 | buffer.push(entry); |
| 593 | console.log('Timed effect "delay" applied to entry', entry); | 599 | console.log('[WI] Timed effect "delay" applied to entry', entry); |
| 594 | } | 600 | } |
| 595 | } | 601 | } |
| 596 | 602 | ||
| @@ -637,7 +643,7 @@ class WorldInfoTimedEffects { | |||
| 637 | const effect = this.#getEntryTimedEffect(type, entry, false); | 643 | const effect = this.#getEntryTimedEffect(type, entry, false); |
| 638 | chat_metadata.timedWorldInfo[type][key] = effect; | 644 | chat_metadata.timedWorldInfo[type][key] = effect; |
| 639 | 645 | ||
| 640 | console.log(`Adding ${type} entry ${key}: start=${effect.start}, end=${effect.end}, protected=${effect.protected}`); | 646 | console.log(`[WI] Adding ${type} entry ${key}: start=${effect.start}, end=${effect.end}, protected=${effect.protected}`); |
| 641 | } | 647 | } |
| 642 | } | 648 | } |
| 643 | 649 | ||
| @@ -669,7 +675,7 @@ class WorldInfoTimedEffects { | |||
| 669 | if (newState) { | 675 | if (newState) { |
| 670 | const effect = this.#getEntryTimedEffect(type, entry, false); | 676 | const effect = this.#getEntryTimedEffect(type, entry, false); |
| 671 | chat_metadata.timedWorldInfo[type][key] = effect; | 677 | chat_metadata.timedWorldInfo[type][key] = effect; |
| 672 | console.log(`Adding ${type} entry ${key}: start=${effect.start}, end=${effect.end}, protected=${effect.protected}`); | 678 | console.log(`[WI] Adding ${type} entry ${key}: start=${effect.start}, end=${effect.end}, protected=${effect.protected}`); |
| 673 | } | 679 | } |
| 674 | } | 680 | } |
| 675 | 681 | ||
| @@ -1216,7 +1222,7 @@ function registerWorldInfoSlashCommands() { | |||
| 1216 | enumTypes.enum, enumIcons.getDataTypeIcon(value.type))), | 1222 | enumTypes.enum, enumIcons.getDataTypeIcon(value.type))), |
| 1217 | 1223 | ||
| 1218 | /** All existing UIDs based on the file argument as world name */ | 1224 | /** All existing UIDs based on the file argument as world name */ |
| 1219 | wiUids: (/** @type {SlashCommandExecutor} */ executor) => { | 1225 | wiUids: (/** @type {import('./slash-commands/SlashCommandExecutor.js').SlashCommandExecutor} */ executor) => { |
| 1220 | const file = executor.namedArgumentList.find(it => it.name == 'file')?.value; | 1226 | const file = executor.namedArgumentList.find(it => it.name == 'file')?.value; |
| 1221 | if (file instanceof SlashCommandClosure) throw new Error('Argument \'file\' does not support closures'); | 1227 | if (file instanceof SlashCommandClosure) throw new Error('Argument \'file\' does not support closures'); |
| 1222 | // Try find world from cache | 1228 | // Try find world from cache |
| @@ -3162,7 +3168,8 @@ function duplicateWorldInfoEntry(data, uid) { | |||
| 3162 | } | 3168 | } |
| 3163 | 3169 | ||
| 3164 | // Exclude uid and gather the rest of the properties | 3170 | // Exclude uid and gather the rest of the properties |
| 3165 | const { uid: _, ...originalData } = data.entries[uid]; | 3171 | const originalData = Object.assign({}, data.entries[uid]); |
| 3172 | delete originalData.uid; | ||
| 3166 | 3173 | ||
| 3167 | // Create new entry and copy over data | 3174 | // Create new entry and copy over data |
| 3168 | const entry = createWorldInfoEntry(data.name, data); | 3175 | const entry = createWorldInfoEntry(data.name, data); |
| @@ -3420,13 +3427,12 @@ async function createNewWorldInfo(worldName, { interactive = false } = {}) { | |||
| 3420 | async function getCharacterLore() { | 3427 | async function getCharacterLore() { |
| 3421 | const character = characters[this_chid]; | 3428 | const character = characters[this_chid]; |
| 3422 | const name = character?.name; | 3429 | const name = character?.name; |
| 3430 | /** @type {Set<string>} */ | ||
| 3423 | let worldsToSearch = new Set(); | 3431 | let worldsToSearch = new Set(); |
| 3424 | 3432 | ||
| 3425 | const baseWorldName = character?.data?.extensions?.world; | 3433 | const baseWorldName = character?.data?.extensions?.world; |
| 3426 | if (baseWorldName) { | 3434 | if (baseWorldName) { |
| 3427 | worldsToSearch.add(baseWorldName); | 3435 | worldsToSearch.add(baseWorldName); |
| 3428 | } else { | ||
| 3429 | console.debug(`Character ${name}'s base world could not be found or is empty! Skipping...`); | ||
| 3430 | } | 3436 | } |
| 3431 | 3437 | ||
| 3432 | // TODO: Maybe make the utility function not use the window context? | 3438 | // TODO: Maybe make the utility function not use the window context? |
| @@ -3436,40 +3442,48 @@ async function getCharacterLore() { | |||
| 3436 | worldsToSearch = new Set([...worldsToSearch, ...extraCharLore.extraBooks]); | 3442 | worldsToSearch = new Set([...worldsToSearch, ...extraCharLore.extraBooks]); |
| 3437 | } | 3443 | } |
| 3438 | 3444 | ||
| 3445 | if (!worldsToSearch.size) { | ||
| 3446 | return []; | ||
| 3447 | } | ||
| 3448 | |||
| 3439 | let entries = []; | 3449 | let entries = []; |
| 3440 | for (const worldName of worldsToSearch) { | 3450 | for (const worldName of worldsToSearch) { |
| 3441 | if (selected_world_info.includes(worldName)) { | 3451 | if (selected_world_info.includes(worldName)) { |
| 3442 | console.debug(`Character ${name}'s world ${worldName} is already activated in global world info! Skipping...`); | 3452 | console.debug(`[WI] Character ${name}'s world ${worldName} is already activated in global world info! Skipping...`); |
| 3443 | continue; | 3453 | continue; |
| 3444 | } | 3454 | } |
| 3445 | 3455 | ||
| 3446 | if (chat_metadata[METADATA_KEY] === worldName) { | 3456 | if (chat_metadata[METADATA_KEY] === worldName) { |
| 3447 | console.debug(`Character ${name}'s world ${worldName} is already activated in chat lore! Skipping...`); | 3457 | console.debug(`[WI] Character ${name}'s world ${worldName} is already activated in chat lore! Skipping...`); |
| 3448 | continue; | 3458 | continue; |
| 3449 | } | 3459 | } |
| 3450 | 3460 | ||
| 3451 | const data = await loadWorldInfoData(worldName); | 3461 | const data = await loadWorldInfoData(worldName); |
| 3452 | const newEntries = data ? Object.keys(data.entries).map((x) => data.entries[x]).map(x => ({ ...x, world: worldName })) : []; | 3462 | const newEntries = data ? Object.keys(data.entries).map((x) => data.entries[x]).map(({ uid, ...rest }) => ({ uid, world: worldName, ...rest })) : []; |
| 3453 | entries = entries.concat(newEntries); | 3463 | 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 | } | ||
| 3454 | } | 3468 | } |
| 3455 | 3469 | ||
| 3456 | console.debug(`Character ${name} lore (${Array.from(worldsToSearch)}) has ${entries.length} world info entries`); | 3470 | console.debug(`[WI] Character ${name}'s lore has ${entries.length} world info entries`, [...worldsToSearch]); |
| 3457 | return entries; | 3471 | return entries; |
| 3458 | } | 3472 | } |
| 3459 | 3473 | ||
| 3460 | async function getGlobalLore() { | 3474 | async function getGlobalLore() { |
| 3461 | if (!selected_world_info) { | 3475 | if (!selected_world_info?.length) { |
| 3462 | return []; | 3476 | return []; |
| 3463 | } | 3477 | } |
| 3464 | 3478 | ||
| 3465 | let entries = []; | 3479 | let entries = []; |
| 3466 | for (const worldName of selected_world_info) { | 3480 | for (const worldName of selected_world_info) { |
| 3467 | const data = await loadWorldInfoData(worldName); | 3481 | const data = await loadWorldInfoData(worldName); |
| 3468 | const newEntries = data ? Object.keys(data.entries).map((x) => data.entries[x]).map(x => ({ ...x, world: worldName })) : []; | 3482 | const newEntries = data ? Object.keys(data.entries).map((x) => data.entries[x]).map(({ uid, ...rest }) => ({ uid, world: worldName, ...rest })) : []; |
| 3469 | entries = entries.concat(newEntries); | 3483 | entries = entries.concat(newEntries); |
| 3470 | } | 3484 | } |
| 3471 | 3485 | ||
| 3472 | console.debug(`Global world info has ${entries.length} entries`); | 3486 | console.debug(`[WI] Global world info has ${entries.length} entries`, selected_world_info); |
| 3473 | 3487 | ||
| 3474 | return entries; | 3488 | return entries; |
| 3475 | } | 3489 | } |
| @@ -3482,14 +3496,14 @@ async function getChatLore() { | |||
| 3482 | } | 3496 | } |
| 3483 | 3497 | ||
| 3484 | if (selected_world_info.includes(chatWorld)) { | 3498 | if (selected_world_info.includes(chatWorld)) { |
| 3485 | console.debug(`Chat world ${chatWorld} is already activated in global world info! Skipping...`); | 3499 | console.debug(`[WI] Chat world ${chatWorld} is already activated in global world info! Skipping...`); |
| 3486 | return []; | 3500 | return []; |
| 3487 | } | 3501 | } |
| 3488 | 3502 | ||
| 3489 | const data = await loadWorldInfoData(chatWorld); | 3503 | const data = await loadWorldInfoData(chatWorld); |
| 3490 | const entries = data ? Object.keys(data.entries).map((x) => data.entries[x]).map(x => ({ ...x, world: chatWorld })) : []; | 3504 | const entries = data ? Object.keys(data.entries).map((x) => data.entries[x]).map(({ uid, ...rest }) => ({ uid, world: chatWorld, ...rest })) : []; |
| 3491 | 3505 | ||
| 3492 | console.debug(`Chat lore has ${entries.length} entries`); | 3506 | console.debug(`[WI] Chat lore has ${entries.length} entries`, [chatWorld]); |
| 3493 | 3507 | ||
| 3494 | return entries; | 3508 | return entries; |
| 3495 | } | 3509 | } |
| @@ -3513,7 +3527,7 @@ export async function getSortedEntries() { | |||
| 3513 | entries = [...globalLore.sort(sortFn), ...characterLore.sort(sortFn)]; | 3527 | entries = [...globalLore.sort(sortFn), ...characterLore.sort(sortFn)]; |
| 3514 | break; | 3528 | break; |
| 3515 | default: | 3529 | default: |
| 3516 | console.error('Unknown WI insertion strategy: ', world_info_character_strategy, 'defaulting to evenly'); | 3530 | console.error('[WI] Unknown WI insertion strategy:', world_info_character_strategy, 'defaulting to evenly'); |
| 3517 | entries = [...globalLore, ...characterLore].sort(sortFn); | 3531 | entries = [...globalLore, ...characterLore].sort(sortFn); |
| 3518 | break; | 3532 | break; |
| 3519 | } | 3533 | } |
| @@ -3521,7 +3535,13 @@ export async function getSortedEntries() { | |||
| 3521 | // Chat lore always goes first | 3535 | // Chat lore always goes first |
| 3522 | entries = [...chatLore.sort(sortFn), ...entries]; | 3536 | entries = [...chatLore.sort(sortFn), ...entries]; |
| 3523 | 3537 | ||
| 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)); | ||
| 3525 | 3545 | ||
| 3526 | // Need to deep clone the entries to avoid modifying the cached data | 3546 | // Need to deep clone the entries to avoid modifying the cached data |
| 3527 | return structuredClone(entries); | 3547 | return structuredClone(entries); |
| @@ -3600,6 +3620,8 @@ async function checkWorldInfo(chat, maxContext, isDryRun) { | |||
| 3600 | const context = getContext(); | 3620 | const context = getContext(); |
| 3601 | const buffer = new WorldInfoBuffer(chat); | 3621 | const buffer = new WorldInfoBuffer(chat); |
| 3602 | 3622 | ||
| 3623 | console.debug(`[WI] --- START WI SCAN (on ${chat.length} messages) ---`); | ||
| 3624 | |||
| 3603 | // Combine the chat | 3625 | // Combine the chat |
| 3604 | 3626 | ||
| 3605 | // Add the depth or AN if enabled | 3627 | // Add the depth or AN if enabled |
| @@ -3623,11 +3645,11 @@ async function checkWorldInfo(chat, maxContext, isDryRun) { | |||
| 3623 | let budget = Math.round(world_info_budget * maxContext / 100) || 1; | 3645 | let budget = Math.round(world_info_budget * maxContext / 100) || 1; |
| 3624 | 3646 | ||
| 3625 | if (world_info_budget_cap > 0 && budget > world_info_budget_cap) { | 3647 | if (world_info_budget_cap > 0 && budget > world_info_budget_cap) { |
| 3626 | console.debug(`Budget ${budget} exceeds cap ${world_info_budget_cap}, using cap`); | 3648 | console.debug(`[WI] Budget ${budget} exceeds cap ${world_info_budget_cap}, using cap`); |
| 3627 | budget = world_info_budget_cap; | 3649 | budget = world_info_budget_cap; |
| 3628 | } | 3650 | } |
| 3629 | 3651 | ||
| 3630 | console.debug(`Context size: ${maxContext}; WI budget: ${budget} (max% = ${world_info_budget}%, cap = ${world_info_budget_cap})`); | 3652 | console.debug(`[WI] Context size: ${maxContext}; WI budget: ${budget} (max% = ${world_info_budget}%, cap = ${world_info_budget_cap})`); |
| 3631 | const sortedEntries = await getSortedEntries(); | 3653 | const sortedEntries = await getSortedEntries(); |
| 3632 | const timedEffects = new WorldInfoTimedEffects(chat, sortedEntries); | 3654 | const timedEffects = new WorldInfoTimedEffects(chat, sortedEntries); |
| 3633 | 3655 | ||
| @@ -3637,19 +3659,40 @@ async function checkWorldInfo(chat, maxContext, isDryRun) { | |||
| 3637 | return { worldInfoBefore: '', worldInfoAfter: '', WIDepthEntries: [], EMEntries: [], allActivatedEntries: new Set() }; | 3659 | return { worldInfoBefore: '', worldInfoAfter: '', WIDepthEntries: [], EMEntries: [], allActivatedEntries: new Set() }; |
| 3638 | } | 3660 | } |
| 3639 | 3661 | ||
| 3662 | console.debug(`[WI] --- SEARCHING ENTRIES (on ${sortedEntries.length} entries) ---`); | ||
| 3663 | |||
| 3640 | while (scanState) { | 3664 | while (scanState) { |
| 3641 | // Track how many times the loop has run. May be useful for debugging. | 3665 | // Track how many times the loop has run. May be useful for debugging. |
| 3642 | // eslint-disable-next-line no-unused-vars | ||
| 3643 | count++; | 3666 | count++; |
| 3644 | 3667 | ||
| 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 | ||
| 3645 | let activatedNow = new Set(); | 3674 | let activatedNow = new Set(); |
| 3646 | 3675 | ||
| 3647 | for (let entry of sortedEntries) { | 3676 | 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 | } | ||
| 3648 | 3686 | ||
| 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 | } | ||
| 3653 | 3696 | ||
| 3654 | // Check if this entry applies to the character or if it's excluded | 3697 | // Check if this entry applies to the character or if it's excluded |
| 3655 | if (entry.characterFilter && entry.characterFilter?.names?.length > 0) { | 3698 | if (entry.characterFilter && entry.characterFilter?.names?.length > 0) { |
| @@ -3657,7 +3700,7 @@ async function checkWorldInfo(chat, maxContext, isDryRun) { | |||
| 3657 | const filtered = entry.characterFilter.isExclude ? nameIncluded : !nameIncluded; | 3700 | const filtered = entry.characterFilter.isExclude ? nameIncluded : !nameIncluded; |
| 3658 | 3701 | ||
| 3659 | if (filtered) { | 3702 | if (filtered) { |
| 3660 | console.debug(`WI entry ${entry.uid} filtered out by character`); | 3703 | log('filtered out by character'); |
| 3661 | continue; | 3704 | continue; |
| 3662 | } | 3705 | } |
| 3663 | } | 3706 | } |
| @@ -3674,7 +3717,7 @@ async function checkWorldInfo(chat, maxContext, isDryRun) { | |||
| 3674 | const filtered = entry.characterFilter.isExclude ? includesTag : !includesTag; | 3717 | const filtered = entry.characterFilter.isExclude ? includesTag : !includesTag; |
| 3675 | 3718 | ||
| 3676 | if (filtered) { | 3719 | if (filtered) { |
| 3677 | console.debug(`WI entry ${entry.uid} filtered out by tag`); | 3720 | log('filtered out by tag'); |
| 3678 | continue; | 3721 | continue; |
| 3679 | } | 3722 | } |
| 3680 | } | 3723 | } |
| @@ -3686,198 +3729,253 @@ async function checkWorldInfo(chat, maxContext, isDryRun) { | |||
| 3686 | const isDelay = timedEffects.isEffectActive('delay', entry); | 3729 | const isDelay = timedEffects.isEffectActive('delay', entry); |
| 3687 | 3730 | ||
| 3688 | if (isDelay) { | 3731 | if (isDelay) { |
| 3689 | console.debug(`WI entry ${entry.uid} suppressed by delay`, entry); | 3732 | log('suppressed by delay'); |
| 3690 | continue; | 3733 | continue; |
| 3691 | } | 3734 | } |
| 3692 | 3735 | ||
| 3693 | if (isCooldown && !isSticky) { | 3736 | if (isCooldown && !isSticky) { |
| 3694 | console.debug(`WI entry ${entry.uid} suppressed by cooldown`, entry); | 3737 | log('suppressed by cooldown'); |
| 3695 | continue; | 3738 | continue; |
| 3696 | } | 3739 | } |
| 3697 | 3740 | ||
| 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'); | ||
| 3699 | continue; | 3744 | continue; |
| 3700 | } | 3745 | } |
| 3701 | 3746 | ||
| 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'); | ||
| 3703 | continue; | 3749 | continue; |
| 3704 | } | 3750 | } |
| 3705 | 3751 | ||
| 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); |
| 3709 | continue; | 3755 | continue; |
| 3710 | } | 3756 | } |
| 3711 | 3757 | ||
| 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'); |
| 3714 | continue; | 3760 | continue; |
| 3715 | } | 3761 | } |
| 3716 | 3762 | ||
| 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'); | ||
| 3719 | activatedNow.add(entry); | 3766 | activatedNow.add(entry); |
| 3720 | continue; | 3767 | continue; |
| 3721 | } | 3768 | } |
| 3722 | 3769 | ||
| 3723 | if (decorators.includes('@@dont_activate')) { | 3770 | if (buffer.isExternallyActivated(entry)) { |
| 3724 | //deactivate in any case if @@activate is not present | 3771 | log('externally activated'); |
| 3772 | activatedNow.add(entry); | ||
| 3725 | continue; | 3773 | continue; |
| 3726 | } | 3774 | } |
| 3727 | 3775 | ||
| 3728 | if (entry.constant || buffer.isExternallyActivated(entry) || isSticky) { | 3776 | if (isSticky) { |
| 3777 | log('activated because active sticky'); | ||
| 3729 | activatedNow.add(entry); | 3778 | activatedNow.add(entry); |
| 3730 | continue; | 3779 | continue; |
| 3731 | } | 3780 | } |
| 3732 | 3781 | ||
| 3782 | if (!Array.isArray(entry.key) || !entry.key.length) { | ||
| 3783 | log('has no keys defined, skipped'); | ||
| 3784 | continue; | ||
| 3785 | } | ||
| 3733 | 3786 | ||
| 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; | ||
| 3737 | |||
| 3738 | primary: for (let key of entry.key) { | ||
| 3739 | const substituted = substituteParams(key); | ||
| 3740 | const textToScan = buffer.get(entry, scanState); | ||
| 3741 | |||
| 3742 | if (substituted && buffer.matchKeys(textToScan, substituted.trim(), entry)) { | ||
| 3743 | console.debug(`WI UID ${entry.uid} found by primary match: ${substituted}.`); | ||
| 3744 | |||
| 3745 | //selective logic begins | ||
| 3746 | if ( | ||
| 3747 | entry.selective && //all entries are selective now | ||
| 3748 | Array.isArray(entry.keysecondary) && //always true | ||
| 3749 | entry.keysecondary.length //ignore empties | ||
| 3750 | ) { | ||
| 3751 | console.debug(`WI UID:${entry.uid} found. Checking logic: ${entry.selectiveLogic}`); | ||
| 3752 | let hasAnyMatch = false; | ||
| 3753 | let hasAllMatch = true; | ||
| 3754 | secondary: for (let keysecondary of entry.keysecondary) { | ||
| 3755 | const secondarySubstituted = substituteParams(keysecondary); | ||
| 3756 | 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 | } | ||
| 3762 | |||
| 3763 | if (!hasSecondaryMatch) { | ||
| 3764 | hasAllMatch = false; | ||
| 3765 | } | ||
| 3766 | |||
| 3767 | // Simplified AND ANY / NOT ALL if statement. (Proper fix for PR#1356 by Bronya) | ||
| 3768 | // If AND ANY logic and the main checks pass OR if NOT ALL logic and the main checks do not pass | ||
| 3769 | if ((selectiveLogic === world_info_logic.AND_ANY && hasSecondaryMatch) || (selectiveLogic === world_info_logic.NOT_ALL && !hasSecondaryMatch)) { | ||
| 3770 | // Differ both logic statements in the debugger | ||
| 3771 | if (selectiveLogic === world_info_logic.AND_ANY) { | ||
| 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}`); | ||
| 3775 | } | ||
| 3776 | activatedNow.add(entry); | ||
| 3777 | break secondary; | ||
| 3778 | } | ||
| 3779 | } | ||
| 3780 | 3789 | ||
| 3781 | // Handle NOT ANY logic | 3790 | // PRIMARY KEYWORDS |
| 3782 | if (selectiveLogic === world_info_logic.NOT_ANY && !hasAnyMatch) { | 3791 | let primaryKeyMatch = entry.key.find(key => { |
| 3783 | console.debug(`(NOT ANY Check) Activating WI Entry ${entry.uid}, no secondary keywords found.`); | 3792 | const substituted = substituteParams(key); |
| 3784 | activatedNow.add(entry); | 3793 | return substituted && buffer.matchKeys(textToScan, substituted.trim(), entry); |
| 3785 | } | 3794 | }); |
| 3786 | 3795 | ||
| 3787 | // Handle AND ALL logic | 3796 | if (!primaryKeyMatch) { |
| 3788 | if (selectiveLogic === world_info_logic.AND_ALL && hasAllMatch) { | 3797 | // Don't write logs for simple no-matches |
| 3789 | console.debug(`(AND ALL Check) Activating WI Entry ${entry.uid}, all secondary keywords found.`); | 3798 | continue; |
| 3790 | activatedNow.add(entry); | 3799 | } |
| 3791 | } | 3800 | |
| 3792 | } else { | 3801 | const hasSecondaryKeywords = ( |
| 3793 | // Handle cases where secondary is empty | 3802 | entry.selective && //all entries are selective now |
| 3794 | console.debug(`WI UID ${entry.uid}: Activated without filter logic.`); | 3803 | Array.isArray(entry.keysecondary) && //always true |
| 3795 | activatedNow.add(entry); | 3804 | entry.keysecondary.length //ignore empties |
| 3796 | break primary; | 3805 | ); |
| 3797 | } | 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() { | ||
| 3821 | let hasAnyMatch = false; | ||
| 3822 | let hasAllMatch = true; | ||
| 3823 | for (let keysecondary of entry.keysecondary) { | ||
| 3824 | const secondarySubstituted = substituteParams(keysecondary); | ||
| 3825 | const hasSecondaryMatch = secondarySubstituted && buffer.matchKeys(textToScan, secondarySubstituted.trim(), entry); | ||
| 3826 | |||
| 3827 | if (hasSecondaryMatch) hasAnyMatch = true; | ||
| 3828 | if (!hasSecondaryMatch) hasAllMatch = false; | ||
| 3829 | |||
| 3830 | // Simplified AND ANY / NOT ALL if statement. (Proper fix for PR#1356 by Bronya) | ||
| 3831 | // If AND ANY logic and the main checks pass OR if NOT ALL logic and the main checks do not pass | ||
| 3832 | if (selectiveLogic === world_info_logic.AND_ANY && hasSecondaryMatch) { | ||
| 3833 | log('activated. (AND ANY) Found match secondary keyword', secondarySubstituted); | ||
| 3834 | return true; | ||
| 3835 | } | ||
| 3836 | if (selectiveLogic === world_info_logic.NOT_ALL && !hasSecondaryMatch) { | ||
| 3837 | log('activated. (NOT ALL) Found not matching secondary keyword', secondarySubstituted); | ||
| 3838 | return true; | ||
| 3798 | } | 3839 | } |
| 3799 | } | 3840 | } |
| 3841 | |||
| 3842 | // Handle NOT ANY logic | ||
| 3843 | if (selectiveLogic === world_info_logic.NOT_ANY && !hasAnyMatch) { | ||
| 3844 | log('activated. (NOT ANY) No secondary keywords found', entry.keysecondary); | ||
| 3845 | return true; | ||
| 3846 | } | ||
| 3847 | |||
| 3848 | // Handle AND ALL logic | ||
| 3849 | if (selectiveLogic === world_info_logic.AND_ALL && hasAllMatch) { | ||
| 3850 | log('activated. (AND ALL) All secondary keywords found', entry.keysecondary); | ||
| 3851 | return true; | ||
| 3852 | } | ||
| 3853 | |||
| 3854 | return false; | ||
| 3800 | } | 3855 | } |
| 3856 | |||
| 3857 | const matched = matchSecondaryKeys(); | ||
| 3858 | if (!matched) { | ||
| 3859 | log('skipped. Secondary keywords not satisfied', entry.keysecondary); | ||
| 3860 | continue; | ||
| 3861 | } | ||
| 3862 | |||
| 3863 | // Success logging was already done inside the function, so just add the entry | ||
| 3864 | activatedNow.add(entry); | ||
| 3865 | continue; | ||
| 3801 | } | 3866 | } |
| 3802 | 3867 | ||
| 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.`); |
| 3804 | const newEntries = [...activatedNow] | 3869 | const newEntries = [...activatedNow] |
| 3805 | .sort((a, b) => sortedEntries.indexOf(a) - sortedEntries.indexOf(b)); | 3870 | .sort((a, b) => sortedEntries.indexOf(a) - sortedEntries.indexOf(b)); |
| 3806 | let newContent = ''; | 3871 | let newContent = ''; |
| 3807 | const textToScanTokens = await getTokenCountAsync(allActivatedText); | 3872 | const textToScanTokens = await getTokenCountAsync(allActivatedText); |
| 3808 | const probabilityChecksBefore = failedProbabilityChecks.size; | ||
| 3809 | 3873 | ||
| 3810 | filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanState); | 3874 | filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanState); |
| 3811 | 3875 | ||
| 3812 | console.debug('-- PROBABILITY CHECKS BEGIN --'); | 3876 | console.debug('[WI] --- PROBABILITY CHECKS ---'); |
| 3813 | for (const entry of newEntries) { | 3877 | 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 | } | ||
| 3815 | 3884 | ||
| 3816 | if (entry.useProbability && rollValue > entry.probability) { | ||
| 3817 | const isSticky = timedEffects.isEffectActive('sticky', entry); | 3885 | const isSticky = timedEffects.isEffectActive('sticky', entry); |
| 3818 | if (!isSticky) { | 3886 | if (isSticky) { |
| 3819 | console.debug(`WI entry ${entry.uid} ${entry.key} failed probability check, skipping`); | 3887 | console.debug(`WI entry ${entry.uid} is sticky, does not need to re-roll probability`); |
| 3820 | failedProbabilityChecks.add(entry); | 3888 | return true; |
| 3821 | continue; | 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; | ||
| 3822 | } | 3895 | } |
| 3823 | } else { console.debug(`uid:${entry.uid} passed probability check, inserting to prompt`); } | 3896 | |
| 3897 | 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); | ||
| 3904 | continue; | ||
| 3905 | } | ||
| 3824 | 3906 | ||
| 3825 | // Substitute macros inline, for both this checking and also future processing | 3907 | // Substitute macros inline, for both this checking and also future processing |
| 3826 | entry.content = substituteParams(entry.content); | 3908 | entry.content = substituteParams(entry.content); |
| 3827 | newContent += `${entry.content}\n`; | 3909 | newContent += `${entry.content}\n`; |
| 3828 | 3910 | ||
| 3829 | if ((textToScanTokens + (await getTokenCountAsync(newContent))) >= budget) { | 3911 | if ((textToScanTokens + (await getTokenCountAsync(newContent))) >= budget) { |
| 3830 | console.debug('WI budget reached, stopping'); | ||
| 3831 | if (world_info_overflow_alert) { | 3912 | if (world_info_overflow_alert) { |
| 3832 | console.log('Alerting'); | 3913 | console.warn(`[WI] budget of ${budget} reached, stopping after ${allActivatedEntries.size} entries`); |
| 3833 | toastr.warning(`World info budget reached after ${allActivatedEntries.size} entries.`, 'World Info'); | 3914 | 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`); | ||
| 3834 | } | 3917 | } |
| 3835 | scanState = scan_state.NONE; | ||
| 3836 | token_budget_overflowed = true; | 3918 | token_budget_overflowed = true; |
| 3837 | break; | 3919 | break; |
| 3838 | } | 3920 | } |
| 3839 | 3921 | ||
| 3840 | allActivatedEntries.add(entry); | 3922 | allActivatedEntries.add(entry); |
| 3841 | console.debug('WI entry activated:', entry); | 3923 | console.debug(`[WI] Entry ${entry.uid} activation successful, adding to prompt`, entry); |
| 3842 | } | 3924 | } |
| 3843 | 3925 | ||
| 3844 | const probabilityChecksAfter = failedProbabilityChecks.size; | 3926 | const successfulNewEntries = newEntries.filter(x => !failedProbabilityChecks.has(x)); |
| 3927 | const successfulNewEntriesForRecursion = successfulNewEntries.filter(x => !x.preventRecursion); | ||
| 3845 | 3928 | ||
| 3846 | if ((probabilityChecksAfter - probabilityChecksBefore) === activatedNow.size) { | 3929 | if (!newEntries.length) { |
| 3847 | console.debug('WI probability checks failed for all activated entries, stopping'); | 3930 | console.debug('[WI] No new entries activated, 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); | ||
| 3849 | } | 3935 | } |
| 3850 | 3936 | ||
| 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) { |
| 3853 | scanState = scan_state.NONE; | 3939 | nextScanState = scan_state.RECURSION; |
| 3854 | } | 3940 | } |
| 3855 | 3941 | ||
| 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); | ||
| 3863 | } | 3946 | } |
| 3864 | 3947 | ||
| 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); |
| 3867 | if (world_info_min_activations > 0 && (allActivatedEntries.size < world_info_min_activations)) { | 3950 | if (!nextScanState && !token_budget_overflowed && minActivationsNotSatisfied) { |
| 3868 | let over_max = ( | 3951 | console.debug('[WI] --- MIN ACTIVATIONS CHECK ---'); |
| 3869 | world_info_min_activations_depth_max > 0 && | ||
| 3870 | buffer.getDepth() > world_info_min_activations_depth_max | ||
| 3871 | ) || (buffer.getDepth() > chat.length); | ||
| 3872 | 3952 | ||
| 3873 | if (!over_max) { | 3953 | let over_max = ( |
| 3874 | scanState = scan_state.MIN_ACTIVATIONS; // loop | 3954 | world_info_min_activations_depth_max > 0 && |
| 3875 | buffer.advanceScanPosition(); | 3955 | buffer.getDepth() > world_info_min_activations_depth_max |
| 3876 | } | 3956 | ) || (buffer.getDepth() > chat.length); |
| 3957 | |||
| 3958 | if (!over_max) { | ||
| 3959 | console.debug(`[WI] Min activations not reached (${allActivatedEntries.size}/${world_info_min_activations}), advancing depth to ${buffer.getDepth() + 1} and checking again`); | ||
| 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`); | ||
| 3877 | } | 3964 | } |
| 3878 | } | 3965 | } |
| 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); | ||
| 3974 | } | ||
| 3879 | } | 3975 | } |
| 3880 | 3976 | ||
| 3977 | console.debug('[WI] --- BUILDING PROMPT ---'); | ||
| 3978 | |||
| 3881 | // Forward-sorted list of entries for joining | 3979 | // Forward-sorted list of entries for joining |
| 3882 | const WIBeforeEntries = []; | 3980 | const WIBeforeEntries = []; |
| 3883 | const WIAfterEntries = []; | 3981 | const WIAfterEntries = []; |
| @@ -3893,7 +3991,7 @@ async function checkWorldInfo(chat, maxContext, isDryRun) { | |||
| 3893 | const content = getRegexedString(entry.content, regex_placement.WORLD_INFO, { depth: regexDepth, isMarkdown: false, isPrompt: true }); | 3991 | const content = getRegexedString(entry.content, regex_placement.WORLD_INFO, { depth: regexDepth, isMarkdown: false, isPrompt: true }); |
| 3894 | 3992 | ||
| 3895 | if (!content) { | 3993 | if (!content) { |
| 3896 | console.debug('Skipping adding WI entry to prompt due to empty content:', entry); | 3994 | console.debug(`[WI] Entry ${entry.uid}`, 'skipped adding to prompt due to empty content', entry); |
| 3897 | return; | 3995 | return; |
| 3898 | } | 3996 | } |
| 3899 | 3997 | ||
| @@ -3951,6 +4049,9 @@ async function checkWorldInfo(chat, maxContext, isDryRun) { | |||
| 3951 | buffer.resetExternalEffects(); | 4049 | buffer.resetExternalEffects(); |
| 3952 | timedEffects.cleanUp(); | 4050 | timedEffects.cleanUp(); |
| 3953 | 4051 | ||
| 4052 | console.log(`[WI] Adding ${allActivatedEntries.size} entries to prompt`, Array.from(allActivatedEntries)); | ||
| 4053 | console.debug('[WI] --- DONE ---'); | ||
| 4054 | |||
| 3954 | return { worldInfoBefore, worldInfoAfter, EMEntries, WIDepthEntries, allActivatedEntries }; | 4055 | return { worldInfoBefore, worldInfoAfter, EMEntries, WIDepthEntries, allActivatedEntries }; |
| 3955 | } | 4056 | } |
| 3956 | 4057 | ||
| @@ -3965,13 +4066,13 @@ function filterGroupsByScoring(groups, buffer, removeEntry, scanState) { | |||
| 3965 | for (const [key, group] of Object.entries(groups)) { | 4066 | for (const [key, group] of Object.entries(groups)) { |
| 3966 | // Group scoring is disabled both globally and for the group entries | 4067 | // Group scoring is disabled both globally and for the group entries |
| 3967 | if (!world_info_use_group_scoring && !group.some(x => x.useGroupScoring)) { | 4068 | if (!world_info_use_group_scoring && !group.some(x => x.useGroupScoring)) { |
| 3968 | console.debug(`Skipping group scoring for group '${key}'`); | 4069 | console.debug(`[WI] Skipping group scoring for group '${key}'`); |
| 3969 | continue; | 4070 | continue; |
| 3970 | } | 4071 | } |
| 3971 | 4072 | ||
| 3972 | const scores = group.map(entry => buffer.getScore(entry, scanState)); | 4073 | const scores = group.map(entry => buffer.getScore(entry, scanState)); |
| 3973 | const maxScore = Math.max(...scores); | 4074 | const maxScore = Math.max(...scores); |
| 3974 | console.debug(`Group '${key}' max score: ${maxScore}`); | 4075 | console.debug(`[WI] Group '${key}' max score:`, maxScore); |
| 3975 | //console.table(group.map((entry, i) => ({ uid: entry.uid, key: JSON.stringify(entry.key), score: scores[i] }))); | 4076 | //console.table(group.map((entry, i) => ({ uid: entry.uid, key: JSON.stringify(entry.key), score: scores[i] }))); |
| 3976 | 4077 | ||
| 3977 | for (let i = 0; i < group.length; i++) { | 4078 | for (let i = 0; i < group.length; i++) { |
| @@ -3982,7 +4083,7 @@ function filterGroupsByScoring(groups, buffer, removeEntry, scanState) { | |||
| 3982 | } | 4083 | } |
| 3983 | 4084 | ||
| 3984 | if (scores[i] < maxScore) { | 4085 | if (scores[i] < maxScore) { |
| 3985 | console.debug(`Removing score loser from inclusion group '${key}' entry '${group[i].uid}'`, group[i]); | 4086 | console.debug(`[WI] Entry ${group[i].uid}`, `removed as score loser from inclusion group '${key}'`, group[i]); |
| 3986 | removeEntry(group[i]); | 4087 | removeEntry(group[i]); |
| 3987 | group.splice(i, 1); | 4088 | group.splice(i, 1); |
| 3988 | scores.splice(i, 1); | 4089 | scores.splice(i, 1); |
| @@ -4000,7 +4101,8 @@ function filterGroupsByScoring(groups, buffer, removeEntry, scanState) { | |||
| 4000 | * @param {number} scanState The current scan state | 4101 | * @param {number} scanState The current scan state |
| 4001 | */ | 4102 | */ |
| 4002 | function filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanState) { | 4103 | function filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanState) { |
| 4003 | console.debug('-- INCLUSION GROUP CHECKS BEGIN --'); | 4104 | console.debug('[WI] --- INCLUSION GROUP CHECKS ---'); |
| 4105 | |||
| 4004 | const grouped = newEntries.filter(x => x.group).reduce((acc, item) => { | 4106 | const grouped = newEntries.filter(x => x.group).reduce((acc, item) => { |
| 4005 | item.group.split(/,\s*/).filter(x => x).forEach(group => { | 4107 | item.group.split(/,\s*/).filter(x => x).forEach(group => { |
| 4006 | if (!acc[group]) { | 4108 | if (!acc[group]) { |
| @@ -4012,7 +4114,7 @@ function filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanSt | |||
| 4012 | }, {}); | 4114 | }, {}); |
| 4013 | 4115 | ||
| 4014 | if (Object.keys(grouped).length === 0) { | 4116 | if (Object.keys(grouped).length === 0) { |
| 4015 | console.debug('No inclusion groups found'); | 4117 | console.debug('[WI] No inclusion groups found'); |
| 4016 | return; | 4118 | return; |
| 4017 | } | 4119 | } |
| 4018 | 4120 | ||
| @@ -4023,7 +4125,7 @@ function filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanSt | |||
| 4023 | continue; | 4125 | continue; |
| 4024 | } | 4126 | } |
| 4025 | 4127 | ||
| 4026 | if (logging) console.debug(`Removing loser from inclusion group '${entry.group}' entry '${entry.uid}'`, entry); | 4128 | if (logging) console.debug(`[WI] Entry ${entry.uid}`, `removed as loser from inclusion group '${entry.group}'`, entry); |
| 4027 | removeEntry(entry); | 4129 | removeEntry(entry); |
| 4028 | } | 4130 | } |
| 4029 | } | 4131 | } |
| @@ -4031,24 +4133,24 @@ function filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanSt | |||
| 4031 | filterGroupsByScoring(grouped, buffer, removeEntry, scanState); | 4133 | filterGroupsByScoring(grouped, buffer, removeEntry, scanState); |
| 4032 | 4134 | ||
| 4033 | for (const [key, group] of Object.entries(grouped)) { | 4135 | for (const [key, group] of Object.entries(grouped)) { |
| 4034 | console.debug(`Checking inclusion group '${key}' with ${group.length} entries`, group); | 4136 | console.debug(`[WI] Checking inclusion group '${key}' with ${group.length} entries`, group); |
| 4035 | 4137 | ||
| 4036 | if (Array.from(allActivatedEntries).some(x => x.group === key)) { | 4138 | if (Array.from(allActivatedEntries).some(x => x.group === key)) { |
| 4037 | console.debug(`Skipping inclusion group check, group already activated '${key}'`); | 4139 | console.debug(`[WI] Skipping inclusion group check, group '${key}' was already activated`); |
| 4038 | // We need to forcefully deactivate all other entries in the group | 4140 | // We need to forcefully deactivate all other entries in the group |
| 4039 | removeAllBut(group, null, false); | 4141 | removeAllBut(group, null, false); |
| 4040 | continue; | 4142 | continue; |
| 4041 | } | 4143 | } |
| 4042 | 4144 | ||
| 4043 | if (!Array.isArray(group) || group.length <= 1) { | 4145 | if (!Array.isArray(group) || group.length <= 1) { |
| 4044 | console.debug('Skipping inclusion group check, only one entry'); | 4146 | console.debug('[WI] Skipping inclusion group check, only one entry'); |
| 4045 | continue; | 4147 | continue; |
| 4046 | } | 4148 | } |
| 4047 | 4149 | ||
| 4048 | // Check for group prio | 4150 | // Check for group prio |
| 4049 | const prios = group.filter(x => x.groupOverride).sort(sortFn); | 4151 | const prios = group.filter(x => x.groupOverride).sort(sortFn); |
| 4050 | if (prios.length) { | 4152 | if (prios.length) { |
| 4051 | console.debug(`Activated inclusion group '${key}' with by prio winner entry '${prios[0].uid}'`, prios[0]); | 4153 | console.debug(`[WI] Entry ${prios[0].uid}`, `activated as prio winner from inclusion group '${key}'`, prios[0]); |
| 4052 | removeAllBut(group, prios[0]); | 4154 | removeAllBut(group, prios[0]); |
| 4053 | continue; | 4155 | continue; |
| 4054 | } | 4156 | } |
| @@ -4063,14 +4165,14 @@ function filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanSt | |||
| 4063 | currentWeight += (entry.groupWeight ?? DEFAULT_WEIGHT); | 4165 | currentWeight += (entry.groupWeight ?? DEFAULT_WEIGHT); |
| 4064 | 4166 | ||
| 4065 | if (rollValue <= currentWeight) { | 4167 | if (rollValue <= currentWeight) { |
| 4066 | console.debug(`Activated inclusion group '${key}' with roll winner entry '${entry.uid}'`, entry); | 4168 | console.debug(`[WI] Entry ${entry.uid}`, `activated as roll winner from inclusion group '${key}'`, entry); |
| 4067 | winner = entry; | 4169 | winner = entry; |
| 4068 | break; | 4170 | break; |
| 4069 | } | 4171 | } |
| 4070 | } | 4172 | } |
| 4071 | 4173 | ||
| 4072 | if (!winner) { | 4174 | if (!winner) { |
| 4073 | console.debug(`Failed to activate inclusion group '${key}', no winner found`); | 4175 | console.debug(`[WI] Failed to activate inclusion group '${key}', no winner found`); |
| 4074 | continue; | 4176 | continue; |
| 4075 | } | 4177 | } |
| 4076 | 4178 | ||
| @@ -4401,8 +4503,9 @@ function onWorldInfoChange(args, text) { | |||
| 4401 | $('#world_info').val(null).trigger('change'); | 4503 | $('#world_info').val(null).trigger('change'); |
| 4402 | } | 4504 | } |
| 4403 | } else { //if it's a pointer selection | 4505 | } else { //if it's a pointer selection |
| 4404 | let tempWorldInfo = []; | 4506 | const 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)); | ||
| 4406 | if (selectedWorlds.length > 0) { | 4509 | if (selectedWorlds.length > 0) { |
| 4407 | selectedWorlds.forEach((worldIndex) => { | 4510 | selectedWorlds.forEach((worldIndex) => { |
| 4408 | const existingWorldName = world_names[worldIndex]; | 4511 | const existingWorldName = world_names[worldIndex]; |
| @@ -3910,6 +3910,8 @@ input[type="range"]::-webkit-slider-thumb { | |||
| 3910 | outline: none; | 3910 | outline: none; |
| 3911 | background-color: var(--black50a); | 3911 | background-color: var(--black50a); |
| 3912 | line-height: calc(var(--mainFontSize) + .25rem); | 3912 | line-height: calc(var(--mainFontSize) + .25rem); |
| 3913 | max-height: 75vh; | ||
| 3914 | max-height: 75dvh; | ||
| 3913 | } | 3915 | } |
| 3914 | 3916 | ||
| 3915 | #anchor_order { | 3917 | #anchor_order { |