0xacx / chatGPT-shell-cli

Simple shell script to use OpenAI's ChatGPT and DALL-E from the terminal. No Python or JS required.
https://gptshell.cc
MIT License
1.11k stars 157 forks source link

Issue with escaping of newlines #96

Closed np closed 1 year ago

np commented 1 year ago
$ chatgpt -p 'How many newlines in the following string: "
>
> "'

  There are no newlines in the string "  ". It consists of two spaces.

Indeed literal newlines are converted into spaces the actual message sent is: {"role": "user", "content": "How many newlines in the following string: \" \""}

Current escaping has other limitations, I'm making a PR.