chatGPT-shell-cli icon indicating copy to clipboard operation
chatGPT-shell-cli copied to clipboard

Use Ctrl-D to exit like bash, Use Ctrl-C to cancel input

Open Freed-Wu opened this issue 2 years ago • 3 comments

TIA!

Freed-Wu avatar Jul 14 '23 06:07 Freed-Wu

Currenly, this program detect input and if input is exit, it will exit. However, it limit its usage. which make it even cannot be a translator:

> Please translate the following word to Chinese, just input Chinese.

Sure, please provide the word or phrase you would like me to translate to Chinese.

> hello

你好 (nǐ hǎo)

> exit

退出 (tuìchū)

I suggest give up the function exit/q to exit, just use C-D to replace it. The name of this program is ChatGPT-shell, Why not make it like a true bash?

Freed-Wu avatar Jul 14 '23 06:07 Freed-Wu

Well, did you check the big prompt option?

  -b, --big-prompt           Allow multi-line prompts during chat mode

It can be improved, of course. Instead of using the cat command, there is some things you can do to use bash readline with read command. My chatgpt.sh wrapper is probably too code-spaghetty to be readable but multiline input can be implemented in various ways.

mountaineerbr avatar Jul 14 '23 11:07 mountaineerbr

I'm not sure if i'm using the option properly but when asking chatgpt it tells me the same thing that option isn't properly "mapped".

chatgpt

Yes, there is a bug in the script. The bug is in the section where the script checks for the --big-prompt option. The script incorrectly uses the --big-prompt option instead of the correct option --multi-line-prompt . To fix the bug, you need to replace all occurrences of --big-prompt with --multi-line-prompt in the script.

martin-bernholc avatar Jul 18 '23 10:07 martin-bernholc