Fix Novel tablet tier context size

This commit is contained in:
Cohee
2023-06-29 18:32:57 +03:00
parent 89f905f0e2
commit d813ec4ef3

View File

@ -2769,12 +2769,9 @@ function getMaxContextSize() {
this_max_context = (max_context - amount_gen); this_max_context = (max_context - amount_gen);
} }
if (main_api == 'novel') { if (main_api == 'novel') {
if (novel_tier === 1) {
this_max_context = 1024;
} else {
this_max_context = Number(max_context); this_max_context = Number(max_context);
if (nai_settings.model_novel == 'krake-v2') { if (nai_settings.model_novel == 'krake-v2' || nai_settings.model_novel == 'euterpe-v2') {
// Krake has a max context of 2048 // Krake and Euterpe have a max context of 2048
// Should be used with nerdstash tokenizer for best results // Should be used with nerdstash tokenizer for best results
this_max_context = Math.min(max_context, 2048); this_max_context = Math.min(max_context, 2048);
} }
@ -2784,7 +2781,6 @@ function getMaxContextSize() {
this_max_context = Math.min(max_context, 8192); this_max_context = Math.min(max_context, 8192);
} }
} }
}
if (main_api == 'openai') { if (main_api == 'openai') {
this_max_context = oai_settings.openai_max_context; this_max_context = oai_settings.openai_max_context;
} }