From d9284a580c353cef7ab6913f4adb54ed3be52007 Mon Sep 17 00:00:00 2001 From: rabidcopy Date: Mon, 20 Mar 2023 15:50:01 -0500 Subject: [PATCH] only print manual newline with reverse prompt fix formatting of reverse prompts so they don't end up at the end of the current line while not introducing unnecessary new lines otherwise --- main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 1127e2d06..7db8de928 100644 --- a/main.cpp +++ b/main.cpp @@ -1089,7 +1089,9 @@ int main(int argc, char ** argv) { is_interacting = true; embd.back() = NEWLINE_TOKEN_ID; last_n_tokens.back() = NEWLINE_TOKEN_ID; - fprintf(stderr, "\n"); + if (params.antiprompt.size() != 0) { + fprintf(stderr, "\n"); + } } else { fprintf(stderr, " [end of text]\n"); break;