MCPcopy Index your code
hub / github.com/going-doer/Paper2Code / get_write_msg

Function get_write_msg

codes/3_coding_llm.py:85–155  ·  view source on GitHub ↗
(todo_file_name, detailed_logic_analysis, done_file_lst)

Source from the content-addressed store, hash-verified

83Write code with triple quoto."""}]
84
85def get_write_msg(todo_file_name, detailed_logic_analysis, done_file_lst):
86 code_files = ""
87 for done_file in done_file_lst:
88 if done_file.endswith(".yaml"): continue
89 code_files += f"""
90```python
91{done_file_dict[done_file]}
92```
93
94"""
95
96 write_msg=[
97{'role': 'user', "content": f"""# Context
98## Paper
99{paper_content}
100
101-----
102
103## Overview of the plan
104{context_lst[0]}
105
106-----
107
108## Design
109{context_lst[1]}
110
111-----
112
113## Task
114{context_lst[2]}
115
116-----
117
118## Configuration file
119```yaml
120{config_yaml}
121```
122-----
123
124## Code Files
125{code_files}
126
127-----
128
129# Format example
130## Code: {todo_file_name}
131```python
132## {todo_file_name}
133...
134```
135
136-----
137
138# Instruction
139Based on the paper, plan, design, task and configuration file(config.yaml) specified previously, follow "Format example", write the code.
140
141We have {done_file_lst}.
142Next, you must write only the "{todo_file_name}".

Callers 1

3_coding_llm.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected