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

Function get_write_msg

codes/3.1_coding_sh.py:60–101  ·  view source on GitHub ↗
(todo_file_name, done_file_lst)

Source from the content-addressed store, hash-verified

58Write code with triple quoto."""}]
59
60def get_write_msg(todo_file_name, done_file_lst):
61 code_files = ""
62 for done_file in done_file_lst:
63 if done_file.endswith(".yaml"): continue
64 code_files += f"""
65```python
66{done_file_dict[done_file]}
67```
68
69"""
70
71 write_msg=[
72{'role': 'user', "content": f"""# Context
73
74## Configuration file
75```yaml
76{config_yaml}
77```
78-----
79
80## Code Files
81{code_files}
82
83-----
84
85# Format example
86## Code: {todo_file_name}
87```python
88## {todo_file_name}
89...
90```
91
92-----
93
94# Instruction
95Based on the code files, follow "Format example", write the code.
96
97We have {done_file_lst}.
98Next, you must write only the "{todo_file_name}".
99
100## Code: {todo_file_name}"""}]
101 return write_msg
102
103
104def api_call(msg):

Callers 1

3.1_coding_sh.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected