Merge staging
| @@ -1,23 +1,85 @@ | ||
| 1 | 1 | { |
| 2 | 2 | "temp": 1.68, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.17, |
| 4 | 5 | "top_k": 77, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0.42, |
| 7 | 7 | "tfs": 0.97, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.02, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 0.7, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.92, |
| 4 | 5 | "top_k": 150, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | 10 | "rep_pentypical_p": 4.51, |
| 11 | + "min_p": 0, | |
| 12 | + "rep_pen": 3, | |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 2, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 10, |
| 15 | 19 | "length_penalty": 1.4, |
| 16 | 20 | "min_length": 200, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 0.87, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.99, |
| 4 | 5 | "top_k": 85, |
| 5 | - "typical_p": 0.68, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 0.68, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 0.68, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.01, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 1, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 1, |
| 4 | 5 | "top_k": 4, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0.6, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": false, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 0.7, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.5, |
| 4 | 5 | "top_k": 40, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.2, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 0, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0, |
| 4 | 5 | "top_k": 1, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.18, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": false, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 1.31, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.14, |
| 4 | 5 | "top_k": 49, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0.52, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 1.49, |
| 9 | 9 | "eta_cutoff": 10.42, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.17, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 0.7, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.5, |
| 4 | 5 | "top_k": 0, |
| 5 | - "typical_p": 0.19, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 0.19, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.1, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 0.66, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 1, |
| 4 | 5 | "top_k": 0, |
| 5 | - "typical_p": 0.6, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 0.6, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.1, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 0.7, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.1, |
| 4 | 5 | "top_k": 40, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.18, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 200, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 0.98, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.37, |
| 4 | 5 | "top_k": 100, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.18, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 1.06, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 1, |
| 4 | 5 | "top_k": 0, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 2, |
| 21 | 42 | "mirostat_tau": 9.61, |
| 22 | 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 | 84 | "rep_pen_size": 0 |
| 24 | 85 | } |
| @@ -1,24 +1,85 @@ | ||
| 1 | 1 | { |
| 2 | 2 | "temp": 1.17, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 1, |
| 4 | 5 | "top_k": 0, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 2, |
| 21 | 42 | "mirostat_tau": 9.91, |
| 22 | 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 | 84 | "rep_pen_size": 0 |
| 24 | 85 | } |
| @@ -1,24 +1,85 @@ | ||
| 1 | 1 | { |
| 2 | 2 | "temp": 1.17, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 1, |
| 4 | 5 | "top_k": 0, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 2, |
| 21 | 42 | "mirostat_tau": 9.62, |
| 22 | 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 | 84 | "rep_pen_size": 0 |
| 24 | 85 | } |
| @@ -1,23 +1,85 @@ | ||
| 1 | 1 | { |
| 2 | 2 | "temp": 1, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 1, |
| 4 | 5 | "top_k": 0, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 2, |
| 21 | 42 | "mirostat_tau": 8, |
| 22 | 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 | 2 | "temp": 0.7, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.85, |
| 4 | 5 | "top_k": 50, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 0.8, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.9, |
| 4 | 5 | "top_k": 100, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.15, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 1.99, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 1, |
| 4 | 5 | "top_k": 100, |
| 5 | - "typical_p": 0.97, | |
| 6 | - "rep_pen": 1, | |
| 7 | 6 | "top_a": 0, |
| 8 | 7 | "tfs": 1, |
| 9 | 8 | "epsilon_cutoff": 0, |
| 10 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 0.97, | |
| 11 | + "min_p": 0, | |
| 12 | + "rep_pen": 1, | |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 0.63, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.98, |
| 4 | 5 | "top_k": 0, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.05, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 1.99, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.85, |
| 4 | 5 | "top_k": 12, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.15, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 1.07, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 1, |
| 4 | 5 | "top_k": 100, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.05, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 0.44, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 1, |
| 4 | 5 | "top_k": 0, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.15, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 1.99, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.18, |
| 4 | 5 | "top_k": 30, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.15, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 0.72, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.73, |
| 4 | 5 | "top_k": 0, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.1, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 1.53, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.64, |
| 4 | 5 | "top_k": 33, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0.04, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.07, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 0.7, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.9, |
| 4 | 5 | "top_k": 20, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.15, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 1.31, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.29, |
| 4 | 5 | "top_k": 72, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.09, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 0.02, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.95, |
| 4 | 5 | "top_k": 50, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 0.7, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 1, |
| 4 | 5 | "top_k": 0, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0.2, |
| 7 | 7 | "tfs": 0.95, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.15, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 1.01, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.21, |
| 4 | 5 | "top_k": 91, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0.75, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 10.78, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.21, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1.07, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 11 | "min_p": 0.1, |
| 12 | 12 | "rep_pen": 1, |
| 13 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 14 | 16 | "no_repeat_ngram_size": 0, |
| 15 | 17 | "penalty_alpha": 0, |
| 16 | 18 | "num_beams": 1, |
| @@ -19,24 +21,56 @@ | ||
| 19 | 21 | "encoder_rep_pen": 1, |
| 20 | 22 | "freq_pen": 0, |
| 21 | 23 | "presence_pen": 0, |
| 24 | + "skew": 0, | |
| 22 | 25 | "do_sample": true, |
| 23 | 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 | 38 | "add_bos_token": true, |
| 25 | - "truncation_length": 2048, | |
| 26 | 39 | "ban_eos_token": false, |
| 27 | 40 | "skip_special_tokens": true, |
| 28 | - "streaming": true, | |
| 29 | 41 | "mirostat_mode": 0, |
| 30 | 42 | "mirostat_tau": 5, |
| 31 | 43 | "mirostat_eta": 0.1, |
| 32 | 44 | "guidance_scale": 1, |
| 33 | 45 | "negative_prompt": "", |
| 34 | 46 | "grammar_string": "", |
| 47 | + "json_schema": {}, | |
| 35 | 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 | 71 | "ignore_eos_token": false, |
| 37 | 72 | "spaces_between_special_tokens": true, |
| 38 | 73 | "typespeculative_ngram": "ooba"false, |
| 39 | - "legacy_api": false, | |
| 40 | 74 | "sampler_order": [ |
| 41 | 75 | 5, |
| 42 | 76 | 6, |
| @@ -46,5 +80,6 @@ | ||
| 46 | 80 | 3, |
| 47 | 81 | 4 |
| 48 | 82 | ], |
| 83 | + "logit_bias": [], | |
| 49 | 84 | "rep_pen_size": 0 |
| 50 | 85 | } |
| @@ -11,6 +11,8 @@ | ||
| 11 | 11 | "min_p": 0.1, |
| 12 | 12 | "rep_pen": 1, |
| 13 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 14 | 16 | "no_repeat_ngram_size": 0, |
| 15 | 17 | "penalty_alpha": 0, |
| 16 | 18 | "num_beams": 1, |
| @@ -19,24 +21,56 @@ | ||
| 19 | 21 | "encoder_rep_pen": 1, |
| 20 | 22 | "freq_pen": 0, |
| 21 | 23 | "presence_pen": 0, |
| 24 | + "skew": 0, | |
| 22 | 25 | "do_sample": true, |
| 23 | 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 | 38 | "add_bos_token": true, |
| 25 | - "truncation_length": 2048, | |
| 26 | 39 | "ban_eos_token": false, |
| 27 | 40 | "skip_special_tokens": true, |
| 28 | - "streaming": true, | |
| 29 | 41 | "mirostat_mode": 0, |
| 30 | 42 | "mirostat_tau": 5, |
| 31 | 43 | "mirostat_eta": 0.1, |
| 32 | 44 | "guidance_scale": 1, |
| 33 | 45 | "negative_prompt": "", |
| 34 | 46 | "grammar_string": "", |
| 47 | + "json_schema": {}, | |
| 35 | 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 | 71 | "ignore_eos_token": false, |
| 37 | 72 | "spaces_between_special_tokens": true, |
| 38 | 73 | "typespeculative_ngram": "ooba"false, |
| 39 | - "legacy_api": false, | |
| 40 | 74 | "sampler_order": [ |
| 41 | 75 | 5, |
| 42 | 76 | 6, |
| @@ -46,5 +80,6 @@ | ||
| 46 | 80 | 3, |
| 47 | 81 | 4 |
| 48 | 82 | ], |
| 83 | + "logit_bias": [], | |
| 49 | 84 | "rep_pen_size": 0 |
| 50 | 85 | } |
| @@ -11,6 +11,8 @@ | ||
| 11 | 11 | "min_p": 0.1, |
| 12 | 12 | "rep_pen": 1, |
| 13 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 14 | 16 | "no_repeat_ngram_size": 0, |
| 15 | 17 | "penalty_alpha": 0, |
| 16 | 18 | "num_beams": 1, |
| @@ -19,24 +21,56 @@ | ||
| 19 | 21 | "encoder_rep_pen": 1, |
| 20 | 22 | "freq_pen": 0, |
| 21 | 23 | "presence_pen": 0, |
| 24 | + "skew": 0, | |
| 22 | 25 | "do_sample": true, |
| 23 | 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 | 38 | "add_bos_token": true, |
| 25 | - "truncation_length": 2048, | |
| 26 | 39 | "ban_eos_token": false, |
| 27 | 40 | "skip_special_tokens": true, |
| 28 | - "streaming": true, | |
| 29 | 41 | "mirostat_mode": 0, |
| 30 | 42 | "mirostat_tau": 5, |
| 31 | 43 | "mirostat_eta": 0.1, |
| 32 | 44 | "guidance_scale": 1, |
| 33 | 45 | "negative_prompt": "", |
| 34 | 46 | "grammar_string": "", |
| 47 | + "json_schema": {}, | |
| 35 | 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 | 71 | "ignore_eos_token": false, |
| 37 | 72 | "spaces_between_special_tokens": true, |
| 38 | 73 | "typespeculative_ngram": "ooba"false, |
| 39 | - "legacy_api": false, | |
| 40 | 74 | "sampler_order": [ |
| 41 | 75 | 5, |
| 42 | 76 | 6, |
| @@ -46,5 +80,6 @@ | ||
| 46 | 80 | 3, |
| 47 | 81 | 4 |
| 48 | 82 | ], |
| 83 | + "logit_bias": [], | |
| 49 | 84 | "rep_pen_size": 0 |
| 50 | 85 | } |
| @@ -1,23 +1,85 @@ | ||
| 1 | 1 | { |
| 2 | 2 | "temp": 0.82, |
| 3 | + "temperature_last": true, | |
| 3 | 4 | "top_p": 0.21, |
| 4 | 5 | "top_k": 72, |
| 5 | - "typical_p": 1, | |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | + "typical_p": 1, | |
| 11 | + "min_p": 0, | |
| 10 | 12 | "rep_pen": 1.19, |
| 11 | 13 | "rep_pen_range": 0, |
| 14 | + "rep_pen_decay": 0, | |
| 15 | + "rep_pen_slope": 1, | |
| 12 | 16 | "no_repeat_ngram_size": 0, |
| 13 | 17 | "penalty_alpha": 0, |
| 14 | 18 | "num_beams": 1, |
| 15 | 19 | "length_penalty": 1, |
| 16 | 20 | "min_length": 0, |
| 17 | 21 | "encoder_rep_pen": 1, |
| 22 | + "freq_pen": 0, | |
| 23 | + "presence_pen": 0, | |
| 24 | + "skew": 0, | |
| 18 | 25 | "do_sample": true, |
| 19 | 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 | 41 | "mirostat_mode": 0, |
| 21 | 42 | "mirostat_tau": 5, |
| 22 | 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 | 2 | "temp": 0.65, |
| 3 | 3 | "top_ptemperature_last": 0.47true, |
| 4 | 4 | "top_ktop_p": 420.47, |
| 5 | 5 | "typical_ptop_k": 142, |
| 6 | 6 | "top_a": 0, |
| 7 | 7 | "tfs": 1, |
| 8 | 8 | "epsilon_cutoff": 0, |
| 9 | 9 | "eta_cutoff": 0, |
| 10 | 10 | "rep_pentypical_p": 1.18, |
| 11 | 11 | "rep_pen_rangemin_p": 0, |
| 12 | 12 | "no_repeat_ngram_sizerep_pen": 01.18, |
| 13 | 13 | "penalty_alpharep_pen_range": 0, |
| 14 | 14 | "num_beamsrep_pen_decay": 10, |
| 15 | 15 | "length_penaltyrep_pen_slope": 1, |
| 16 | 16 | "min_lengthno_repeat_ngram_size": 0, |
| 17 | 17 | "encoder_rep_penpenalty_alpha": 10, |
| 18 | 18 | "do_samplenum_beams": true1, |
| 19 | 19 | "early_stoppinglength_penalty": false1, |
| 20 | 20 | "mirostat_modemin_length": 0, |
| 21 | 21 | "mirostat_tauencoder_rep_pen": 51, |
| 22 | 22 | "mirostat_etafreq_pen": 0.1 , |
| 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 | 44 | "preset": "Default", |
| 45 | 45 | "add_bos_token": true, |
| 46 | 46 | "stopping_strings": [], |
| 47 | - "truncation_length": 2048, | |
| 48 | 47 | "ban_eos_token": false, |
| 49 | 48 | "skip_special_tokens": true, |
| 50 | 49 | "streaming": false, |
| @@ -1292,7 +1292,7 @@ | ||
| 1292 | 1292 | </div> |
| 1293 | 1293 | </div> |
| 1294 | 1294 | <!-- Enable for llama.cpp when the PR is merged: https://github.com/ggerganov/llama.cpp/pull/6839 --> |
| 1295 | 1295 | <div data-newbie-hidden data-tg-type="ooba, koboldcpp" id="dryBlock" class="wide100p"> |
| 1296 | 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 | 1297 | <label data-i18n="DRY Repetition Penalty">DRY Repetition Penalty</label> |
| 1298 | 1298 | <a href="https://github.com/oobabooga/text-generation-webui/pull/5677" target="_blank"> |
| @@ -1315,7 +1315,7 @@ | ||
| 1315 | 1315 | <input class="neo-range-slider" type="range" id="dry_allowed_length_textgenerationwebui" min="1" max="20" step="1" /> |
| 1316 | 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 | 1317 | </div> |
| 1318 | 1318 | <div class="alignItemsCenter flex-container flexFlowColumn flexBasis48p flexGrow flexShrink gap0" data-tg-type="llamacpp, koboldcpp"> |
| 1319 | 1319 | <small data-i18n="Penalty Range">Penalty Range</small> |
| 1320 | 1320 | <input class="neo-range-slider" type="range" id="dry_penalty_last_n_textgenerationwebui" min="0" max="8192" step="1" /> |
| 1321 | 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 | 5123 | </div> |
| 5124 | 5124 | </div> |
| 5125 | 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 | 5126 | <div id="chat_world_template" class="template_element"> |
| 5144 | 5127 | <div class="chat_world range-block flexFlowColumn flex-container"> |
| 5145 | 5128 | <div class="range-block-title"> |
| @@ -101,6 +101,7 @@ import { | ||
| 101 | 101 | proxies, |
| 102 | 102 | loadProxyPresets, |
| 103 | 103 | selected_proxy, |
| 104 | + initOpenai, | |
| 104 | 105 | } from './scripts/openai.js'; |
| 105 | 106 | |
| 106 | 107 | import { |
| @@ -155,7 +156,6 @@ import { | ||
| 155 | 156 | ensureImageFormatSupported, |
| 156 | 157 | flashHighlight, |
| 157 | 158 | isTrueBoolean, |
| 158 | - debouncedThrottle, | |
| 159 | 159 | } from './scripts/utils.js'; |
| 160 | 160 | import { debounce_timeout } from './scripts/constants.js'; |
| 161 | 161 | |
| @@ -915,6 +915,7 @@ async function firstLoadInit() { | ||
| 915 | 915 | initKeyboard(); |
| 916 | 916 | initDynamicStyles(); |
| 917 | 917 | initTags(); |
| 918 | + initOpenai(); | |
| 918 | 919 | await getUserAvatars(true, user_avatar); |
| 919 | 920 | await getCharacters(); |
| 920 | 921 | await getBackgrounds(); |
| @@ -7183,20 +7184,23 @@ function updateFavButtonState(state) { | ||
| 7183 | 7184 | $('#favorite_button').toggleClass('fav_off', !fav_ch_checked); |
| 7184 | 7185 | } |
| 7185 | 7186 | |
| 7186 | 7187 | export async function setScenarioOverride() { |
| 7187 | 7188 | if (!selected_group && !this_chid) { |
| 7188 | 7189 | console.warn('setScenarioOverride() -- no selected group or character'); |
| 7189 | 7190 | return; |
| 7190 | 7191 | } |
| 7191 | 7192 | |
| 7192 | - const template = $('#scenario_override_template .scenario_override').clone(); | |
| 7193 | 7193 | const metadataValue = chat_metadata['scenario'] || ''; |
| 7194 | 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 | 7198 | $template.find('.remove_scenario_override[data-character="true"]').ontoggle('click', onScenarioOverrideRemoveClick!isGroup); |
| 7199 | - callPopup(template, 'text'); | |
| 7199 | + // TODO: Why does this save on every character input? Save on popup close | |
| 7200 | + $template.find('.chat_scenario').val(metadataValue).on('input', onScenarioOverrideInput); | |
| 7201 | + $template.find('.remove_scenario_override').on('click', onScenarioOverrideRemoveClick); | |
| 7202 | + | |
| 7203 | + await callGenericPopup($template, POPUP_TYPE.TEXT, ''); | |
| 7200 | 7204 | } |
| 7201 | 7205 | |
| 7202 | 7206 | function onScenarioOverrideInput() { |
| @@ -9125,10 +9129,6 @@ jQuery(async function () { | ||
| 9125 | 9129 | $('#groupCurrentMemberListToggle .inline-drawer-icon').trigger('click'); |
| 9126 | 9130 | }, 200); |
| 9127 | 9131 | |
| 9128 | - $('#chat').on('wheel touchstart', () => { | |
| 9129 | - scrollLock = true; | |
| 9130 | - }); | |
| 9131 | - | |
| 9132 | 9132 | $(document).on('click', '.api_loading', cancelStatusCheck); |
| 9133 | 9133 | |
| 9134 | 9134 | //////////INPUT BAR FOCUS-KEEPING LOGIC///////////// |
| @@ -9233,23 +9233,32 @@ jQuery(async function () { | ||
| 9233 | 9233 | */ |
| 9234 | 9234 | function autoFitEditTextArea(e) { |
| 9235 | 9235 | scroll_holder = chatElement[0].scrollTop; |
| 9236 | 9236 | e.style.height = '00px'; |
| 9237 | 9237 | e.style.heightconst newHeight = `${e.scrollHeight + 4}px`; |
| 9238 | + e.style.height = `${newHeight}px`; | |
| 9238 | 9239 | is_use_scroll_holder = true; |
| 9239 | 9240 | } |
| 9240 | 9241 | const autoFitEditTextAreaDebounced = debouncedThrottledebounce(autoFitEditTextArea, debounce_timeout.standardshort); |
| 9241 | 9242 | document.addEventListener('input', e => { |
| 9242 | 9243 | if (e.target instanceof HTMLTextAreaElement && e.target.classList.contains('edit_textarea')) { |
| 9243 | 9244 | const immediatelyscrollbarShown = e.target.scrollHeightclientWidth >< e.target.offsetHeightoffsetWidth ||&& e.target.valueoffsetHeight ==>= ''window.innerHeight * 0.75; |
| 9245 | + const immediately = (e.target.scrollHeight > e.target.offsetHeight && !scrollbarShown) || e.target.value === ''; | |
| 9244 | 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 | 9257 | if (is_use_scroll_holder) { |
| 9249 | 9258 | this.scrollTop = scroll_holder; |
| 9250 | 9259 | is_use_scroll_holder = false; |
| 9251 | 9260 | } |
| 9252 | - }); | |
| 9261 | + }, { passive: true }); | |
| 9253 | 9262 | |
| 9254 | 9263 | $(document).on('click', '.mes', function () { |
| 9255 | 9264 | //when a 'delete message' parent div is clicked |
| @@ -9800,7 +9809,7 @@ jQuery(async function () { | ||
| 9800 | 9809 | }); |
| 9801 | 9810 | |
| 9802 | 9811 | //confirms message deletion with the "ok" button |
| 9803 | 9812 | $('#dialogue_del_mes_ok').clickon('click', async function () { |
| 9804 | 9813 | $('#dialogue_del_mes').css('display', 'none'); |
| 9805 | 9814 | $('#send_form').css('display', css_send_form_display); |
| 9806 | 9815 | $('.del_checkbox').each(function () { |
| @@ -9816,7 +9825,7 @@ jQuery(async function () { | ||
| 9816 | 9825 | chat.length = this_del_mes; |
| 9817 | 9826 | await saveChatConditional(); |
| 9818 | 9827 | chatElement.scrollTop(chatElement[0].scrollHeight); |
| 9819 | 9828 | await eventSource.emit(event_types.MESSAGE_DELETED, chat.length); |
| 9820 | 9829 | $('#chat .mes').removeClass('last_mes'); |
| 9821 | 9830 | $('#chat .mes').last().addClass('last_mes'); |
| 9822 | 9831 | } else { |
| @@ -10647,7 +10656,7 @@ jQuery(async function () { | ||
| 10647 | 10656 | openCharacterWorldPopup(); |
| 10648 | 10657 | break; |
| 10649 | 10658 | case 'set_chat_scenario': |
| 10650 | 10659 | await setScenarioOverride(); |
| 10651 | 10660 | break; |
| 10652 | 10661 | case 'renameCharButton': |
| 10653 | 10662 | renameCharacter(); |
| @@ -10668,7 +10677,7 @@ jQuery(async function () { | ||
| 10668 | 10677 | const source = getCharacterSource(this_chid); |
| 10669 | 10678 | if (source && isValidUrl(source)) { |
| 10670 | 10679 | const url = new URL(source); |
| 10671 | 10680 | const confirm = await callPopupPopup.show.confirm(`'Open Source', `<span>Do you want to open the link to ${url.hostname} in a new tab?</span><var>${url}</var>`, 'confirm'); |
| 10672 | 10681 | if (confirm) { |
| 10673 | 10682 | window.open(source, '_blank'); |
| 10674 | 10683 | } |
| @@ -10677,7 +10686,7 @@ jQuery(async function () { | ||
| 10677 | 10686 | } |
| 10678 | 10687 | } break; |
| 10679 | 10688 | case 'replace_update': { |
| 10680 | 10689 | const confirm = await callPopupPopup.show.confirm('Replace Character', '<p><b>Choose a new character card to replace this character with.</b></p><p>All chats, assets and group memberships will be preserved, but local changes to the character data will be lost.<br /p><p>Proceed?</p>', 'confirm', ''); |
| 10681 | 10690 | if (confirm) { |
| 10682 | 10691 | async function uploadReplacementCard(e) { |
| 10683 | 10692 | const file = e.target.files[0]; |
| @@ -696,18 +696,18 @@ const isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1; | ||
| 696 | 696 | function autoFitSendTextArea() { |
| 697 | 697 | const originalScrollBottom = chatBlock.scrollHeight - (chatBlock.scrollTop + chatBlock.offsetHeight); |
| 698 | 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 | 700 | sendTextArea.style.height = sendTextAreaMinHeight; |
| 702 | 701 | } |
| 703 | 702 | sendTextArea.style.heightconst newHeight = sendTextArea.scrollHeight + 3 + 'px'; |
| 703 | + sendTextArea.style.height = `${newHeight}px`; | |
| 704 | 704 | |
| 705 | 705 | if (!isFirefox) { |
| 706 | 706 | const newScrollTop = Math.round(chatBlock.scrollHeight - (chatBlock.offsetHeight + originalScrollBottom)); |
| 707 | 707 | chatBlock.scrollTop = newScrollTop; |
| 708 | 708 | } |
| 709 | 709 | } |
| 710 | 710 | export const autoFitSendTextAreaDebounced = debounce(autoFitSendTextArea, debounce_timeout.short); |
| 711 | 711 | |
| 712 | 712 | // --------------------------------------------------- |
| 713 | 713 | |
| @@ -881,12 +881,14 @@ export function initRossMods() { | ||
| 881 | 881 | saveSettingsDebounced(); |
| 882 | 882 | }); |
| 883 | 883 | |
| 884 | 884 | $(sendTextArea).onaddEventListener('input', () => { |
| 885 | 885 | if (sendTextArea.scrollHeight >const sendTextArea.offsetHeighthasContent ||= sendTextArea.value =!== '') {; |
| 886 | - autoFitSendTextArea(); | |
| 886 | + const fitsCurrentSize = sendTextArea.scrollHeight <= sendTextArea.offsetHeight; | |
| 887 | - } else { | |
| 887 | + const isScrollbarShown = sendTextArea.clientWidth < sendTextArea.offsetWidth; | |
| 888 | - autoFitSendTextAreaDebounced(); | |
| 888 | + const isHalfScreenHeight = sendTextArea.offsetHeight >= window.innerHeight / 2; | |
| 889 | - } | |
| 889 | + const needsDebounce = hasContent && (fitsCurrentSize || (isScrollbarShown && isHalfScreenHeight)); | |
| 890 | + if (needsDebounce) autoFitSendTextAreaDebounced(); | |
| 891 | + else autoFitSendTextArea(); | |
| 890 | 892 | saveUserInputDebounced(); |
| 891 | 893 | }); |
| 892 | 894 | |
| @@ -333,8 +333,9 @@ async function getCaptionForFile(file, prompt, quiet) { | ||
| 333 | 333 | return caption; |
| 334 | 334 | } |
| 335 | 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 | 339 | return ''; |
| 339 | 340 | } |
| 340 | 341 | finally { |
| @@ -914,7 +914,7 @@ jQuery(async function () { | ||
| 914 | 914 | |
| 915 | 915 | await addExtensionControls(); |
| 916 | 916 | loadSettings(); |
| 917 | 917 | eventSource.onmakeLast(event_types.MESSAGE_RECEIVEDCHARACTER_MESSAGE_RENDERED, onChatEvent); |
| 918 | 918 | eventSource.on(event_types.MESSAGE_DELETED, onChatEvent); |
| 919 | 919 | eventSource.on(event_types.MESSAGE_EDITED, onChatEvent); |
| 920 | 920 | eventSource.on(event_types.MESSAGE_SWIPED, onChatEvent); |
| @@ -239,7 +239,7 @@ eventSource.on(event_types.CHAT_CHANGED, (...args)=>executeIfReadyElseQueue(onCh | ||
| 239 | 239 | const onUserMessage = async () => { |
| 240 | 240 | await autoExec.handleUser(); |
| 241 | 241 | }; |
| 242 | 242 | eventSource.onmakeFirst(event_types.USER_MESSAGE_RENDERED, (...args)=>executeIfReadyElseQueue(onUserMessage, args)); |
| 243 | 243 | |
| 244 | 244 | const onAiMessage = async (messageId) => { |
| 245 | 245 | if (['...'].includes(chat[messageId]?.mes)) { |
| @@ -249,7 +249,7 @@ const onAiMessage = async (messageId) => { | ||
| 249 | 249 | |
| 250 | 250 | await autoExec.handleAi(); |
| 251 | 251 | }; |
| 252 | 252 | eventSource.onmakeFirst(event_types.CHARACTER_MESSAGE_RENDERED, (...args)=>executeIfReadyElseQueue(onAiMessage, args)); |
| 253 | 253 | |
| 254 | 254 | const onGroupMemberDraft = async () => { |
| 255 | 255 | await autoExec.handleGroupMemberDraft(); |
| @@ -2178,6 +2178,11 @@ function getQuietPrompt(mode, trigger) { | ||
| 2178 | 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 | 2186 | function processReply(str) { |
| 2182 | 2187 | if (!str) { |
| 2183 | 2188 | return ''; |
| @@ -2187,7 +2192,8 @@ function processReply(str) { | ||
| 2187 | 2192 | str = str.replaceAll('“', ''); |
| 2188 | 2193 | str = str.replaceAll('.', ','); |
| 2189 | 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 | 2197 | str = str.replace(/\s+/g, ' '); // Collapse multiple whitespaces into one |
| 2192 | 2198 | str = str.trim(); |
| 2193 | 2199 | |
| @@ -333,6 +333,9 @@ export function formatInstructModeChat(name, mes, isUser, isNarrator, forceAvata | ||
| 333 | 333 | if (power_user.instruct.macro) { |
| 334 | 334 | prefix = substituteParams(prefix, name1, name2); |
| 335 | 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 | 341 | if (!suffix && power_user.instruct.wrap) { |
| @@ -398,6 +401,8 @@ export function formatInstructModeExamples(mesExamplesArray, name1, name2) { | ||
| 398 | 401 | |
| 399 | 402 | inputPrefix = inputPrefix.replace(/{{name}}/gi, name1); |
| 400 | 403 | outputPrefix = outputPrefix.replace(/{{name}}/gi, name2); |
| 404 | + inputSuffix = inputSuffix.replace(/{{name}}/gi, name1); | |
| 405 | + outputSuffix = outputSuffix.replace(/{{name}}/gi, name2); | |
| 401 | 406 | |
| 402 | 407 | if (!inputSuffix && power_user.instruct.wrap) { |
| 403 | 408 | inputSuffix = '\n'; |
| @@ -53,6 +53,7 @@ import { | ||
| 53 | 53 | getFileText, |
| 54 | 54 | getImageSizeFromDataURL, |
| 55 | 55 | getSortableDelay, |
| 56 | + getStringHash, | |
| 56 | 57 | isDataURL, |
| 57 | 58 | parseJsonFile, |
| 58 | 59 | resetScrollHeight, |
| @@ -72,6 +73,7 @@ import { SlashCommand } from './slash-commands/SlashCommand.js'; | ||
| 72 | 73 | import { ARGUMENT_TYPE, SlashCommandArgument } from './slash-commands/SlashCommandArgument.js'; |
| 73 | 74 | import { renderTemplateAsync } from './templates.js'; |
| 74 | 75 | import { SlashCommandEnumValue } from './slash-commands/SlashCommandEnumValue.js'; |
| 76 | +import { Popup, POPUP_RESULT } from './popup.js'; | |
| 75 | 77 | |
| 76 | 78 | export { |
| 77 | 79 | openai_messages_count, |
| @@ -202,6 +204,15 @@ const custom_prompt_post_processing_types = { | ||
| 202 | 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 | 216 | function getPrefixMap() { |
| 206 | 217 | return selected_group ? { |
| 207 | 218 | assistant: '', |
| @@ -388,7 +399,7 @@ let openai_settings; | ||
| 388 | 399 | |
| 389 | 400 | let promptManager = null; |
| 390 | 401 | |
| 391 | 402 | async function validateReverseProxy() { |
| 392 | 403 | if (!oai_settings.reverse_proxy) { |
| 393 | 404 | return; |
| 394 | 405 | } |
| @@ -402,6 +413,19 @@ function validateReverseProxy() { | ||
| 402 | 413 | resultCheckStatus(); |
| 403 | 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 | 1812 | // Proxy is only supported for Claude, OpenAI, Mistral, and Google MakerSuite |
| 1789 | 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 | 1814 | await validateReverseProxy(); |
| 1791 | 1815 | generate_data['reverse_proxy'] = oai_settings.reverse_proxy; |
| 1792 | 1816 | generate_data['proxy_password'] = oai_settings.proxy_password; |
| 1793 | 1817 | } |
| @@ -3200,7 +3224,7 @@ async function getStatusOpen() { | ||
| 3200 | 3224 | }; |
| 3201 | 3225 | |
| 3202 | 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 | 3227 | await validateReverseProxy(); |
| 3204 | 3228 | } |
| 3205 | 3229 | |
| 3206 | 3230 | if (oai_settings.chat_completion_source === chat_completion_sources.CUSTOM) { |
| @@ -3495,6 +3519,26 @@ async function onPresetImportFileChange(e) { | ||
| 3495 | 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 | 3542 | if (name in openai_setting_names) { |
| 3499 | 3543 | const confirm = await callPopup('Preset name already exists. Overwrite?', 'confirm'); |
| 3500 | 3544 | |
| @@ -3541,8 +3585,22 @@ async function onExportPresetClick() { | ||
| 3541 | 3585 | |
| 3542 | 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 | 3605 | const presetJsonString = JSON.stringify(preset, null, 4); |
| 3548 | 3606 | const presetFileName = `${oai_settings.preset_settings_openai}.json`; |
| @@ -4679,22 +4737,23 @@ function runProxyCallback(_, value) { | ||
| 4679 | 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 | 4745 | unnamedArgumentList 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 | 4758 | $(document).ready(async function () { |
| 4700 | 4759 | $('#test_api_button').on('click', testApiConnection); |
| @@ -395,19 +395,16 @@ export async function convertCharacterToPersona(characterId = null) { | ||
| 395 | 395 | const overwriteName = `${name} (Persona).png`; |
| 396 | 396 | |
| 397 | 397 | if (overwriteName in power_user.personas) { |
| 398 | 398 | const confirmationconfirm = await callPopupPopup.show.confirm('Overwrite Existing Persona', 'This character exists as a persona already. AreDo you sure want to overwrite it?', 'confirm', '', { okButton: 'Yes' }); |
| 399 | - | |
| 399 | + if (!confirm) { | |
| 400 | - if (confirmation === false) { | |
| 401 | 400 | console.log('User cancelled the overwrite of the persona'); |
| 402 | 401 | return; |
| 403 | 402 | } |
| 404 | 403 | } |
| 405 | 404 | |
| 406 | 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 | 408 | description = description.replace(/{{char}}/gi, '{{personaChar}}').replace(/{{user}}/gi, '{{personaUser}}'); |
| 412 | 409 | description = description.replace(/{{personaUser}}/gi, '{{char}}').replace(/{{personaChar}}/gi, '{{user}}'); |
| 413 | 410 | } |
| @@ -194,7 +194,7 @@ export class Popup { | ||
| 194 | 194 | const buttonElement = document.createElement('div'); |
| 195 | 195 | buttonElement.classList.add('menu_button', 'popup-button-custom', 'result-control'); |
| 196 | 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 | 198 | buttonElement.textContent = button.text; |
| 199 | 199 | buttonElement.dataset.i18n = buttonElement.textContent; |
| 200 | 200 | buttonElement.tabIndex = 0; |
| @@ -317,9 +317,14 @@ export class Popup { | ||
| 317 | 317 | // Bind event listeners for all result controls to their defined event type |
| 318 | 318 | this.dlg.querySelectorAll('[data-result]').forEach(resultControl => { |
| 319 | 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 | 321 | if (String(undefinedresultControl.dataset.result) === String(resultControl.dataset.resultundefined)) return; |
| 322 | - if (isNaN(result)) throw new Error('Invalid result control. Result must be a number. ' + resultControl.dataset.result); | |
| 322 | + | |
| 323 | + // Make sure that both `POPUP_RESULT` numbers and also `null` as 'cancelled' are supported | |
| 324 | + const result = String(resultControl.dataset.result) === String(null) ? null | |
| 325 | + : Number(resultControl.dataset.result); | |
| 326 | + | |
| 327 | + if (result !== null && isNaN(result)) throw new Error('Invalid result control. Result must be a number. ' + resultControl.dataset.result); | |
| 323 | 328 | const type = resultControl.dataset.resultEvent || 'click'; |
| 324 | 329 | resultControl.addEventListener(type, async () => await this.complete(result)); |
| 325 | 330 | }); |
| @@ -2734,45 +2734,26 @@ async function doDelMode(_, text) { | ||
| 2734 | 2734 | return ''; |
| 2735 | 2735 | } |
| 2736 | 2736 | |
| 2737 | 2737 | //first Just enter delmodethe 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 | 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 | 2759 | function doResetPanels() { |
| @@ -1,6 +1,5 @@ | ||
| 1 | 1 | import { |
| 2 | 2 | amount_gen, |
| 3 | - callPopup, | |
| 4 | 3 | characters, |
| 5 | 4 | eventSource, |
| 6 | 5 | event_types, |
| @@ -19,6 +18,7 @@ import { | ||
| 19 | 18 | import { groups, selected_group } from './group-chats.js'; |
| 20 | 19 | import { instruct_presets } from './instruct-mode.js'; |
| 21 | 20 | import { kai_settings } from './kai-settings.js'; |
| 21 | +import { Popup } from './popup.js'; | |
| 22 | 22 | import { context_presets, getContextSettings, power_user } from './power-user.js'; |
| 23 | 23 | import { SlashCommand } from './slash-commands/SlashCommand.js'; |
| 24 | 24 | import { ARGUMENT_TYPE, SlashCommandArgument } from './slash-commands/SlashCommandArgument.js'; |
| @@ -165,11 +165,8 @@ class PresetManager { | ||
| 165 | 165 | |
| 166 | 166 | async savePresetAs() { |
| 167 | 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 | 170 | if (!name) { |
| 174 | 171 | console.log('Preset name not provided'); |
| 175 | 172 | return; |
| @@ -304,6 +301,9 @@ class PresetManager { | ||
| 304 | 301 | |
| 305 | 302 | const filteredKeys = [ |
| 306 | 303 | 'preset', |
| 304 | + 'streaming', | |
| 305 | + 'truncation_length', | |
| 306 | + 'n', | |
| 307 | 307 | 'streaming_url', |
| 308 | 308 | 'stopping_strings', |
| 309 | 309 | 'can_use_tokenization', |
| @@ -372,7 +372,7 @@ class PresetManager { | ||
| 372 | 372 | if (Object.keys(preset_names).length) { |
| 373 | 373 | const nextPresetName = Object.keys(preset_names)[0]; |
| 374 | 374 | const newValue = preset_names[nextPresetName]; |
| 375 | 375 | $(this.select).find(`option[value="${newValue}"]`).attr('selected', 'true'); |
| 376 | 376 | $(this.select).trigger('change'); |
| 377 | 377 | } |
| 378 | 378 | |
| @@ -597,8 +597,7 @@ export async function initPresetManager() { | ||
| 597 | 597 | return; |
| 598 | 598 | } |
| 599 | 599 | |
| 600 | 600 | const confirm = await callPopupPopup.show.confirm('Delete the preset?', 'This action is irreversible and your current settings will be overwritten.', 'confirm'); |
| 601 | - | |
| 602 | 601 | if (!confirm) { |
| 603 | 602 | return; |
| 604 | 603 | } |
| @@ -641,8 +640,7 @@ export async function initPresetManager() { | ||
| 641 | 640 | return; |
| 642 | 641 | } |
| 643 | 642 | |
| 644 | 643 | const confirm = await callPopupPopup.show.confirm('<h3>Are you sure?</h3>', 'Resetting a <b>default preset</b> will restore the default settings.', 'confirm'); |
| 645 | - | |
| 646 | 644 | if (!confirm) { |
| 647 | 645 | return; |
| 648 | 646 | } |
| @@ -653,8 +651,7 @@ export async function initPresetManager() { | ||
| 653 | 651 | presetManager.selectPreset(option); |
| 654 | 652 | toastr.success('Default preset restored'); |
| 655 | 653 | } else { |
| 656 | 654 | const confirm = await callPopupPopup.show.confirm('<h3>Are you sure?</h3>', 'Resetting a <b>custom preset</b> will restore to the last saved state.', 'confirm'); |
| 657 | - | |
| 658 | 655 | if (!confirm) { |
| 659 | 656 | return; |
| 660 | 657 | } |
| @@ -952,14 +952,36 @@ export function initDefaultSlashCommands() { | ||
| 952 | 952 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 953 | 953 | name: 'fuzzy', |
| 954 | 954 | callback: fuzzyCallback, |
| 955 | 955 | returns: 'first matching item', |
| 956 | 956 | namedArgumentList: [ |
| 957 | 957 | new SlashCommandNamedArgument.fromProps({ |
| 958 | - 'list', 'list of items to match against', [ARGUMENT_TYPE.LIST], true, | |
| 958 | + name: 'list', | |
| 959 | - ), | |
| 959 | + description: 'list of items to match against', | |
| 960 | - new SlashCommandNamedArgument( | |
| 960 | + acceptsMultiple: false, | |
| 961 | - 'threshold', 'fuzzy match threshold (0.0 to 1.0)', [ARGUMENT_TYPE.NUMBER], false, false, '0.4', | |
| 961 | + isRequired: true, | |
| 962 | - ), | |
| 962 | + typeList: [ARGUMENT_TYPE.LIST, ARGUMENT_TYPE.VARIABLE_NAME], | |
| 963 | + enumProvider: commonEnumProviders.variables('all'), | |
| 964 | + }), | |
| 965 | + SlashCommandNamedArgument.fromProps({ | |
| 966 | + name: 'threshold', | |
| 967 | + description: 'fuzzy match threshold (0.0 to 1.0)', | |
| 968 | + typeList: [ARGUMENT_TYPE.NUMBER], | |
| 969 | + isRequired: false, | |
| 970 | + defaultValue: '0.4', | |
| 971 | + acceptsMultiple: false, | |
| 972 | + }), | |
| 973 | + SlashCommandNamedArgument.fromProps({ | |
| 974 | + name: 'mode', | |
| 975 | + description: 'fuzzy match mode', | |
| 976 | + typeList: [ARGUMENT_TYPE.STRING], | |
| 977 | + isRequired: false, | |
| 978 | + defaultValue: 'first', | |
| 979 | + acceptsMultiple: false, | |
| 980 | + enumList: [ | |
| 981 | + new SlashCommandEnumValue('first', 'first match below the threshold', enumTypes.enum, enumIcons.default), | |
| 982 | + new SlashCommandEnumValue('best', 'best match below the threshold', enumTypes.enum, enumIcons.default), | |
| 983 | + ], | |
| 984 | + }), | |
| 963 | 985 | ], |
| 964 | 986 | unnamedArgumentList: [ |
| 965 | 987 | new SlashCommandArgument( |
| @@ -977,6 +999,13 @@ export function initDefaultSlashCommands() { | ||
| 977 | 999 | At 1.0 (max) the match is very loose and will match anything. |
| 978 | 1000 | </div> |
| 979 | 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 | 1009 | The returned value passes to the next command through the pipe. |
| 981 | 1010 | </div> |
| 982 | 1011 | <div> |
| @@ -1865,7 +1894,7 @@ async function inputCallback(args, prompt) { | ||
| 1865 | 1894 | * @param {FuzzyCommandArgs} args - arguments containing "list" (JSON array) and optionaly "threshold" (float between 0.0 and 1.0) |
| 1866 | 1895 | * @param {string} searchInValue - the string where items of list are searched |
| 1867 | 1896 | * @returns {string} - the matched item from the list |
| 1868 | 1897 | * @typedef {{list: string, threshold: string, mode:string}} FuzzyCommandArgs - arguments for /fuzzy command |
| 1869 | 1898 | * @example /fuzzy list=["down","left","up","right"] "he looks up" | /echo // should return "up" |
| 1870 | 1899 | * @link https://www.fusejs.io/ |
| 1871 | 1900 | */ |
| @@ -1895,7 +1924,7 @@ function fuzzyCallback(args, searchInValue) { | ||
| 1895 | 1924 | }; |
| 1896 | 1925 | // threshold determines how strict is the match, low threshold value is very strict, at 1 (nearly?) everything matches |
| 1897 | 1926 | if ('threshold' in args) { |
| 1898 | 1927 | params.threshold = parseFloat(resolveVariable(args.threshold)); |
| 1899 | 1928 | if (isNaN(params.threshold)) { |
| 1900 | 1929 | console.warn('WARN: \'threshold\' argument must be a float between 0.0 and 1.0 for /fuzzy command'); |
| 1901 | 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 | 1960 | if (result.length > 0) { |
| 1916 | 1961 | console.info('fuzzyCallback Matched/fuzzy: 'best +matched', searchItemresult[0].item); |
| 1917 | 1962 | return searchItemresult[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 | 1976 | } catch { |
| 1922 | 1977 | console.warn('WARN: Invalid list argument provided for /fuzzy command'); |
| 1923 | 1978 | return ''; |
| @@ -1,11 +1,11 @@ | ||
| 1 | 1 | import { chat_metadata, characters, substituteParams, chat, extension_prompt_roles, extension_prompt_types } from "'../../script.js"'; |
| 2 | 2 | import { extension_settings } from "'../extensions.js"'; |
| 3 | 3 | import { getGroupMembers, groups, selected_group } from "'../group-chats.js"'; |
| 4 | 4 | import { power_user } from "'../power-user.js"'; |
| 5 | 5 | import { searchCharByName, getTagsList, tags } from "'../tags.js"'; |
| 6 | 6 | import { SlashCommandClosureworld_names } from "'../SlashCommandClosureworld-info.js"'; |
| 7 | 7 | import { SlashCommandEnumValue, enumTypesSlashCommandClosure } from "'./SlashCommandEnumValueSlashCommandClosure.js"'; |
| 8 | 8 | import { SlashCommandExecutorSlashCommandEnumValue, enumTypes } from "'./SlashCommandExecutorSlashCommandEnumValue.js"'; |
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | 11 | * A collection of regularly used enum icons |
| @@ -103,8 +103,8 @@ export const enumIcons = { | ||
| 103 | 103 | // Remove possible nullable types definition to match type icon |
| 104 | 104 | type = type.replace(/\?$/, ''); |
| 105 | 105 | return enumIcons[type] ?? enumIcons.default; |
| 106 | 106 | }, |
| 107 | 107 | }; |
| 108 | 108 | |
| 109 | 109 | /** |
| 110 | 110 | * A collection of common enum providers |
| @@ -143,7 +143,7 @@ export const commonEnumProviders = { | ||
| 143 | 143 | ...isAll || types.includes('global') ? Object.keys(extension_settings.variables.global ?? []).map(name => new SlashCommandEnumValue(name, null, enumTypes.macro, enumIcons.globalVariable)) : [], |
| 144 | 144 | ...isAll || types.includes('local') ? Object.keys(chat_metadata.variables ?? []).map(name => new SlashCommandEnumValue(name, null, enumTypes.name, enumIcons.localVariable)) : [], |
| 145 | 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 | 180 | * @param {('all' | 'existing' | 'not-existing')?} [mode='all'] - Which types of tags to show |
| 181 | 181 | * @returns {() => SlashCommandEnumValue[]} |
| 182 | 182 | */ |
| 183 | 183 | tagsForChar: (mode = 'all') => (/** @type {import('./SlashCommandExecutor.js').SlashCommandExecutor} */ executor) => { |
| 184 | 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 | 185 | const charName = executor.namedArgumentList.find(it => it.name == 'name')?.value; |
| 186 | 186 | if (charName instanceof SlashCommandClosure) throw new Error('Argument \'name\' does not support closures'); |
| @@ -213,7 +213,7 @@ export const commonEnumProviders = { | ||
| 213 | 213 | * |
| 214 | 214 | * @returns {SlashCommandEnumValue[]} |
| 215 | 215 | */ |
| 216 | 216 | worlds: () => $('#world_info').children().toArray()world_names.map(xworldName => new SlashCommandEnumValue(x.textContentworldName, null, enumTypes.name, enumIcons.world)), |
| 217 | 217 | |
| 218 | 218 | /** |
| 219 | 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 | 14 | import { ARGUMENT_TYPE, SlashCommandArgument, SlashCommandNamedArgument } from './slash-commands/SlashCommandArgument.js'; |
| 15 | 15 | import { SlashCommandEnumValue, enumTypes } from './slash-commands/SlashCommandEnumValue.js'; |
| 16 | 16 | import { commonEnumProviders, enumIcons } from './slash-commands/SlashCommandCommonEnumsProvider.js'; |
| 17 | -import { SlashCommandExecutor } from './slash-commands/SlashCommandExecutor.js'; | |
| 18 | 17 | import { SlashCommandClosure } from './slash-commands/SlashCommandClosure.js'; |
| 19 | 18 | import { callGenericPopup, Popup, POPUP_TYPE } from './popup.js'; |
| 20 | 19 | |
| @@ -171,7 +170,7 @@ class WorldInfoBuffer { | ||
| 171 | 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 | 175 | #startDepth = 0; |
| 177 | 176 | |
| @@ -224,12 +223,12 @@ class WorldInfoBuffer { | ||
| 224 | 223 | } |
| 225 | 224 | |
| 226 | 225 | if (depth < 0) { |
| 227 | 226 | console.error(`[WI] Invalid WI scan depth ${depth}. Must be >= 0`); |
| 228 | 227 | return ''; |
| 229 | 228 | } |
| 230 | 229 | |
| 231 | 230 | if (depth > MAX_SCAN_DEPTH) { |
| 232 | 231 | console.warn(`[WI] Invalid WI scan depth ${depth}. Truncating to ${MAX_SCAN_DEPTH}`); |
| 233 | 232 | depth = MAX_SCAN_DEPTH; |
| 234 | 233 | } |
| 235 | 234 | |
| @@ -303,10 +302,17 @@ class WorldInfoBuffer { | ||
| 303 | 302 | } |
| 304 | 303 | |
| 305 | 304 | /** |
| 306 | 305 | * IncrementsChecks skewif andthe setsrecursion startDepthbuffer tois previousnot depthempty. |
| 306 | + * @returns {boolean} Returns true if the recursion buffer is not empty, otherwise false | |
| 307 | 307 | */ |
| 308 | 308 | advanceScanPositionhasRecurse() { |
| 309 | 309 | return this.#startDepthrecurseBuffer.length => this.getDepth()0; |
| 310 | + } | |
| 311 | + | |
| 312 | + /** | |
| 313 | + * Increments skew to advance the scan range. | |
| 314 | + */ | |
| 315 | + advanceScan() { | |
| 310 | 316 | this.#skew++; |
| 311 | 317 | } |
| 312 | 318 | |
| @@ -438,7 +444,7 @@ class WorldInfoTimedEffects { | ||
| 438 | 444 | const key = this.#getEntryKey(entry); |
| 439 | 445 | const effect = this.#getEntryTimedEffect('cooldown', entry, true); |
| 440 | 446 | chat_metadata.timedWorldInfo.cooldown[key] = effect; |
| 441 | 447 | console.log(`[WI] Adding cooldown entry ${key} on ended sticky: start=${effect.start}, end=${effect.end}, protected=${effect.protected}`); |
| 442 | 448 | // Set the cooldown immediately for this evaluation |
| 443 | 449 | this.#buffer.cooldown.push(entry); |
| 444 | 450 | }, |
| @@ -449,10 +455,10 @@ class WorldInfoTimedEffects { | ||
| 449 | 455 | * @param {WIScanEntry} entry Entry that ended cooldown |
| 450 | 456 | */ |
| 451 | 457 | 'cooldown': (entry) => { |
| 452 | 458 | console.debug('[WI] Cooldown ended for entry', entry.uid); |
| 453 | 459 | }, |
| 454 | 460 | |
| 455 | 461 | 'delay': () => { }, |
| 456 | 462 | }; |
| 457 | 463 | |
| 458 | 464 | /** |
| @@ -539,11 +545,11 @@ class WorldInfoTimedEffects { | ||
| 539 | 545 | /** @type {[string, WITimedEffect][]} */ |
| 540 | 546 | const effects = Object.entries(chat_metadata.timedWorldInfo[type]); |
| 541 | 547 | for (const [key, value] of effects) { |
| 542 | 548 | console.log(`[WI] Processing ${type} entry ${key}`, value); |
| 543 | 549 | const entry = this.#entries.find(x => String(this.#getEntryHash(x)) === String(value.hash)); |
| 544 | 550 | |
| 545 | 551 | if (this.#chat.length <= Number(value.start) && !value.protected) { |
| 546 | 552 | console.log(`[WI] Removing ${type} entry ${key} from timedWorldInfo: chat not advanced`, value); |
| 547 | 553 | delete chat_metadata.timedWorldInfo[type][key]; |
| 548 | 554 | continue; |
| 549 | 555 | } |
| @@ -551,7 +557,7 @@ class WorldInfoTimedEffects { | ||
| 551 | 557 | // Missing entries (they could be from another character's lorebook) |
| 552 | 558 | if (!entry) { |
| 553 | 559 | if (this.#chat.length >= Number(value.end)) { |
| 554 | 560 | console.log(`[WI] Removing ${type} entry from timedWorldInfo: entry not found and interval passed`, entry); |
| 555 | 561 | delete chat_metadata.timedWorldInfo[type][key]; |
| 556 | 562 | } |
| 557 | 563 | continue; |
| @@ -559,13 +565,13 @@ class WorldInfoTimedEffects { | ||
| 559 | 565 | |
| 560 | 566 | // Ignore invalid entries (not configured for timed effects) |
| 561 | 567 | if (!entry[type]) { |
| 562 | 568 | console.log(`[WI] Removing ${type} entry from timedWorldInfo: entry not ${type}`, entry); |
| 563 | 569 | delete chat_metadata.timedWorldInfo[type][key]; |
| 564 | 570 | continue; |
| 565 | 571 | } |
| 566 | 572 | |
| 567 | 573 | if (this.#chat.length >= Number(value.end)) { |
| 568 | 574 | console.log(`[WI] Removing ${type} entry from timedWorldInfo: ${type} interval passed`, entry); |
| 569 | 575 | delete chat_metadata.timedWorldInfo[type][key]; |
| 570 | 576 | if (typeof onEnded === 'function') { |
| 571 | 577 | onEnded(entry); |
| @@ -574,7 +580,7 @@ class WorldInfoTimedEffects { | ||
| 574 | 580 | } |
| 575 | 581 | |
| 576 | 582 | buffer.push(entry); |
| 577 | 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 | 597 | if (this.#chat.length < entry.delay) { |
| 592 | 598 | buffer.push(entry); |
| 593 | 599 | console.log('[WI] Timed effect "delay" applied to entry', entry); |
| 594 | 600 | } |
| 595 | 601 | } |
| 596 | 602 | |
| @@ -637,7 +643,7 @@ class WorldInfoTimedEffects { | ||
| 637 | 643 | const effect = this.#getEntryTimedEffect(type, entry, false); |
| 638 | 644 | chat_metadata.timedWorldInfo[type][key] = effect; |
| 639 | 645 | |
| 640 | 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 | 675 | if (newState) { |
| 670 | 676 | const effect = this.#getEntryTimedEffect(type, entry, false); |
| 671 | 677 | chat_metadata.timedWorldInfo[type][key] = effect; |
| 672 | 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 | 1222 | enumTypes.enum, enumIcons.getDataTypeIcon(value.type))), |
| 1217 | 1223 | |
| 1218 | 1224 | /** All existing UIDs based on the file argument as world name */ |
| 1219 | 1225 | wiUids: (/** @type {import('./slash-commands/SlashCommandExecutor.js').SlashCommandExecutor} */ executor) => { |
| 1220 | 1226 | const file = executor.namedArgumentList.find(it => it.name == 'file')?.value; |
| 1221 | 1227 | if (file instanceof SlashCommandClosure) throw new Error('Argument \'file\' does not support closures'); |
| 1222 | 1228 | // Try find world from cache |
| @@ -3162,7 +3168,8 @@ function duplicateWorldInfoEntry(data, uid) { | ||
| 3162 | 3168 | } |
| 3163 | 3169 | |
| 3164 | 3170 | // Exclude uid and gather the rest of the properties |
| 3165 | 3171 | const { uid:originalData _,= ..Object.originalData assign({} =, data.entries[uid]); |
| 3172 | + delete originalData.uid; | |
| 3166 | 3173 | |
| 3167 | 3174 | // Create new entry and copy over data |
| 3168 | 3175 | const entry = createWorldInfoEntry(data.name, data); |
| @@ -3420,13 +3427,12 @@ async function createNewWorldInfo(worldName, { interactive = false } = {}) { | ||
| 3420 | 3427 | async function getCharacterLore() { |
| 3421 | 3428 | const character = characters[this_chid]; |
| 3422 | 3429 | const name = character?.name; |
| 3430 | + /** @type {Set<string>} */ | |
| 3423 | 3431 | let worldsToSearch = new Set(); |
| 3424 | 3432 | |
| 3425 | 3433 | const baseWorldName = character?.data?.extensions?.world; |
| 3426 | 3434 | if (baseWorldName) { |
| 3427 | 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 | 3438 | // TODO: Maybe make the utility function not use the window context? |
| @@ -3436,40 +3442,48 @@ async function getCharacterLore() { | ||
| 3436 | 3442 | worldsToSearch = new Set([...worldsToSearch, ...extraCharLore.extraBooks]); |
| 3437 | 3443 | } |
| 3438 | 3444 | |
| 3445 | + if (!worldsToSearch.size) { | |
| 3446 | + return []; | |
| 3447 | + } | |
| 3448 | + | |
| 3439 | 3449 | let entries = []; |
| 3440 | 3450 | for (const worldName of worldsToSearch) { |
| 3441 | 3451 | if (selected_world_info.includes(worldName)) { |
| 3442 | 3452 | console.debug(`[WI] Character ${name}'s world ${worldName} is already activated in global world info! Skipping...`); |
| 3443 | 3453 | continue; |
| 3444 | 3454 | } |
| 3445 | 3455 | |
| 3446 | 3456 | if (chat_metadata[METADATA_KEY] === worldName) { |
| 3447 | 3457 | console.debug(`[WI] Character ${name}'s world ${worldName} is already activated in chat lore! Skipping...`); |
| 3448 | 3458 | continue; |
| 3449 | 3459 | } |
| 3450 | 3460 | |
| 3451 | 3461 | const data = await loadWorldInfoData(worldName); |
| 3452 | 3462 | const newEntries = data ? Object.keys(data.entries).map((x) => data.entries[x]).map(x({ uid, ...rest }) => ({ ...xuid, world: worldName, ...rest })) : []; |
| 3453 | 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 | 3470 | console.debug(`[WI] Character ${name}'s lore (${Array.from(worldsToSearch)}) has ${entries.length} world info entries`, [...worldsToSearch]); |
| 3457 | 3471 | return entries; |
| 3458 | 3472 | } |
| 3459 | 3473 | |
| 3460 | 3474 | async function getGlobalLore() { |
| 3461 | 3475 | if (!selected_world_info?.length) { |
| 3462 | 3476 | return []; |
| 3463 | 3477 | } |
| 3464 | 3478 | |
| 3465 | 3479 | let entries = []; |
| 3466 | 3480 | for (const worldName of selected_world_info) { |
| 3467 | 3481 | const data = await loadWorldInfoData(worldName); |
| 3468 | 3482 | const newEntries = data ? Object.keys(data.entries).map((x) => data.entries[x]).map(x({ uid, ...rest }) => ({ ...xuid, world: worldName, ...rest })) : []; |
| 3469 | 3483 | entries = entries.concat(newEntries); |
| 3470 | 3484 | } |
| 3471 | 3485 | |
| 3472 | 3486 | console.debug(`[WI] Global world info has ${entries.length} entries`, selected_world_info); |
| 3473 | 3487 | |
| 3474 | 3488 | return entries; |
| 3475 | 3489 | } |
| @@ -3482,14 +3496,14 @@ async function getChatLore() { | ||
| 3482 | 3496 | } |
| 3483 | 3497 | |
| 3484 | 3498 | if (selected_world_info.includes(chatWorld)) { |
| 3485 | 3499 | console.debug(`[WI] Chat world ${chatWorld} is already activated in global world info! Skipping...`); |
| 3486 | 3500 | return []; |
| 3487 | 3501 | } |
| 3488 | 3502 | |
| 3489 | 3503 | const data = await loadWorldInfoData(chatWorld); |
| 3490 | 3504 | const entries = data ? Object.keys(data.entries).map((x) => data.entries[x]).map(x({ uid, ...rest }) => ({ ...xuid, world: chatWorld, ...rest })) : []; |
| 3491 | 3505 | |
| 3492 | 3506 | console.debug(`[WI] Chat lore has ${entries.length} entries`, [chatWorld]); |
| 3493 | 3507 | |
| 3494 | 3508 | return entries; |
| 3495 | 3509 | } |
| @@ -3513,7 +3527,7 @@ export async function getSortedEntries() { | ||
| 3513 | 3527 | entries = [...globalLore.sort(sortFn), ...characterLore.sort(sortFn)]; |
| 3514 | 3528 | break; |
| 3515 | 3529 | default: |
| 3516 | 3530 | console.error('[WI] Unknown WI insertion strategy: ', world_info_character_strategy, 'defaulting to evenly'); |
| 3517 | 3531 | entries = [...globalLore, ...characterLore].sort(sortFn); |
| 3518 | 3532 | break; |
| 3519 | 3533 | } |
| @@ -3521,7 +3535,13 @@ export async function getSortedEntries() { | ||
| 3521 | 3535 | // Chat lore always goes first |
| 3522 | 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 | 3546 | // Need to deep clone the entries to avoid modifying the cached data |
| 3527 | 3547 | return structuredClone(entries); |
| @@ -3600,6 +3620,8 @@ async function checkWorldInfo(chat, maxContext, isDryRun) { | ||
| 3600 | 3620 | const context = getContext(); |
| 3601 | 3621 | const buffer = new WorldInfoBuffer(chat); |
| 3602 | 3622 | |
| 3623 | + console.debug(`[WI] --- START WI SCAN (on ${chat.length} messages) ---`); | |
| 3624 | + | |
| 3603 | 3625 | // Combine the chat |
| 3604 | 3626 | |
| 3605 | 3627 | // Add the depth or AN if enabled |
| @@ -3623,11 +3645,11 @@ async function checkWorldInfo(chat, maxContext, isDryRun) { | ||
| 3623 | 3645 | let budget = Math.round(world_info_budget * maxContext / 100) || 1; |
| 3624 | 3646 | |
| 3625 | 3647 | if (world_info_budget_cap > 0 && budget > world_info_budget_cap) { |
| 3626 | 3648 | console.debug(`[WI] Budget ${budget} exceeds cap ${world_info_budget_cap}, using cap`); |
| 3627 | 3649 | budget = world_info_budget_cap; |
| 3628 | 3650 | } |
| 3629 | 3651 | |
| 3630 | 3652 | console.debug(`[WI] Context size: ${maxContext}; WI budget: ${budget} (max% = ${world_info_budget}%, cap = ${world_info_budget_cap})`); |
| 3631 | 3653 | const sortedEntries = await getSortedEntries(); |
| 3632 | 3654 | const timedEffects = new WorldInfoTimedEffects(chat, sortedEntries); |
| 3633 | 3655 | |
| @@ -3637,19 +3659,40 @@ async function checkWorldInfo(chat, maxContext, isDryRun) { | ||
| 3637 | 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 | 3664 | while (scanState) { |
| 3641 | 3665 | // Track how many times the loop has run. May be useful for debugging. |
| 3642 | - // eslint-disable-next-line no-unused-vars | |
| 3643 | 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 | 3674 | let activatedNow = new Set(); |
| 3646 | 3675 | |
| 3647 | 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 | 3697 | // Check if this entry applies to the character or if it's excluded |
| 3655 | 3698 | if (entry.characterFilter && entry.characterFilter?.names?.length > 0) { |
| @@ -3657,7 +3700,7 @@ async function checkWorldInfo(chat, maxContext, isDryRun) { | ||
| 3657 | 3700 | const filtered = entry.characterFilter.isExclude ? nameIncluded : !nameIncluded; |
| 3658 | 3701 | |
| 3659 | 3702 | if (filtered) { |
| 3660 | 3703 | console.debuglog(`WI entry ${entry.uid} 'filtered out by character`'); |
| 3661 | 3704 | continue; |
| 3662 | 3705 | } |
| 3663 | 3706 | } |
| @@ -3674,7 +3717,7 @@ async function checkWorldInfo(chat, maxContext, isDryRun) { | ||
| 3674 | 3717 | const filtered = entry.characterFilter.isExclude ? includesTag : !includesTag; |
| 3675 | 3718 | |
| 3676 | 3719 | if (filtered) { |
| 3677 | 3720 | console.debuglog(`WI entry ${entry.uid} 'filtered out by tag`'); |
| 3678 | 3721 | continue; |
| 3679 | 3722 | } |
| 3680 | 3723 | } |
| @@ -3686,198 +3729,253 @@ async function checkWorldInfo(chat, maxContext, isDryRun) { | ||
| 3686 | 3729 | const isDelay = timedEffects.isEffectActive('delay', entry); |
| 3687 | 3730 | |
| 3688 | 3731 | if (isDelay) { |
| 3689 | - console.debug(`WI entry ${entry.uid} suppressed by delay`, entry); | |
| 3732 | + log('suppressed by delay'); | |
| 3690 | 3733 | continue; |
| 3691 | 3734 | } |
| 3692 | 3735 | |
| 3693 | 3736 | if (isCooldown && !isSticky) { |
| 3694 | - console.debug(`WI entry ${entry.uid} suppressed by cooldown`, entry); | |
| 3737 | + log('suppressed by cooldown'); | |
| 3695 | 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 | 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 | 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 | 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 | 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 | 3766 | activatedNow.add(entry); |
| 3720 | 3767 | continue; |
| 3721 | 3768 | } |
| 3722 | 3769 | |
| 3723 | 3770 | if (decoratorsbuffer.includesisExternallyActivated('@@dont_activate'entry)) { |
| 3724 | - //deactivate in any case if @@activate is not present | |
| 3771 | + log('externally activated'); | |
| 3772 | + activatedNow.add(entry); | |
| 3725 | 3773 | continue; |
| 3726 | 3774 | } |
| 3727 | 3775 | |
| 3728 | - if (entry.constant || buffer.isExternallyActivated(entry) || isSticky) { | |
| 3776 | + if (isSticky) { | |
| 3777 | + log('activated because active sticky'); | |
| 3729 | 3778 | activatedNow.add(entry); |
| 3730 | 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 | 3869 | const newEntries = [...activatedNow] |
| 3805 | 3870 | .sort((a, b) => sortedEntries.indexOf(a) - sortedEntries.indexOf(b)); |
| 3806 | 3871 | let newContent = ''; |
| 3807 | 3872 | const textToScanTokens = await getTokenCountAsync(allActivatedText); |
| 3808 | - const probabilityChecksBefore = failedProbabilityChecks.size; | |
| 3809 | 3873 | |
| 3810 | 3874 | filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanState); |
| 3811 | 3875 | |
| 3812 | 3876 | console.debug('[WI] --- PROBABILITY CHECKS BEGIN ---'); |
| 3813 | 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 | 3885 | const isSticky = timedEffects.isEffectActive('sticky', entry); |
| 3818 | 3886 | if (!isSticky) { |
| 3819 | 3887 | console.debug(`WI entry ${entry.uid} ${entry.key}is failedsticky, probabilitydoes check,not skippingneed 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 | 3907 | // Substitute macros inline, for both this checking and also future processing |
| 3826 | 3908 | entry.content = substituteParams(entry.content); |
| 3827 | 3909 | newContent += `${entry.content}\n`; |
| 3828 | 3910 | |
| 3829 | 3911 | if ((textToScanTokens + (await getTokenCountAsync(newContent))) >= budget) { |
| 3830 | - console.debug('WI budget reached, stopping'); | |
| 3831 | 3912 | if (world_info_overflow_alert) { |
| 3832 | - console.log('Alerting'); | |
| 3913 | + console.warn(`[WI] budget of ${budget} reached, stopping after ${allActivatedEntries.size} entries`); | |
| 3833 | 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 | 3918 | token_budget_overflowed = true; |
| 3837 | 3919 | break; |
| 3838 | 3920 | } |
| 3839 | 3921 | |
| 3840 | 3922 | allActivatedEntries.add(entry); |
| 3841 | 3923 | console.debug('`[WI] Entry ${entry.uid} activated:'activation successful, adding to prompt`, entry); |
| 3842 | 3924 | } |
| 3843 | 3925 | |
| 3844 | 3926 | const probabilityChecksAftersuccessfulNewEntries = newEntries.filter(x => !failedProbabilityChecks.sizehas(x)); |
| 3927 | + const successfulNewEntriesForRecursion = successfulNewEntries.filter(x => !x.preventRecursion); | |
| 3845 | 3928 | |
| 3846 | - if ((probabilityChecksAfter - probabilityChecksBefore) === activatedNow.size) { | |
| 3929 | + if (!newEntries.length) { | |
| 3847 | 3930 | console.debug('[WI probability checks] failedNo fornew allentries activated entries, stopping'); |
| 3848 | - scanState = scan_state.NONE; | |
| 3931 | + } else if (!successfulNewEntries.length) { | |
| 3932 | + console.debug('[WI] Probability checks failed for all activated entries, stopping'); | |
| 3933 | + } else { | |
| 3934 | + console.debug(`[WI] Successfully activated ${successfulNewEntries.length} new entries to prompt. ${allActivatedEntries.size} total entries activated.`, successfulNewEntries); | |
| 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 | 3939 | scanStatenextScanState = scan_state.NONERECURSION; |
| 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 | 3950 | if (world_info_min_activations > 0!nextScanState && (allActivatedEntries.size!token_budget_overflowed <&& world_info_min_activations)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 | 3979 | // Forward-sorted list of entries for joining |
| 3882 | 3980 | const WIBeforeEntries = []; |
| 3883 | 3981 | const WIAfterEntries = []; |
| @@ -3893,7 +3991,7 @@ async function checkWorldInfo(chat, maxContext, isDryRun) { | ||
| 3893 | 3991 | const content = getRegexedString(entry.content, regex_placement.WORLD_INFO, { depth: regexDepth, isMarkdown: false, isPrompt: true }); |
| 3894 | 3992 | |
| 3895 | 3993 | if (!content) { |
| 3896 | 3994 | console.debug('Skipping adding `[WI] Entry ${entry.uid}`, 'skipped adding to prompt due to empty content:', entry); |
| 3897 | 3995 | return; |
| 3898 | 3996 | } |
| 3899 | 3997 | |
| @@ -3951,6 +4049,9 @@ async function checkWorldInfo(chat, maxContext, isDryRun) { | ||
| 3951 | 4049 | buffer.resetExternalEffects(); |
| 3952 | 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 | 4055 | return { worldInfoBefore, worldInfoAfter, EMEntries, WIDepthEntries, allActivatedEntries }; |
| 3955 | 4056 | } |
| 3956 | 4057 | |
| @@ -3965,13 +4066,13 @@ function filterGroupsByScoring(groups, buffer, removeEntry, scanState) { | ||
| 3965 | 4066 | for (const [key, group] of Object.entries(groups)) { |
| 3966 | 4067 | // Group scoring is disabled both globally and for the group entries |
| 3967 | 4068 | if (!world_info_use_group_scoring && !group.some(x => x.useGroupScoring)) { |
| 3968 | 4069 | console.debug(`[WI] Skipping group scoring for group '${key}'`); |
| 3969 | 4070 | continue; |
| 3970 | 4071 | } |
| 3971 | 4072 | |
| 3972 | 4073 | const scores = group.map(entry => buffer.getScore(entry, scanState)); |
| 3973 | 4074 | const maxScore = Math.max(...scores); |
| 3974 | 4075 | console.debug(`[WI] Group '${key}' max score:`, ${maxScore}`); |
| 3975 | 4076 | //console.table(group.map((entry, i) => ({ uid: entry.uid, key: JSON.stringify(entry.key), score: scores[i] }))); |
| 3976 | 4077 | |
| 3977 | 4078 | for (let i = 0; i < group.length; i++) { |
| @@ -3982,7 +4083,7 @@ function filterGroupsByScoring(groups, buffer, removeEntry, scanState) { | ||
| 3982 | 4083 | } |
| 3983 | 4084 | |
| 3984 | 4085 | if (scores[i] < maxScore) { |
| 3985 | 4086 | console.debug(`Removing[WI] Entry ${group[i].uid}`, `removed as score loser from inclusion group '${key}' entry '${group[i].uid}'`, group[i]); |
| 3986 | 4087 | removeEntry(group[i]); |
| 3987 | 4088 | group.splice(i, 1); |
| 3988 | 4089 | scores.splice(i, 1); |
| @@ -4000,7 +4101,8 @@ function filterGroupsByScoring(groups, buffer, removeEntry, scanState) { | ||
| 4000 | 4101 | * @param {number} scanState The current scan state |
| 4001 | 4102 | */ |
| 4002 | 4103 | function filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanState) { |
| 4003 | 4104 | console.debug('[WI] --- INCLUSION GROUP CHECKS BEGIN ---'); |
| 4105 | + | |
| 4004 | 4106 | const grouped = newEntries.filter(x => x.group).reduce((acc, item) => { |
| 4005 | 4107 | item.group.split(/,\s*/).filter(x => x).forEach(group => { |
| 4006 | 4108 | if (!acc[group]) { |
| @@ -4012,7 +4114,7 @@ function filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanSt | ||
| 4012 | 4114 | }, {}); |
| 4013 | 4115 | |
| 4014 | 4116 | if (Object.keys(grouped).length === 0) { |
| 4015 | 4117 | console.debug('[WI] No inclusion groups found'); |
| 4016 | 4118 | return; |
| 4017 | 4119 | } |
| 4018 | 4120 | |
| @@ -4023,7 +4125,7 @@ function filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanSt | ||
| 4023 | 4125 | continue; |
| 4024 | 4126 | } |
| 4025 | 4127 | |
| 4026 | 4128 | if (logging) console.debug(`Removing[WI] Entry ${entry.uid}`, `removed as loser from inclusion group '${entry.group}' entry '${entry.uid}'`, entry); |
| 4027 | 4129 | removeEntry(entry); |
| 4028 | 4130 | } |
| 4029 | 4131 | } |
| @@ -4031,24 +4133,24 @@ function filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanSt | ||
| 4031 | 4133 | filterGroupsByScoring(grouped, buffer, removeEntry, scanState); |
| 4032 | 4134 | |
| 4033 | 4135 | for (const [key, group] of Object.entries(grouped)) { |
| 4034 | 4136 | console.debug(`[WI] Checking inclusion group '${key}' with ${group.length} entries`, group); |
| 4035 | 4137 | |
| 4036 | 4138 | if (Array.from(allActivatedEntries).some(x => x.group === key)) { |
| 4037 | 4139 | console.debug(`[WI] Skipping inclusion group check, group already activated '${key}' was already activated`); |
| 4038 | 4140 | // We need to forcefully deactivate all other entries in the group |
| 4039 | 4141 | removeAllBut(group, null, false); |
| 4040 | 4142 | continue; |
| 4041 | 4143 | } |
| 4042 | 4144 | |
| 4043 | 4145 | if (!Array.isArray(group) || group.length <= 1) { |
| 4044 | 4146 | console.debug('[WI] Skipping inclusion group check, only one entry'); |
| 4045 | 4147 | continue; |
| 4046 | 4148 | } |
| 4047 | 4149 | |
| 4048 | 4150 | // Check for group prio |
| 4049 | 4151 | const prios = group.filter(x => x.groupOverride).sort(sortFn); |
| 4050 | 4152 | if (prios.length) { |
| 4051 | 4153 | console.debug(`Activated inclusion[WI] groupEntry '${keyprios[0].uid}'`, with`activated byas prio winner entryfrom inclusion group '${prios[0].uidkey}'`, prios[0]); |
| 4052 | 4154 | removeAllBut(group, prios[0]); |
| 4053 | 4155 | continue; |
| 4054 | 4156 | } |
| @@ -4063,14 +4165,14 @@ function filterByInclusionGroups(newEntries, allActivatedEntries, buffer, scanSt | ||
| 4063 | 4165 | currentWeight += (entry.groupWeight ?? DEFAULT_WEIGHT); |
| 4064 | 4166 | |
| 4065 | 4167 | if (rollValue <= currentWeight) { |
| 4066 | 4168 | console.debug(`Activated inclusion[WI] groupEntry '${keyentry.uid}'`, with`activated as roll winner entryfrom inclusion group '${entry.uidkey}'`, entry); |
| 4067 | 4169 | winner = entry; |
| 4068 | 4170 | break; |
| 4069 | 4171 | } |
| 4070 | 4172 | } |
| 4071 | 4173 | |
| 4072 | 4174 | if (!winner) { |
| 4073 | 4175 | console.debug(`[WI] Failed to activate inclusion group '${key}', no winner found`); |
| 4074 | 4176 | continue; |
| 4075 | 4177 | } |
| 4076 | 4178 | |
| @@ -4401,8 +4503,9 @@ function onWorldInfoChange(args, text) { | ||
| 4401 | 4503 | $('#world_info').val(null).trigger('change'); |
| 4402 | 4504 | } |
| 4403 | 4505 | } else { //if it's a pointer selection |
| 4404 | 4506 | letconst tempWorldInfo = []; |
| 4405 | - let selectedWorlds = $('#world_info').val().map((e) => Number(e)).filter((e) => !isNaN(e)); | |
| 4507 | + const val = $('#world_info').val(); | |
| 4508 | + const selectedWorlds = (Array.isArray(val) ? val : [val]).map((e) => Number(e)).filter((e) => !isNaN(e)); | |
| 4406 | 4509 | if (selectedWorlds.length > 0) { |
| 4407 | 4510 | selectedWorlds.forEach((worldIndex) => { |
| 4408 | 4511 | const existingWorldName = world_names[worldIndex]; |
| @@ -3910,6 +3910,8 @@ input[type="range"]::-webkit-slider-thumb { | ||
| 3910 | 3910 | outline: none; |
| 3911 | 3911 | background-color: var(--black50a); |
| 3912 | 3912 | line-height: calc(var(--mainFontSize) + .25rem); |
| 3913 | + max-height: 75vh; | |
| 3914 | + max-height: 75dvh; | |
| 3913 | 3915 | } |
| 3914 | 3916 | |
| 3915 | 3917 | #anchor_order { |