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 }