| 61 | Write code with triple quoto."""}] |
| 62 | |
| 63 | def get_write_msg(todo_file_name, detailed_logic_analysis, done_file_lst): |
| 64 | code_files = "" |
| 65 | for done_file in done_file_lst: |
| 66 | if done_file.endswith(".yaml"): continue |
| 67 | code_files += f""" |
| 68 | ```python |
| 69 | {done_file_dict[done_file]} |
| 70 | ``` |
| 71 | |
| 72 | """ |
| 73 | |
| 74 | write_msg=[ |
| 75 | {'role': 'user', "content": f"""# Context |
| 76 | ## Paper |
| 77 | {paper_content} |
| 78 | |
| 79 | ----- |
| 80 | |
| 81 | ## Overview of the plan |
| 82 | {context_lst[0]} |
| 83 | |
| 84 | ----- |
| 85 | |
| 86 | ## Design |
| 87 | {context_lst[1]} |
| 88 | |
| 89 | ----- |
| 90 | |
| 91 | ## Task |
| 92 | {context_lst[2]} |
| 93 | |
| 94 | ----- |
| 95 | |
| 96 | ## Configuration file |
| 97 | ```yaml |
| 98 | {config_yaml} |
| 99 | ``` |
| 100 | ----- |
| 101 | |
| 102 | ## Code Files |
| 103 | {code_files} |
| 104 | |
| 105 | ----- |
| 106 | |
| 107 | # Format example |
| 108 | ## Code: {todo_file_name} |
| 109 | ```python |
| 110 | ## {todo_file_name} |
| 111 | ... |
| 112 | ``` |
| 113 | |
| 114 | ----- |
| 115 | |
| 116 | # Instruction |
| 117 | Based on the paper, plan, design, task and configuration file(config.yaml) specified previously, follow "Format example", write the code. |
| 118 | |
| 119 | We have {done_file_lst}. |
| 120 | Next, you must write only the "{todo_file_name}". |