mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-15 11:02:36 +02:00
update: cr增加兜底提示
This commit is contained in:
parent
35075134c2
commit
93b5716e8c
2 changed files with 5 additions and 4 deletions
|
|
@ -49,9 +49,11 @@ class CodeReview:
|
|||
async with aiofiles.open(point_file, "rb") as f:
|
||||
cr_point_content = await f.read()
|
||||
cr_points = [Point(**i) for i in json.loads(cr_point_content)]
|
||||
|
||||
comments = await CodeReview_().run(patch, cr_points, output_file)
|
||||
return f"The number of defects: {len(comments)} and the comments are stored in {output_file}"
|
||||
try:
|
||||
comments = await CodeReview_().run(patch, cr_points, output_file)
|
||||
except ValueError as e:
|
||||
return str(e)
|
||||
return f"The number of defects: {len(comments)}, the comments are stored in {output_file}, and the checkpoints are stored in {str(point_file)}"
|
||||
|
||||
async def fix(
|
||||
self,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue