mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
(EXPERIMENTAL) Subtract amount_gen tokens from max content amount
This commit is contained in:
@@ -1331,7 +1331,9 @@ async function Generate(type, automatic_trigger, force_name2) {
|
|||||||
console.log('post replace chat.length = ' + chat.length);
|
console.log('post replace chat.length = ' + chat.length);
|
||||||
//chat2 = chat2.reverse();
|
//chat2 = chat2.reverse();
|
||||||
var this_max_context = 1487;
|
var this_max_context = 1487;
|
||||||
if (main_api == 'kobold') this_max_context = max_context;
|
if (main_api == 'kobold' || main_api == 'textgenerationwebui') {
|
||||||
|
this_max_context = (max_context - amount_gen);
|
||||||
|
}
|
||||||
if (main_api == 'novel') {
|
if (main_api == 'novel') {
|
||||||
if (novel_tier === 1) {
|
if (novel_tier === 1) {
|
||||||
this_max_context = 1024;
|
this_max_context = 1024;
|
||||||
@@ -1345,9 +1347,6 @@ async function Generate(type, automatic_trigger, force_name2) {
|
|||||||
if (main_api == 'openai') {
|
if (main_api == 'openai') {
|
||||||
this_max_context = oai_settings.openai_max_context;
|
this_max_context = oai_settings.openai_max_context;
|
||||||
}
|
}
|
||||||
if (main_api == 'textgenerationwebui') {
|
|
||||||
this_max_context = (max_context - amount_gen);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (main_api == 'poe') {
|
if (main_api == 'poe') {
|
||||||
this_max_context = Math.min(Number(max_context), POE_MAX_CONTEXT);
|
this_max_context = Math.min(Number(max_context), POE_MAX_CONTEXT);
|
||||||
|
Reference in New Issue
Block a user