Spaces:
Runtime error
Runtime error
from roles.Programmer import Programmer | |
class CodeComplete: | |
def __init__(self): | |
self.programmer = Programmer() | |
def func_coding(self, assistant_role, unimplemented_file, codes, language, modality, task): | |
""" | |
Completes the code for the given unimplemented file. | |
""" | |
if assistant_role != "Programmer": | |
raise ValueError("Invalid role for code completion") | |
complete_code = self.programmer.complete_code(unimplemented_file, codes, language, modality, task) | |
return { | |
"output": complete_code | |
} |