add important logging for DebugError

This commit is contained in:
yzlin 2023-08-01 14:35:52 +08:00
parent 39a0a837dc
commit 144af68c09

View file

@ -6,6 +6,8 @@
@File : debug_error.py
"""
import re
from metagpt.logs import logger
from metagpt.actions.action import Action
from metagpt.utils.common import CodeParser
@ -38,6 +40,8 @@ class DebugError(Action):
file_name = re.search("## File To Rewrite:\s*(.+\\.py)", context).group(1)
logger.info(f"Debug and rewrite {file_name}")
prompt = PROMPT_TEMPLATE.format(context=context)
rsp = await self._aask(prompt)