FastChat
FastChat copied to clipboard
How can I enter new line on CLI
I'd like ask questions with multiple paragraphs. According to the model itself:
USER: how can I type new line here?
ASSISTANT: To create a new line in this text input, you can press the `Enter` key on your keyboard. This will create a line break and move to the next line. Alternatively, you can use the `Shift + Enter` key combination to create a line break without moving the cursor to the next line.
USER:
exit...
But if I hit Enter, the script exits...
Please advise.
Unfortunately, I don't think the CLI supports it currently, but a workaround is typing the message in a basic text editor and then copying and pasting into the terminal.
@suquark seems like a bug on the CLI? It currently uses enter as an exit signal
Oh, I just follows the original CLI behavior, where enter in the empty line exits the console. This indeed sounds not user friendly. I'll improve it.
Also the suggestion from the bot would only work on a website, as most console does realize shift
in shift+enter
; but our model (or other models) clearly cannot know it is running in a console w/o being told so. So I think this is a UI issue, not a bug.
Has this issue been fixed? If we want to chat for multiple rounds, which command to use to avoid this UI issue?
@suquark What are the issues with multiline input?
https://github.com/lm-sys/FastChat/blob/51ed4fab89f61988e8395a3268595f1effb8528f/fastchat/serve/cli.py#L55-L61
It works fine on Linux, I just changed multiline
to True
and use ESC
+ Enter
to submit.
Edit: thought I should mention, when using rich style output.
ping @suquark