Ai_software_company / nodes /CodeReviewModification.py
MasterPiper2112's picture
Upload 7 files
40aba81 verified
raw
history blame contribute delete
578 Bytes
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
}