perf: markdown render perf

This commit is contained in:
Soulter
2023-06-10 10:33:14 +00:00
parent 6e69e88e91
commit a89e92d5cc
2 changed files with 2 additions and 2 deletions

View File

@@ -79,7 +79,7 @@ class ProviderRevEdgeGPT(Provider):
await self.forget()
err_count += 1
continue
reply_msg += f"\n{throttling['numUserMessagesInConversation']}/{throttling['maxNumUserMessagesInConversation']}"
reply_msg += f"\n[{throttling['numUserMessagesInConversation']}/{throttling['maxNumUserMessagesInConversation']}]"
break
except BaseException as e:
gu.log(str(e), level=gu.LEVEL_WARNING, tag="RevEdgeGPT")

View File

@@ -189,7 +189,7 @@ def render_markdown(markdown_text, image_width=800, image_height=600, font_size=
i += 1
line = line.strip()
if pre_in_code and not line.startswith("```"):
height += font_size+2
height += font_size+4
# pre_codes.append(line)
continue
if line.startswith("#"):