🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
feat: +note
莘权 马bda2e06d368e
diff --git a/metagpt/roles/role.py b/metagpt/roles/role.pyindex c363d332c..28d2fe693 100644--- a/metagpt/roles/role.py+++ b/metagpt/roles/role.py@@ -523,19 +523,26 @@ class Role(SerializationMixin, ContextMixin, BaseModel):return not self.rc.news and not self.rc.todo and self.rc.msg_buffer.empty()async def think(self) -> Action:- """The exported `think` function"""- await self._observe()+ """+ Export SDK API, used by AgentStore RPC.+ The exported `think` function+ """+ await self._observe() # For compatibility with the old version of the Agent.await self._think()return self.rc.todoasync def act(self) -> ActionOutput:- """The exported `act` function"""+ """+ Export SDK API, used by AgentStore RPC.+ The exported `act` function+ """msg = await self._act()return ActionOutput(content=msg.content, instruct_content=msg.instruct_content)@propertydef action_description(self) -> str:"""+ Export SDK API, used by AgentStore RPC.AgentStore uses this attribute to display to the user what actions the current role should take."""if self.rc.todo: