Ai_software_company / nodes /CodeReviewComment.py
MasterPiper2112's picture
Upload 7 files
40aba81 verified
raw
history blame contribute delete
549 Bytes
from roles.CodeReviewer import CodeReviewer
class CodeReviewComment:
def __init__(self):
self.reviewer = CodeReviewer()
def generate_comments(self, assistant_role, codes, ideas, language, modality, task):
"""
Generates review comments for the provided codes.
"""
if assistant_role != "Code Reviewer":
raise ValueError("Invalid role for code review")
comments = self.reviewer.review(codes, ideas, language, modality, task)
return {
"output": comments
}