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() {
71
71
}
72
72
73
73
# build chat context before each request for /completions (all models except
74
- # gpt turbo)
74
+ # gpt turbo and gpt 4 )
75
75
# $1 should be the chat context
76
76
# $2 should be the escaped prompt
77
77
build_chat_context () {
@@ -85,7 +85,8 @@ build_chat_context() {
85
85
request_prompt=" ${chat_context// $' \n ' / \\ n} "
86
86
}
87
87
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)
89
90
# builds chat context from response,
90
91
# keeps chat context length under max token limit
91
92
# $1 should be the chat context
@@ -349,9 +350,8 @@ while $running; do
349
350
escaped_response_data=$( echo " $response_data " | sed ' s/"/\\"/g' )
350
351
maintain_chat_context " $chat_context " " $escaped_response_data "
351
352
fi
352
- echo " this"
353
- echo $response_data
353
+
354
354
timestamp=$( date +" %d/%m/%Y %H:%M" )
355
355
echo -e " $timestamp $prompt \n$response_data \n" >> ~/.chatgpt_history
356
356
fi
357
- done
357
+ done
You can’t perform that action at this time.
0 commit comments