diff --git a/README.md b/README.md index 19869a34f..f6dd33791 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # MetaGPT: The Multi-Agent Framework
diff --git a/docs/README_CN.md b/docs/README_CN.md index e7a6413f4..cc4dfee34 100644 --- a/docs/README_CN.md +++ b/docs/README_CN.md @@ -1,7 +1,7 @@ # MetaGPT: 多智能体框架
diff --git a/docs/README_JA.md b/docs/README_JA.md index 5de7f5d37..040a852f6 100644 --- a/docs/README_JA.md +++ b/docs/README_JA.md @@ -1,7 +1,7 @@ # MetaGPT: マルチエージェントフレームワーク
diff --git a/docs/resources/MetaGPT-new-log.png b/docs/resources/MetaGPT-new-log.png
new file mode 100644
index 000000000..23e304a9b
Binary files /dev/null and b/docs/resources/MetaGPT-new-log.png differ
diff --git a/metagpt/roles/role.py b/metagpt/roles/role.py
index c3c2a4662..44bb3e976 100644
--- a/metagpt/roles/role.py
+++ b/metagpt/roles/role.py
@@ -11,9 +11,9 @@ from typing import Iterable, Type
from pydantic import BaseModel, Field
-from metagpt.actions import Action, ActionOutput
# from metagpt.environment import Environment
from metagpt.config import CONFIG
+from metagpt.actions import Action, ActionOutput
from metagpt.llm import LLM
from metagpt.logs import logger
from metagpt.memory import Memory, LongTermMemory
@@ -169,7 +169,7 @@ class Role:
# logger.info(response)
if isinstance(response, ActionOutput):
msg = Message(content=response.content, instruct_content=response.instruct_content,
- role=self.profile, cause_by=type(self._rc.todo))
+ role=self.profile, cause_by=type(self._rc.todo))
else:
msg = Message(content=response, role=self.profile, cause_by=type(self._rc.todo))
self._rc.memory.add(msg)
@@ -184,9 +184,8 @@ class Role:
env_msgs = self._rc.env.memory.get()
observed = self._rc.env.memory.get_by_actions(self._rc.watch)
-
- self._rc.news = self._rc.memory.find_news(
- observed) # find news (previously unseen messages) from observed messages
+
+ self._rc.news = self._rc.memory.find_news(observed) # find news (previously unseen messages) from observed messages
for i in env_msgs:
self.recv(i)
diff --git a/metagpt/utils/common.py b/metagpt/utils/common.py
index 2570d0aca..59d179808 100644
--- a/metagpt/utils/common.py
+++ b/metagpt/utils/common.py
@@ -86,8 +86,8 @@ class OutputParser:
@staticmethod
def parse_python_code(text: str) -> str:
for pattern in (
- r"(.*?```python.*?\s+)?(?P.*)(```.*?)",
- r"(.*?```python.*?\s+)?(?P.*)",
+ r"(.*?```python.*?\s+)?(?P.*)(```.*?)",
+ r"(.*?```python.*?\s+)?(?P.*)",
):
match = re.search(pattern, text, re.DOTALL)
if not match:
@@ -180,7 +180,7 @@ class OutputParser:
if start_index != -1 and end_index != -1:
# Extract the structure part
- structure_text = text[start_index: end_index + 1]
+ structure_text = text[start_index : end_index + 1]
try:
# Attempt to convert the text to a Python data type using ast.literal_eval