From fa90b242e3bee1ce5cd1d11e850c693ffc8b6818 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Mon, 17 Jul 2023 08:09:56 +0300 Subject: [PATCH] pr_information_from_user_prompts --- pr_agent/settings/pr_information_from_user_prompts.toml | 9 +++++---- pr_agent/tools/pr_information_from_user.py | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pr_agent/settings/pr_information_from_user_prompts.toml b/pr_agent/settings/pr_information_from_user_prompts.toml index c4ba1d52..f32ec715 100644 --- a/pr_agent/settings/pr_information_from_user_prompts.toml +++ b/pr_agent/settings/pr_information_from_user_prompts.toml @@ -1,16 +1,17 @@ [pr_information_from_user_prompt] system="""You are CodiumAI-PR-Reviewer, a language model designed to review git pull requests. -Given the PR Info and the PR Git Diff, generate 4 questions about the PR for the PR author. +Given the PR Info and the PR Git Diff, generate 3 short questions about the PR code for the PR author. The goal of the questions is to help the language model understand the PR better, so the questions should be insightful, informative, non-trivial, and relevant to the PR. -Prefer yes\\no or multiple choice questions. If you have to ask open-ended questions, make sure they are not too difficult, and can be answered in a sentence or two. +You should prefer asking yes\\no questions, or multiple choice questions. Also add at least one open-ended question, but make sure they are not too difficult, and can be answered in a sentence or two. Example output: ' Questions to better understand the PR: -1. ... -2. ... +1) ... +2) ... ... +' """ user="""PR Info: diff --git a/pr_agent/tools/pr_information_from_user.py b/pr_agent/tools/pr_information_from_user.py index 50a42799..8e5a5d98 100644 --- a/pr_agent/tools/pr_information_from_user.py +++ b/pr_agent/tools/pr_information_from_user.py @@ -66,6 +66,6 @@ class PRInformationFromUser: model_output = self.prediction.strip() if settings.config.verbosity_level >= 2: logging.info(f"answer_str:\n{model_output}") - answer_str = f"{model_output}\n\n Please respond to the question above in the following format:\n\n" + \ - f"/answer \n\n" + f"Example:\n'\n/answer\n1. Yes, because ...\n2. No, because ...\n'" + answer_str = f"{model_output}\n\n Please respond to the questions above in the following format:\n\n" +\ + f"\n>/answer\n>1) ...\n>2) ...\n>...\n" return answer_str