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