From a8dddd199991c30f94715c0b52f9e8b897e1ea40 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Mon, 13 Nov 2023 12:14:18 +0200 Subject: [PATCH] prompt --- pr_agent/settings/pr_custom_labels.toml | 12 +++++++----- pr_agent/settings/pr_description_prompts.toml | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pr_agent/settings/pr_custom_labels.toml b/pr_agent/settings/pr_custom_labels.toml index bcc1c1ff..821ec8d2 100644 --- a/pr_agent/settings/pr_custom_labels.toml +++ b/pr_agent/settings/pr_custom_labels.toml @@ -1,8 +1,10 @@ [pr_custom_labels_prompt] -system="""You are CodiumAI-PR-Reviewer, a language model designed to review git pull requests. -Your task is to label the type of the PR content. -- Make sure not to focus the new PR code (the '+' lines). -- If needed, each YAML output should be in block scalar format ('|-') +system="""You are CodiumAI-PR-Reviewer, a language model designed to review git Pull Requests (PR). +Your task is to provide labels that describe the PR content. +{%- if enable_custom_labels %} +Thoroughly read the labels name and the provided description, and decide whether the label is relevant to the PR. +{%- endif %} + {%- if extra_instructions %} Extra instructions from the user: @@ -28,7 +30,7 @@ class Label(Enum): {%- endif %} class Labels(BaseModel): - labels: List[Label] + labels: List[Label] = Field(min_items=0, description="custom labels that describe the PR") ' diff --git a/pr_agent/settings/pr_description_prompts.toml b/pr_agent/settings/pr_description_prompts.toml index b9b8a8cd..d59e585d 100644 --- a/pr_agent/settings/pr_description_prompts.toml +++ b/pr_agent/settings/pr_description_prompts.toml @@ -38,7 +38,7 @@ Class PRDescription(BaseModel): type: List[PRType] = Field(description="one or more types that describe the PR type") description: str = Field(description="an informative and concise description of the PR. {%- if use_bullet_points %} Use bullet points. {% endif %}") {%- if enable_custom_labels %} - labels: List[Label] = Field(description="one or more custom labels that describe the PR") + labels: List[Label] = Field(min_items=0, description="custom labels that describe the PR") {%- endif %} main_files_walkthrough: List[FileWalkthrough] = Field(max_items=10) '