Set generate_until_sentence for NovelAI

* Set generate_until_sentence true for NovelAI
* Add a Story String file for NovelAI with persona before character
  which works better
* Remove hardcoded dinkus for chat_start since it is in the Story String
This commit is contained in:
Mike Weldon 2023-08-23 18:04:56 -07:00
parent 4aa31fcba9
commit 1d1109e43b
3 changed files with 11 additions and 5 deletions

View File

@ -0,0 +1,6 @@
{
"name": "NovelAI",
"story_string": "{{#if system}}{{system}}{{/if}}\n{{#if wiBefore}}{{wiBefore}}{{/if}}\n{{#if persona}}{{persona}}{{/if}}\n{{#if description}}{{description}}{{/if}}\n{{#if personality}}Personality: {{personality}}{{/if}}\n{{#if scenario}}Scenario: {{scenario}}{{/if}}\n{{#if wiAfter}}{{wiAfter}}{{/if}}",
"chat_start": "***",
"example_separator": "***"
}

View File

@ -3332,11 +3332,11 @@ function addChatsPreamble(mesSendString) {
}
function addChatsSeparator(mesSendString) {
if (main_api === 'novel') {
return '***\n' + mesSendString;
}
// if (main_api === 'novel') {
// return '***\n' + mesSendString;
// }
else if (power_user.context.chat_start) {
if (power_user.context.chat_start) {
return power_user.context.chat_start + '\n' + mesSendString;
}

View File

@ -1920,7 +1920,7 @@ app.post("/generate_novelai", jsonParser, async function (request, response_gene
"stop_sequences": request.body.stop_sequences,
"bad_words_ids": badWordsList,
"logit_bias_exp": logit_bias_exp,
//generate_until_sentence = true;
"generate_until_sentence": request.body.generate_until_sentence,
"use_cache": request.body.use_cache,
"use_string": true,
"return_full_text": request.body.return_full_text,