mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-23 15:48:11 +02:00
fix critical bug: human prior not injected
This commit is contained in:
parent
e53a0acc8e
commit
cdc9015ec6
5 changed files with 55 additions and 4 deletions
|
|
@ -164,8 +164,9 @@ class Planner(BaseModel):
|
|||
code_written = "\n\n".join(code_written)
|
||||
task_results = [task.result for task in finished_tasks]
|
||||
task_results = "\n\n".join(task_results)
|
||||
task_type_name = self.current_task.task_type.upper()
|
||||
guidance = TaskType[task_type_name].value.guidance if hasattr(TaskType, task_type_name) else ""
|
||||
task_type_name = self.current_task.task_type
|
||||
task_type = TaskType.get_type(task_type_name)
|
||||
guidance = task_type.guidance if task_type else ""
|
||||
|
||||
# combine components in a prompt
|
||||
prompt = PLAN_STATUS.format(
|
||||
|
|
|
|||
|
|
@ -71,3 +71,10 @@ class TaskType(Enum):
|
|||
@property
|
||||
def type_name(self):
|
||||
return self.value.name
|
||||
|
||||
@classmethod
|
||||
def get_type(cls, type_name):
|
||||
for member in cls:
|
||||
if member.type_name == type_name:
|
||||
return member.value
|
||||
return None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue