pr_information_from_user_prompts

This commit is contained in:
mrT23
2023-07-17 08:09:56 +03:00
parent f4de3d2899
commit fa90b242e3
2 changed files with 7 additions and 6 deletions

View File

@ -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:

View File

@ -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 <question_id> <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