Skip to content

Commit

Permalink
rename variable for clarity
Browse files Browse the repository at this point in the history
Co-authored-by: Rafael Xavier de Souza <[email protected]>
  • Loading branch information
0xacx and rxaviers authored May 9, 2023
1 parent 4daa257 commit 32538e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chatgpt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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' \
Expand Down

0 comments on commit 32538e5

Please sign in to comment.