Reflect on your future plans and next steps to improve the code @param reflect_prompt: (str) reflection prompt @param code_str: (str) code string @return: (str) reflection string
(self, reflect_prompt, code_str, code_return)
| 492 | return f"Code return: {code_return}\n\nReflection: {reflection}" |
| 493 | |
| 494 | def reflection(self, reflect_prompt, code_str, code_return): |
| 495 | """ |
| 496 | Reflect on your future plans and next steps to improve the code |
| 497 | @param reflect_prompt: (str) reflection prompt |
| 498 | @param code_str: (str) code string |
| 499 | @return: (str) reflection string |
| 500 | """ |
| 501 | refl = query_model(prompt=reflect_prompt, system_prompt=self.system_prompt(commands=False), model_str=f"{self.llm_str}", openai_api_key=self.openai_api_key) |
| 502 | return f"During the previous execution, the following code was run: \n\n{code_str}\n\nThis code returned the following: \n{code_return}\nThe following is your reflection from this feedback {refl}\n" |
| 503 | |
| 504 | def generate_dataset_descr_prompt(self): |
| 505 | """ |
no test coverage detected