mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-11 15:15:18 +02:00
add important logging for DebugError
This commit is contained in:
parent
39a0a837dc
commit
144af68c09
1 changed files with 4 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue