Skip to content

Commit

Permalink
alway add newline at the of stream
Browse files Browse the repository at this point in the history
Sometimes the answer from model does not end with newline.
When we stream we do not add newline so the command line can be broken.
This does not affect no-stream flow.
  • Loading branch information
xsuchy authored and jpodivin committed Aug 30, 2024
1 parent bd5c0cd commit 3dc8475
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions logdetective/logdetective.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def main():
for chunk in response:
delta = chunk['choices'][0]['text']
print(delta, end='', flush=True)
print()


if __name__ == "__main__":
Expand Down

0 comments on commit 3dc8475

Please sign in to comment.