Integrate self-reflection feature in PR-Agent, enhancing code suggestions with scoring and sorting, and update documentation accordingly

This commit is contained in:
mrT23
2024-05-12 16:17:47 +03:00
parent d348cffbae
commit 4f6490b17c
3 changed files with 15 additions and 1 deletions

View File

@ -351,7 +351,8 @@ class PRCodeSuggestions:
if score > 0:
data["code_suggestions"].append(prediction)
else:
get_logger().info(f"Skipping suggestions from call {i + 1}, because score is {score}")
get_logger().info(f"Removing suggestions {i}, because score is {score}",
artifact={"prediction": prediction})
else:
get_logger().error(f"Error getting PR diff, no code suggestions found in call {i + 1}")
except Exception as e: