Merge pull request #1008 from mweldon/novel-generate-until-sentence

Novel generate until sentence
This commit is contained in:
Cohee 2023-08-24 11:25:56 +03:00 committed by GitHub
commit 3e25c3f51c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 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,7 @@ function addChatsPreamble(mesSendString) {
}
function addChatsSeparator(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,