File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -125,8 +125,8 @@ request_to_image() {
125125# $1 should be the message(s) formatted with role and content
126126request_to_chat () {
127127 local message=" $1 "
128- # escape quotation marks and newlines in the prompt
129- escaped_system_prompt= $( echo " $SYSTEM_PROMPT " | sed ' s/"/\\"/g ' | sed ' :a;N;$!ba;s/\n/\\n/g ' )
128+ escaped_system_prompt= $( escape " $SYSTEM_PROMPT " )
129+
130130 curl https://api.openai.com/v1/chat/completions \
131131 -sS \
132132 -H ' Content-Type: application/json' \
@@ -321,7 +321,7 @@ while $running; do
321321 if [ -z " $pipe_mode_prompt " ]; then
322322 if [ $MULTI_LINE_PROMPT = true ]; then
323323 echo -e " \nEnter a prompt: (Press Enter then Ctrl-D to send)"
324- cat > " ${USER_INPUT_TEMP_FILE} "
324+ cat > " ${USER_INPUT_TEMP_FILE} "
325325 input_from_temp_file=$( cat " ${USER_INPUT_TEMP_FILE} " )
326326 prompt=$( escape " $input_from_temp_file " )
327327 else
You can’t perform that action at this time.
0 commit comments