Skip to content

Commit ea1a18b

Browse files
committed
Fix mixed space tab
Update indentation of some lines to improve tab usage consistency. There are no functional changes to the code.
1 parent 5e572eb commit ea1a18b

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

chatgpt.sh

+16-16
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ request_to_completions() {
7070
-H 'Content-Type: application/json' \
7171
-H "Authorization: Bearer $OPENAI_KEY" \
7272
-d '{
73-
"model": "'"$MODEL"'",
74-
"prompt": "'"$prompt"'",
75-
"max_tokens": '$MAX_TOKENS',
76-
"temperature": '$TEMPERATURE'
73+
"model": "'"$MODEL"'",
74+
"prompt": "'"$prompt"'",
75+
"max_tokens": '$MAX_TOKENS',
76+
"temperature": '$TEMPERATURE'
7777
}'
7878
}
7979

@@ -86,9 +86,9 @@ request_to_image() {
8686
-H 'Content-Type: application/json' \
8787
-H "Authorization: Bearer $OPENAI_KEY" \
8888
-d '{
89-
"prompt": "'"${prompt#*image:}"'",
90-
"n": 1,
91-
"size": "'"$SIZE"'"
89+
"prompt": "'"${prompt#*image:}"'",
90+
"n": 1,
91+
"size": "'"$SIZE"'"
9292
}')
9393
}
9494

@@ -101,14 +101,14 @@ request_to_chat() {
101101
-H 'Content-Type: application/json' \
102102
-H "Authorization: Bearer $OPENAI_KEY" \
103103
-d '{
104-
"model": "'"$MODEL"'",
105-
"messages": [
106-
{"role": "system", "content": "'"$SYSTEM_PROMPT"'"},
107-
'"$message"'
108-
],
109-
"max_tokens": '$MAX_TOKENS',
110-
"temperature": '$TEMPERATURE'
111-
}'
104+
"model": "'"$MODEL"'",
105+
"messages": [
106+
{"role": "system", "content": "'"$SYSTEM_PROMPT"'"},
107+
'"$message"'
108+
],
109+
"max_tokens": '$MAX_TOKENS',
110+
"temperature": '$TEMPERATURE'
111+
}'
112112
}
113113

114114
# build chat context before each request for /completions (all models except
@@ -125,7 +125,7 @@ build_chat_context() {
125125
}
126126

127127
escape(){
128-
echo "$1" | jq -Rrs 'tojson[1:-1]'
128+
echo "$1" | jq -Rrs 'tojson[1:-1]'
129129
}
130130

131131
# maintain chat context function for /completions (all models except

0 commit comments

Comments
 (0)