Initialize the solver and get an initial set of code and a return @return: None
(self)
| 223 | self.openai_api_key = openai_api_key |
| 224 | |
| 225 | def initial_solve(self): |
| 226 | """ |
| 227 | Initialize the solver and get an initial set of code and a return |
| 228 | @return: None |
| 229 | """ |
| 230 | # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
| 231 | # @@ Initial CodeGen Commands @@ |
| 232 | # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
| 233 | self.best_score = None |
| 234 | self.commands = [Replace()] |
| 235 | self.model = f"{self.llm_str}" |
| 236 | init_code, init_return, self.best_score = self.gen_initial_code() |
| 237 | self.best_codes = [(copy(init_code), self.best_score, init_return) for _ in range(1)] |
| 238 | |
| 239 | self.code_lines = init_code |
| 240 | self.model = f"{self.llm_str}" |
| 241 | self.commands = [Edit(), Replace()] |
| 242 | self.prev_working_code = copy(self.code_lines) |
| 243 | |
| 244 | @staticmethod |
| 245 | def clean_text(text): |
no test coverage detected