Skip to content

Commit

Permalink
fix(subtask): 调整prompt 解决 生成代码的时候,文件名称格式不对
Browse files Browse the repository at this point in the history
  • Loading branch information
booboosui committed Aug 14, 2024
1 parent 3ca9849 commit 8b5e1b4
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions backend/app/pkgs/prompt/subtask_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,14 @@ def setpGenCode(requirementID, pseudocode, feature, specification, serviceStruct
Please note that the code should be fully functional. No placeholders no todo ensure that all code can run in production environment correctly.
You will output the content of each file including ALL code.
Each code file must strictly follow a markdown code block format, where the following tokens must be replaced such that
Each code file must strictly follow a block format without plaintext, where the following tokens must be replaced such that
FILEPATH is a file name that contains the file extension
LANG is the markup code block language for the code's language
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
CODE is the code(filepath, code explanation, and code must be output in the following format):
CODE is the code
Notice:must be output in the following format without plaintext
** FILEPATH **
filepath:FILEPATH
code explanation: CODE_EXPLANATION
```LANG
Expand Down Expand Up @@ -144,16 +146,18 @@ def setpPseudocode(requirement_id, language, framework, tec_doc, service_struct
You will output the pseudocode of each file based on the "Existing Code directory structure".
Do not write markdown code.
Each pseudocode file must strictly follow a markdown code block format, where the following tokens must be replaced such that
Each pseudocode file must strictly follow a block format without plaintext, where the following tokens must be replaced such that
FILEPATH is a file name that contains the file extension
LANG is the markup code block language for the code's language
COMMENT as well as a quick comment on their purpose
CODE is the code:
CODE is the code
Notice:must be output in the following format without plaintext
FILEPATH
** FILEPATH **
filepath:FILEPATH
code explanation: CODE_EXPLANATION
```LANG
# COMMENT
CODE```
CODE```
Do not explain and talk, directly respond pseudocode of each file.
"""
Expand Down

0 comments on commit 8b5e1b4

Please sign in to comment.