Skip to content

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

refine writeprd code

geekan4feea49b22b6
diff --git a/metagpt/schema.py b/metagpt/schema.py
index e9434b9c0..0a7a07b03 100644
--- a/metagpt/schema.py
+++ b/metagpt/schema.py
@@ -36,7 +36,6 @@ from pydantic import (
model_validator,
)
-from metagpt.actions.action_output import ActionOutput
from metagpt.const import (
MESSAGE_ROUTE_CAUSE_BY,
MESSAGE_ROUTE_FROM,
@@ -174,11 +173,12 @@ class Documents(BaseModel):
docs = {doc.filename: doc for doc in documents}
return Documents(docs=docs)
- def to_action_output(self) -> ActionOutput:
+ def to_action_output(self) -> "ActionOutput":
"""Convert to action output string.
:return: A string representing action output.
"""
+ from metagpt.actions.action_output import ActionOutput
return ActionOutput(content=self.model_dump_json(), instruct_content=self)