From 06d030637c32f649774173ed0bf2fedcb50d53c5 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Mon, 6 Nov 2023 09:32:46 +0200 Subject: [PATCH] fix prompt --- pr_agent/settings/pr_description_prompts.toml | 7 ++++--- pr_agent/tools/pr_description.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pr_agent/settings/pr_description_prompts.toml b/pr_agent/settings/pr_description_prompts.toml index 3d9c3f0b..29a6e095 100644 --- a/pr_agent/settings/pr_description_prompts.toml +++ b/pr_agent/settings/pr_description_prompts.toml @@ -1,9 +1,10 @@ [pr_description_prompt] 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. -- Make sure not to focus the new PR code (the '+' lines). +Your task is to provide full description of the Pull Request (PR) content. +- 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. -- If needed, each YAML output should be in block scalar format ('|-') +- Emphasize first the most important changes, and then the less important ones. +- If needed, each YAML output should be in block scalar format ('|-') {%- if extra_instructions %} Extra instructions from the user: diff --git a/pr_agent/tools/pr_description.py b/pr_agent/tools/pr_description.py index 4f0081fb..d7967e80 100644 --- a/pr_agent/tools/pr_description.py +++ b/pr_agent/tools/pr_description.py @@ -162,7 +162,7 @@ class PRDescription: def _prepare_data(self): # 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: self.data["User Description"] = self.user_description