|
2 | 2 | "complete_code": { |
3 | 3 | "type": "chat", |
4 | 4 | "opts": { |
5 | | - "template": "Complete the following code written in {{lang}} by pasting the existing code and continuing it.\n\nExisting code:\n```{{filetype}}\n{{input}}\n```\n\n```{{filetype}}\n", |
| 5 | + "template": "Complete the following {{filetype}} code by continuing it. Respond with the COMPLETE code (existing + new). No markdown fences, no explanations.\n\n{{input}}", |
6 | 6 | "strategy": "replace", |
7 | 7 | "params": { |
8 | | - "model": "gpt-5-mini", |
9 | | - "stop": [ |
10 | | - "```" |
11 | | - ] |
| 8 | + "model": "gpt-5-mini" |
12 | 9 | } |
13 | 10 | } |
14 | 11 | }, |
|
53 | 50 | "template": "Extract the main keywords from the following text.\n\n{{input}}", |
54 | 51 | "strategy": "replace", |
55 | 52 | "params": { |
56 | | - "model": "gpt-5-mini", |
57 | | - "temperature": 0.5, |
58 | | - "frequency_penalty": 0.8 |
| 53 | + "model": "gpt-5-mini" |
59 | 54 | } |
60 | 55 | } |
61 | 56 | }, |
62 | 57 | "docstring": { |
63 | 58 | "type": "chat", |
64 | 59 | "opts": { |
65 | | - "template": "# An elaborate, high quality docstring for the above function:\n# Writing a good docstring\n\nThis is an example of writing a really good docstring that follows a best practice for the given language. Attention is paid to detailing things like\n* parameter and return types (if applicable)\n* any errors that might be raised or returned, depending on the language\n\nI received the following code:\n\n```{{filetype}}\n{{input}}\n```\n\nThe code with a really good docstring added is below:\n\n```{{filetype}}", |
| 60 | + "template": "Add a high quality docstring to the following {{filetype}} code. Include parameter types, return types, and any errors that might be raised.\n\nCode:\n{{input}}\n\nRespond with ONLY the complete code including the docstring. No markdown fences, no explanations.", |
66 | 61 | "strategy": "edit", |
67 | 62 | "params": { |
68 | | - "model": "gpt-5-mini", |
69 | | - "stop": [ |
70 | | - "```" |
71 | | - ] |
| 63 | + "model": "gpt-5-mini" |
72 | 64 | } |
73 | 65 | } |
74 | 66 | }, |
75 | 67 | "add_tests": { |
76 | 68 | "type": "chat", |
77 | 69 | "opts": { |
78 | | - "template": "Implement tests for the following code.\n\nCode:\n```{{filetype}}\n{{input}}\n```\n\nTests:\n```{{filetype}}", |
| 70 | + "template": "Implement tests for the following {{filetype}} code.\n\nCode:\n{{input}}\n\nRespond with ONLY the test code. No markdown fences, no explanations.", |
79 | 71 | "strategy": "append", |
80 | 72 | "params": { |
81 | | - "model": "gpt-5-mini", |
82 | | - "stop": [ |
83 | | - "```" |
84 | | - ] |
| 73 | + "model": "gpt-5-mini" |
85 | 74 | } |
86 | 75 | } |
87 | 76 | }, |
88 | 77 | "optimize_code": { |
89 | 78 | "type": "chat", |
90 | 79 | "opts": { |
91 | | - "template": "Optimize the following code.\n\nCode:\n```{{filetype}}\n{{input}}\n```\n\nOptimized version:\n```{{filetype}}", |
| 80 | + "template": "Optimize the following {{filetype}} code for better performance and readability.\n\nCode:\n{{input}}\n\nRespond with ONLY the optimized code. No markdown fences, no explanations.", |
92 | 81 | "strategy": "edit", |
93 | 82 | "params": { |
94 | | - "model": "gpt-5-mini", |
95 | | - "stop": [ |
96 | | - "```" |
97 | | - ] |
| 83 | + "model": "gpt-5-mini" |
98 | 84 | } |
99 | 85 | } |
100 | 86 | }, |
|
111 | 97 | "fix_bugs": { |
112 | 98 | "type": "chat", |
113 | 99 | "opts": { |
114 | | - "template": "Fix bugs in the below code\n\nCode:\n```{{filetype}}\n{{input}}\n```\n\nFixed code:\n```{{filetype}}", |
| 100 | + "template": "Fix bugs in the following {{filetype}} code.\n\nCode:\n{{input}}\n\nRespond with ONLY the fixed code. No markdown fences, no explanations.", |
115 | 101 | "strategy": "edit", |
116 | 102 | "params": { |
117 | | - "model": "gpt-5-mini", |
118 | | - "stop": [ |
119 | | - "```" |
120 | | - ] |
| 103 | + "model": "gpt-5-mini" |
121 | 104 | } |
122 | 105 | } |
123 | 106 | }, |
124 | 107 | "explain_code": { |
125 | 108 | "type": "chat", |
126 | 109 | "opts": { |
127 | 110 | "title": " Explain Code", |
128 | | - "template": "Explain the following code:\n\nCode:\n```{{filetype}}\n{{input}}\n```\n\nUse markdown format.\nHere's what the above code is doing:\n```", |
| 111 | + "template": "Explain the following {{filetype}} code. Use markdown format with clear sections.\n\nCode:\n{{input}}", |
129 | 112 | "strategy": "display", |
130 | 113 | "params": { |
131 | | - "model": "gpt-5-mini", |
132 | | - "stop": [ |
133 | | - "```" |
134 | | - ] |
| 114 | + "model": "gpt-5-mini" |
135 | 115 | } |
136 | 116 | } |
137 | 117 | }, |
|
187 | 167 | ] |
188 | 168 | } |
189 | 169 | } |
| 170 | + }, |
| 171 | + "fix_diagnostic": { |
| 172 | + "type": "chat", |
| 173 | + "opts": { |
| 174 | + "template": "Fix the following error in the {{filetype}} code.\n\nError:\n{{diagnostic}}\n\nCode:\n{{input}}\n\nRespond with ONLY the fixed code. No markdown fences, no explanations.", |
| 175 | + "strategy": "edit", |
| 176 | + "params": { |
| 177 | + "model": "gpt-5-mini" |
| 178 | + } |
| 179 | + } |
| 180 | + }, |
| 181 | + "explain_diagnostic": { |
| 182 | + "type": "chat", |
| 183 | + "opts": { |
| 184 | + "title": " Explain Error", |
| 185 | + "template": "Explain the following error and how to fix it. Use markdown format.\n\nError:\n{{diagnostic}}\n\nCode:\n{{input}}", |
| 186 | + "strategy": "display", |
| 187 | + "params": { |
| 188 | + "model": "gpt-5-mini" |
| 189 | + } |
| 190 | + } |
| 191 | + }, |
| 192 | + "fix_diagnostics": { |
| 193 | + "type": "chat", |
| 194 | + "opts": { |
| 195 | + "template": "Fix all the following errors in the {{filetype}} code.\n\nErrors:\n{{diagnostics}}\n\nCode:\n{{input}}\n\nRespond with ONLY the fixed code. No markdown fences, no explanations.", |
| 196 | + "strategy": "edit", |
| 197 | + "params": { |
| 198 | + "model": "gpt-5-mini" |
| 199 | + } |
| 200 | + } |
190 | 201 | } |
191 | 202 | } |
0 commit comments