🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
fix bug
geekanab55303fa101
diff --git a/examples/example.pkl b/examples/example.pklindex 0469a2e46..7c6ab901b 100644Binary files a/examples/example.pkl and b/examples/example.pkl differdiff --git a/metagpt/actions/action.py b/metagpt/actions/action.pyindex a7eb838b0..addc672bc 100644--- a/metagpt/actions/action.py+++ b/metagpt/actions/action.py@@ -35,6 +35,8 @@ class Action(SerializationMixin, ContextMixin, BaseModel):@propertydef repo(self) -> ProjectRepo:+ if not self.context.repo:+ self.context.repo = ProjectRepo(self.context.git_repo)return self.context.repo@propertydiff --git a/tests/metagpt/test_context.py b/tests/metagpt/test_context.pyindex d662a906a..d90d0b686 100644--- a/tests/metagpt/test_context.py+++ b/tests/metagpt/test_context.py@@ -48,7 +48,6 @@ def test_context_1():assert ctx.git_repo is Noneassert ctx.src_workspace is Noneassert ctx.cost_manager is not None- assert ctx.options is not Nonedef test_context_2():diff --git a/tests/metagpt/test_context_mixin.py b/tests/metagpt/test_context_mixin.pyindex a098ff0dc..a8a096d69 100644--- a/tests/metagpt/test_context_mixin.py+++ b/tests/metagpt/test_context_mixin.py@@ -95,7 +95,7 @@ def test_config_mixin_4_multi_inheritance_override_config():print(obj.__dict__.keys())assert "private_config" in obj.__dict__.keys()- assert obj.llm.model == "mock_zhipu_model"+ assert obj.config.llm.model == "mock_zhipu_model"@pytest.mark.asyncio