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)