only assign task_type when use_tools

This commit is contained in:
lidanyang 2023-12-01 14:29:51 +08:00
parent e4a17d122c
commit 2049f6cd01
2 changed files with 8 additions and 3 deletions

View file

@ -173,7 +173,9 @@ class MLEngineer(Role):
plan_confirmed = False
while not plan_confirmed:
context = self.get_useful_memories()
rsp = await WritePlan().run(context, max_tasks=max_tasks)
rsp = await WritePlan().run(
context, max_tasks=max_tasks, use_tools=self.use_tools
)
self.working_memory.add(
Message(content=rsp, role="assistant", cause_by=WritePlan)
)