@@ -562,7 +562,6 @@ def save_as_json(self, force: bool = True):
562562 )
563563 return
564564
565-
566565 # Ensure we have a valid save path
567566 if not self .save_filepath :
568567 self .save_filepath = os .path .join (
@@ -577,7 +576,12 @@ def save_as_json(self, force: bool = True):
577576
578577 # Save with proper formatting
579578 with open (self .save_filepath , "w" , encoding = "utf-8" ) as f :
580- json .dump (self .conversation_history , f , indent = 4 , default = str )
579+ json .dump (
580+ self .conversation_history ,
581+ f ,
582+ indent = 4 ,
583+ default = str ,
584+ )
581585
582586 logger .info (f"Conversation saved to { self .save_filepath } " )
583587
@@ -611,9 +615,14 @@ def save_as_yaml(self, force: bool = True):
611615 with open (self .save_filepath , "w" , encoding = "utf-8" ) as f :
612616 yaml .dump (
613617 self .conversation_history ,
614- f , indent = 4 , default_flow_style = False , sort_keys = False
618+ f ,
619+ indent = 4 ,
620+ default_flow_style = False ,
621+ sort_keys = False ,
622+ )
623+ logger .info (
624+ f"Conversation saved to { self .save_filepath } "
615625 )
616- logger .info (f"Conversation saved to { self .save_filepath } " )
617626
618627 except Exception as e :
619628 logger .error (
0 commit comments