rename variable for clarity

Co-authored-by: Rafael Xavier de Souza <rxaviers@gmail.com>
pull/87/head
0xacx 1 year ago committed by GitHub
parent 4daa2571ad
commit 32538e58a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      chatgpt.sh

@ -97,7 +97,7 @@ request_to_image() {
request_to_chat() {
message="$1"
# escape quotation marks and newlines in the prompt
escaped_prompt=$(echo "$SYSTEM_PROMPT" | sed 's/"/\\"/g' | sed ':a;N;$!ba;s/\n/\\n/g')
escaped_system_prompt=$(echo "$SYSTEM_PROMPT" | sed 's/"/\\"/g' | sed ':a;N;$!ba;s/\n/\\n/g')
response=$(curl https://api.openai.com/v1/chat/completions \
-sS \
-H 'Content-Type: application/json' \

Loading…
Cancel
Save