mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-26 15:49:42 +02:00
1. role.py - 如果已经有plan,便不再重复生成
2. 修改prompt,让predictions.csv生成的格式与原gt格式一样
This commit is contained in:
parent
0e5db1c364
commit
f28908e4c5
5 changed files with 14 additions and 11 deletions
|
|
@ -478,10 +478,10 @@ class Role(SerializationMixin, ContextMixin, BaseModel):
|
|||
|
||||
async def _plan_and_act(self) -> Message:
|
||||
"""first plan, then execute an action sequence, i.e. _think (of a plan) -> _act -> _act -> ... Use llm to come up with the plan dynamically."""
|
||||
|
||||
# create initial plan and update it until confirmation
|
||||
goal = self.rc.memory.get()[-1].content # retreive latest user requirement
|
||||
await self.planner.update_plan(goal=goal)
|
||||
if not self.planner.plan.goal:
|
||||
# create initial plan and update it until confirmation
|
||||
goal = self.rc.memory.get()[-1].content # retreive latest user requirement
|
||||
await self.planner.update_plan(goal=goal)
|
||||
|
||||
# take on tasks until all finished
|
||||
while self.planner.current_task:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue