Skip to content

Commit 8b5e1b4

Browse files
committed
fix(subtask): 调整prompt 解决 生成代码的时候,文件名称格式不对
1 parent 3ca9849 commit 8b5e1b4

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

backend/app/pkgs/prompt/subtask_basic.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,14 @@ def setpGenCode(requirementID, pseudocode, feature, specification, serviceStruct
9191
Please note that the code should be fully functional. No placeholders no todo ensure that all code can run in production environment correctly.
9292
9393
You will output the content of each file including ALL code.
94-
Each code file must strictly follow a markdown code block format, where the following tokens must be replaced such that
94+
Each code file must strictly follow a block format without plaintext, where the following tokens must be replaced such that
9595
FILEPATH is a file name that contains the file extension
9696
LANG is the markup code block language for the code's language
9797
CODE_EXPLANATION explain the code you provide in detail, this explain should be independent. For example: specific variable names and types to be added and modified, method names to be added or modified, parameter names, and so on
98-
CODE is the code(filepath, code explanation, and code must be output in the following format):
98+
CODE is the code
99+
Notice:must be output in the following format without plaintext
99100
101+
** FILEPATH **
100102
filepath:FILEPATH
101103
code explanation: CODE_EXPLANATION
102104
```LANG
@@ -144,16 +146,18 @@ def setpPseudocode(requirement_id, language, framework, tec_doc, service_struct
144146
You will output the pseudocode of each file based on the "Existing Code directory structure".
145147
Do not write markdown code.
146148
147-
Each pseudocode file must strictly follow a markdown code block format, where the following tokens must be replaced such that
149+
Each pseudocode file must strictly follow a block format without plaintext, where the following tokens must be replaced such that
148150
FILEPATH is a file name that contains the file extension
149151
LANG is the markup code block language for the code's language
150152
COMMENT as well as a quick comment on their purpose
151-
CODE is the code:
153+
CODE is the code
154+
Notice:must be output in the following format without plaintext
152155
153-
FILEPATH
156+
** FILEPATH **
157+
filepath:FILEPATH
158+
code explanation: CODE_EXPLANATION
154159
```LANG
155-
# COMMENT
156-
CODE```
160+
CODE```
157161
158162
Do not explain and talk, directly respond pseudocode of each file.
159163
"""

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy