@@ -253,7 +253,7 @@ func main() {
253
253
os .Exit (0 )
254
254
}
255
255
if len (* logFile ) > 0 {
256
- utils .LogToFile (input , "User " , "log.txt" )
256
+ utils .LogToFile (input , "USER_QUERY " , "log.txt" )
257
257
}
258
258
// Use preprompt for first message
259
259
if previousMessages == "" {
@@ -265,7 +265,7 @@ func main() {
265
265
Provider : * provider ,
266
266
})
267
267
if len (* logFile ) > 0 {
268
- utils .LogToFile (responseTxt , "Assistant " , "log.txt" )
268
+ utils .LogToFile (responseTxt , "ASSISTANT_RESPONSE " , "log.txt" )
269
269
}
270
270
previousMessages += responseJson
271
271
history = append (history , input )
@@ -294,13 +294,22 @@ func main() {
294
294
os .Exit (1 )
295
295
}
296
296
if len (userInput ) > 0 {
297
+ if len (* logFile ) > 0 {
298
+ utils .LogToFile (userInput , "USER_QUERY" , "log.txt" )
299
+ }
300
+
297
301
responseJson , responseTxt := getData (userInput , true , structs.ExtraOptions {
298
302
PrevMessages : previousMessages ,
299
303
Provider : * provider ,
300
304
ThreadID : threadID ,
301
305
})
306
+
302
307
previousMessages += responseJson
303
308
lastResponse = responseTxt
309
+
310
+ if len (* logFile ) > 0 {
311
+ utils .LogToFile (responseTxt , "ASSISTANT_RESPONSE" , "log.txt" )
312
+ }
304
313
}
305
314
306
315
}
@@ -482,7 +491,7 @@ func showHelpMessage() {
482
491
fmt .Printf ("%-50v Set temperature\n " , "--temperature" )
483
492
fmt .Printf ("%-50v Set top_p\n " , "--top_p" )
484
493
fmt .Printf ("%-50v Set max response length\n " , "--max_length" )
485
- fmt .Printf ("%-50v Set filepath to log conversation to\n " , "--log" )
494
+ fmt .Printf ("%-50v Set filepath to log conversation to (For interactive modes) \n " , "--log" )
486
495
fmt .Printf ("%-50v Execute shell command without confirmation\n " , "-y" )
487
496
488
497
boldBlue .Println ("\n Options:" )
0 commit comments