Spaces:
Runtime error
Runtime error
File size: 578 Bytes
40aba81 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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
} |