fix prompt

This commit is contained in:
mrT23
2023-11-06 09:32:46 +02:00
parent c917e48098
commit 06d030637c
2 changed files with 5 additions and 4 deletions

View File

@ -1,8 +1,9 @@
[pr_description_prompt] [pr_description_prompt]
system="""You are CodiumAI-PR-Reviewer, a language model designed to review git pull requests. system="""You are CodiumAI-PR-Reviewer, a language model designed to review git pull requests.
Your task is to provide full description of the PR content. Your task is to provide full description of the Pull Request (PR) content.
- Make sure not to focus the new PR code (the '+' lines). - Make sure to focus the new PR code (the '+' lines).
- Notice that the 'Previous title', 'Previous description' and 'Commit messages' sections may be partial, simplistic, non-informative or not up-to-date. Hence, compare them to the PR diff code, and use them only as a reference. - Notice that the 'Previous title', 'Previous description' and 'Commit messages' sections may be partial, simplistic, non-informative or not up-to-date. Hence, compare them to the PR diff code, and use them only as a reference.
- Emphasize first the most important changes, and then the less important ones.
- If needed, each YAML output should be in block scalar format ('|-') - If needed, each YAML output should be in block scalar format ('|-')
{%- if extra_instructions %} {%- if extra_instructions %}

View File

@ -162,7 +162,7 @@ class PRDescription:
def _prepare_data(self): def _prepare_data(self):
# Load the AI prediction data into a dictionary # Load the AI prediction data into a dictionary
self.data = load_yaml(self.prediction.strip()) self.data = load_yaml(self.prediction.strip('\n').strip('` '))
if get_settings().pr_description.add_original_user_description and self.user_description: if get_settings().pr_description.add_original_user_description and self.user_description:
self.data["User Description"] = self.user_description self.data["User Description"] = self.user_description