from roles.CodeReviewer import CodeReviewer class CodeReviewModification: def __init__(self): self.reviewer = CodeReviewer() def func_coding(self, assistant_role, comments, codes, ideas, language, modality, task): """ Modifies the code based on review comments. """ if assistant_role != "Code Reviewer": raise ValueError("Invalid role for code modification") modified_code = self.reviewer.modify(comments, codes, ideas, language, modality, task) return { "output": modified_code }