File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff 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
7777build_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
You can’t perform that action at this time.
0 commit comments