Commit e4f9e64 1 parent 138814d commit e4f9e64 Copy full SHA for e4f9e64
File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -259,7 +259,10 @@ def render_chat_history(self):
259
259
continue
260
260
with st .chat_message (role , avatar = self .avatars .get (role )):
261
261
with contextlib .suppress (KeyError ):
262
- st .caption (f"{ message ['chat_model' ]} , { message ['timestamp' ]} " )
262
+ if role == "assistant" :
263
+ st .caption (message ["chat_model" ])
264
+ else :
265
+ st .caption (message ["timestamp" ])
263
266
st .markdown (message ["content" ])
264
267
with contextlib .suppress (KeyError ):
265
268
if audio := message .get ("reply_audio_file_path" ):
@@ -403,7 +406,6 @@ def _render_chatbot_page(self): # noqa: PLR0915
403
406
"name" : self .chat_obj .username ,
404
407
"content" : prompt ,
405
408
"timestamp" : time_now ,
406
- "chat_model" : self .chat_obj .model ,
407
409
}
408
410
)
409
411
@@ -418,6 +420,7 @@ def _render_chatbot_page(self): # noqa: PLR0915
418
420
"name" : self .chat_obj .assistant_name ,
419
421
"content" : reply ["text" ],
420
422
"reply_audio_file_path" : reply ["audio" ],
423
+ "chat_model" : self .chat_obj .model ,
421
424
}
422
425
)
423
426
You can’t perform that action at this time.
0 commit comments