Keldos commited on
Commit
1d95aeb
1 Parent(s): 0e763ee

fix: 修复有序列表第一项可能不被渲染的问题

Browse files
Files changed (2) hide show
  1. modules/models/base_model.py +1 -1
  2. modules/utils.py +1 -1
modules/models/base_model.py CHANGED
@@ -77,7 +77,7 @@ def get_action_description(text):
77
  action_name = json_dict['action']
78
  action_input = json_dict['action_input']
79
  if action_name != "Final Answer":
80
- return f'<!-- S O PREFIX --><p class="agent-prefix">{action_name}: {action_input}</p><!-- E O PREFIX -->'
81
  else:
82
  return ""
83
 
 
77
  action_name = json_dict['action']
78
  action_input = json_dict['action_input']
79
  if action_name != "Final Answer":
80
+ return f'<!-- S O PREFIX --><p class="agent-prefix">{action_name}: {action_input}\n\n</p><!-- E O PREFIX -->'
81
  else:
82
  return ""
83
 
modules/utils.py CHANGED
@@ -249,7 +249,7 @@ def convert_bot_before_marked(chat_message):
249
  code = f"\n```{code}\n```"
250
  result.append(code)
251
  result = "".join(result)
252
- md = f'<div class="md-message">{result}\n</div>'
253
  return raw + md
254
 
255
  def convert_user_before_marked(chat_message):
 
249
  code = f"\n```{code}\n```"
250
  result.append(code)
251
  result = "".join(result)
252
+ md = f'<div class="md-message">\n\n{result}\n</div>'
253
  return raw + md
254
 
255
  def convert_user_before_marked(chat_message):