@@ -100,8 +100,8 @@ async def list_conversations():
100
100
return (jsonify (conversations ), 200 )
101
101
102
102
except Exception as e :
103
- logger .exception ("Exception in /list" )
104
- return (jsonify ({"error" : str ( e ) }), 500 )
103
+ logger .exception ("Exception in /list" + str ( e ) )
104
+ return (jsonify ({"error" : "Error While listing historical conversations" }), 500 )
105
105
106
106
107
107
@bp_chat_history_response .route ("/history/rename" , methods = ["POST" ])
@@ -152,8 +152,8 @@ async def rename_conversation():
152
152
return (jsonify (updated_conversation ), 200 )
153
153
154
154
except Exception as e :
155
- logger .exception ("Exception in /rename" )
156
- return (jsonify ({"error" : str ( e ) }), 500 )
155
+ logger .exception ("Exception in /rename" + str ( e ) )
156
+ return (jsonify ({"error" : "Error renaming is fail" }), 500 )
157
157
158
158
159
159
@bp_chat_history_response .route ("/history/read" , methods = ["POST" ])
@@ -217,8 +217,8 @@ async def get_conversation():
217
217
200 ,
218
218
)
219
219
except Exception as e :
220
- logger .exception ("Exception in /read" )
221
- return (jsonify ({"error" : str ( e ) }), 500 )
220
+ logger .exception ("Exception in /read" + str ( e ) )
221
+ return (jsonify ({"error" : "Error while fetching history conversation" }), 500 )
222
222
223
223
224
224
@bp_chat_history_response .route ("/history/delete" , methods = ["DELETE" ])
@@ -266,8 +266,8 @@ async def delete_conversation():
266
266
200 ,
267
267
)
268
268
except Exception as e :
269
- logger .exception ("Exception in /delete" )
270
- return (jsonify ({"error" : str ( e ) }), 500 )
269
+ logger .exception ("Exception in /delete" + str ( e ) )
270
+ return (jsonify ({"error" : "Error while deleting history conversation" }), 500 )
271
271
272
272
273
273
@bp_chat_history_response .route ("/history/delete_all" , methods = ["DELETE" ])
@@ -320,8 +320,8 @@ async def delete_all_conversations():
320
320
)
321
321
322
322
except Exception as e :
323
- logger .exception ("Exception in /delete" )
324
- return (jsonify ({"error" : str ( e ) }), 500 )
323
+ logger .exception ("Exception in /delete" + str ( e ) )
324
+ return (jsonify ({"error" : "Error while deleting all history conversation" }), 500 )
325
325
326
326
327
327
@bp_chat_history_response .route ("/history/update" , methods = ["POST" ])
@@ -412,8 +412,8 @@ async def update_conversation():
412
412
)
413
413
414
414
except Exception as e :
415
- logger .exception ("Exception in /update" )
416
- return (jsonify ({"error" : str ( e ) }), 500 )
415
+ logger .exception ("Exception in /update" + str ( e ) )
416
+ return (jsonify ({"error" : "Error while update the history conversation" }), 500 )
417
417
418
418
419
419
@bp_chat_history_response .route ("/history/frontend_settings" , methods = ["GET" ])
@@ -428,8 +428,8 @@ def get_frontend_settings():
428
428
)
429
429
return jsonify ({"CHAT_HISTORY_ENABLED" : chat_history_enabled }), 200
430
430
except Exception as e :
431
- logger .exception ("Exception in /frontend_settings" )
432
- return (jsonify ({"error" : str ( e ) }), 500 )
431
+ logger .exception ("Exception in /frontend_settings" + str ( e ) )
432
+ return (jsonify ({"error" : "Error while getting frontend settings" }), 500 )
433
433
434
434
435
435
async def generate_title (conversation_messages ):
0 commit comments