1
0
Fork 0
mirror of https://gitlab.com/niansa/discord_llama.git synced 2025-03-06 20:48:25 +01:00

More linebreak fixes

This commit is contained in:
niansa/tuxifan 2023-05-17 12:45:10 +02:00
parent 37bbb2535a
commit 4d368b6214

View file

@ -311,7 +311,7 @@ private:
// Instruct mode user prompt
if (channel_cfg.instruct_mode) {
// Append line as-is
if (!co_await inference->append((channel_cfg.model->no_extra_linebreaks?"":"\n\n")
if (!co_await inference->append((channel_cfg.model->no_extra_linebreaks?"\n":"\n\n")
+std::string(co_await llm_translate_to_en(msg.content, channel_cfg.model->no_translate))
+(channel_cfg.model->no_extra_linebreaks?"":"\n"), cb)) {
std::cerr << "Warning: Failed to append user prompt: " << inference->get_last_error() << std::endl;
@ -336,7 +336,7 @@ private:
if (channel_cfg.instruct_mode) {
co_return co_await inference->append((channel_cfg.model->no_extra_linebreaks?"":"\n")
+channel_cfg.model->bot_prompt
+(channel_cfg.model->no_extra_linebreaks?"\n":"\n\n"));
+(channel_cfg.model->no_extra_linebreaks?"":"\n\n"));
} else {
co_return co_await inference->append(bot.me.username+':', show_console_progress);
}