sriting commited on
Commit
68d7896
·
1 Parent(s): 33e5eeb

fix: type error

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -237,8 +237,10 @@ def submit(sender_value, chatbot_value):
237
  else:
238
  reasoning_duration = 0.0
239
  thought_cost_time = "0.00"
240
- message_content[-2]["options"]["title"] = f"End of Thought ({thought_cost_time}s)"
241
- message_content[-2]["options"]["status"] = "done"
 
 
242
 
243
  yield {chatbot: gr.update(value=chatbot_value)}
244
 
@@ -260,8 +262,9 @@ def submit(sender_value, chatbot_value):
260
  thought_cost_time = "0.00"
261
  else:
262
  thought_cost_time = "{:.2f}".format(reasoning_duration)
263
- message_content[-2]["options"]["title"] = f"End of Thought ({thought_cost_time}s)"
264
- message_content[-2]["options"]["status"] = "done"
 
265
 
266
  chatbot_value[-1]["loading"] = False
267
  yield {chatbot: gr.update(value=chatbot_value)}
 
237
  else:
238
  reasoning_duration = 0.0
239
  thought_cost_time = "0.00"
240
+ # Simplify options structure
241
+ message_content[-2]["options"] = {
242
+ "title": f"End of Thought ({thought_cost_time}s)"
243
+ }
244
 
245
  yield {chatbot: gr.update(value=chatbot_value)}
246
 
 
262
  thought_cost_time = "0.00"
263
  else:
264
  thought_cost_time = "{:.2f}".format(reasoning_duration)
265
+ message_content[-2]["options"] = {
266
+ "title": f"End of Thought ({thought_cost_time}s)"
267
+ }
268
 
269
  chatbot_value[-1]["loading"] = False
270
  yield {chatbot: gr.update(value=chatbot_value)}