Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

change name: _display_markdown -> display_markdown.

刘棒棒ff10c9bdda72
diff --git a/metagpt/actions/execute_code.py b/metagpt/actions/execute_code.py
index 6d9135ec3..5b6cba57d 100644
--- a/metagpt/actions/execute_code.py
+++ b/metagpt/actions/execute_code.py
@@ -104,7 +104,7 @@ class ExecutePyCode(ExecuteCode, Action):
code = Syntax(code, "python", theme="paraiso-dark", line_numbers=True)
self.console.print(code)
elif language == "markdown":
- _display_markdown(code)
+ display_markdown(code)
else:
raise ValueError(f"Only support for python, markdown, but got {language}")
@@ -269,7 +269,7 @@ def remove_escape_and_color_codes(input_str):
return result
-def _display_markdown(content: str):
+def display_markdown(content: str):
# 使用正则表达式逐个匹配代码块
matches = re.finditer(r'```(.+?)```', content, re.DOTALL)
start_index = 0