From e5055f0971678a1cb25a938664a84fea19bcc4cd Mon Sep 17 00:00:00 2001 From: nhamanasu Date: Wed, 26 Jul 2023 19:49:51 +0900 Subject: [PATCH] fix: remove the unnecessary last \n --- examples/server/chat-llama2.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/server/chat-llama2.sh b/examples/server/chat-llama2.sh index 515347493..1fc79b7e1 100644 --- a/examples/server/chat-llama2.sh +++ b/examples/server/chat-llama2.sh @@ -81,6 +81,8 @@ while True: sys.stdout.flush() answer += content +answer = answer.rstrip('\n') + # Write the answer to the temporary file with open('$TEMPFILE', 'w') as f: f.write(answer)