Skip to content

Commit 706b4d2

Browse files
committed
Cleanup debug log
1 parent c3681f6 commit 706b4d2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

chatgpt.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ request_to_chat() {
7171
}
7272

7373
# build chat context before each request for /completions (all models except
74-
# gpt turbo)
74+
# gpt turbo and gpt 4)
7575
# $1 should be the chat context
7676
# $2 should be the escaped prompt
7777
build_chat_context() {
@@ -85,7 +85,8 @@ build_chat_context() {
8585
request_prompt="${chat_context//$'\n'/\\n}"
8686
}
8787

88-
# maintain chat context function for /completions (all models except gpt turbo)
88+
# maintain chat context function for /completions (all models except
89+
# gpt turbo and gpt 4)
8990
# builds chat context from response,
9091
# keeps chat context length under max token limit
9192
# $1 should be the chat context
@@ -349,9 +350,8 @@ while $running; do
349350
escaped_response_data=$(echo "$response_data" | sed 's/"/\\"/g')
350351
maintain_chat_context "$chat_context" "$escaped_response_data"
351352
fi
352-
echo "this"
353-
echo $response_data
353+
354354
timestamp=$(date +"%d/%m/%Y %H:%M")
355355
echo -e "$timestamp $prompt \n$response_data \n" >>~/.chatgpt_history
356356
fi
357-
done
357+
done

0 commit comments

Comments
 (0)