From f3612f8123941abfa5e8aae221ba5c1ab69512a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=A3=92=E6=A3=92?= Date: Thu, 18 Jan 2024 12:10:37 +0800 Subject: [PATCH] add only_code arg for WriteCodeByGenerate. --- metagpt/roles/ml_engineer_simple.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metagpt/roles/ml_engineer_simple.py b/metagpt/roles/ml_engineer_simple.py index 3f10af8d0..9ff1c9880 100644 --- a/metagpt/roles/ml_engineer_simple.py +++ b/metagpt/roles/ml_engineer_simple.py @@ -75,7 +75,7 @@ class MLEngineerSimple(Role): context = self.get_useful_memories() print(f"memories数量:{len(context)}") # print("===\n" +str(context) + "\n===") - code = await WriteCodeByGenerate().run(context=context, temperature=0.0) + code = await WriteCodeByGenerate().run(context=context, temperature=0.0, only_code=True) cause_by = WriteCodeByGenerate self.working_memory.add(Message(content=code, role="assistant", cause_by=cause_by))