diff --git a/README.md b/README.md
index da5159c4..ad3c0407 100644
--- a/README.md
+++ b/README.md
@@ -32,6 +32,12 @@ Making pull requests less painful with an AI agent
## News and Updates
+### Jan 17, 2024
+- A new feature is now available for the review tool: [`require_can_be_split_review`](https://pr-agent-docs.codium.ai/tools/review/#enabledisable-features).
+If set to true, the tool will add a section that checks if the PR contains several themes, and can be split into smaller PRs.
+
+
+
### Jan 10, 2024
- A new [knowledge-base website](https://pr-agent-docs.codium.ai/) for PR-Agent is now available. It includes detailed information about the different tools, usage guides and more, in an accessible and organized format.
diff --git a/docs/docs/assets/logo.svg b/docs/docs/assets/logo.svg
new file mode 100644
index 00000000..5de22677
--- /dev/null
+++ b/docs/docs/assets/logo.svg
@@ -0,0 +1,140 @@
+
+
+
diff --git a/docs/docs/css/custom.css b/docs/docs/css/custom.css
index 0e9b26fe..2f963ccd 100644
--- a/docs/docs/css/custom.css
+++ b/docs/docs/css/custom.css
@@ -5,94 +5,14 @@
--md-accent-fg-color: #AEA1F1;
}
.md-nav__title, .md-nav__link {
- font-size: 16px; /* Adjust the font size as needed */
+ font-size: 16px;
}
.md-tabs__link {
- font-size: 16px; /* Adjust the font size as needed */
+ font-size: 16px;
}
.md-header__title {
- font-size: 20px; /* Adjust the font size as needed */
+ font-size: 20px;
+ margin-left: 0px !important;
}
-
-/*
-@media (prefers-color-scheme: light) {
- body {
- --md-primary-fg-color: #00ffee !important;
- --md-primary-bg-color: #ff0000 !important;
- }
-
- body, .md-main, .md-content {
- background-color: #4312f5 !important;
- }
-}
-
-@media (prefers-color-scheme: dark) {
- body {
- --md-primary-fg-color: #171518 !important;
- --md-primary-bg-color: #171518 !important;
- }
-
- body, .md-main, .md-content {
- background-color: #171518 !important;
- }
-
- .md-header__title {
- color: #ffffff !important;
- }
-
- .md-tabs .md-tabs__link {
- color: #ffffff !important;
- }
-
- .md-tabs .md-tabs__link:hover,
- .md-tabs .md-tabs__link:focus {
- color: #ffffff !important;
- }
-
- .md-header__button {
- color: #ffffff !important;
- }
-
- .md-header__button svg {
- fill: currentColor !important;
- }
-
- .md-header__button:hover,
- .md-header__button:focus {
- color: #ffffff !important;
- }
-
- .md-header__button:hover svg,
- .md-header__button:focus svg {
- fill: currentColor !important;
- }
-
- .md-search__icon svg {
- fill: #ffffff !important;
- }
-
- .md-search__input {
- color: #ffffff !important;
- }
-
- .md-nav__item--active > .md-nav__link--active,
- .md-nav__link--active {
- color: #AEA1F1 !important;
- }
-
- .md-nav--secondary .md-nav__title {
- background: #171518;
- box-shadow: 0 0 0.4rem 0.4rem #171518;
- }
-
- .md-nav--lifted>.md-nav__list>.md-nav__item--active>.md-nav__link {
- background: #171518;
- box-shadow: 0 0 0.4rem 0.4rem #171518;
- }
-
- .md-content a {
- color: #AEA1F1 !important;
- }
-} */
\ No newline at end of file
diff --git a/docs/docs/index.md b/docs/docs/index.md
index caa52ded..ed02e502 100644
--- a/docs/docs/index.md
+++ b/docs/docs/index.md
@@ -14,34 +14,34 @@ PR-Agent offers extensive pull request functionalities across various git provid
| | | GitHub | Gitlab | Bitbucket | Azure DevOps |
|-------|---------------------------------------------------------------------------------------------------------------------|:------:|:------:|:---------:|:------------:|
-| TOOLS | Review | ✔️ | ✔️ | ✔️ | ✔️ |
-| | ⮑ Incremental | ✔️ | | | |
-| | ⮑ [SOC2 Compliance](https://pr-agent-docs.codium.ai/tools/review/#soc2-ticket-compliance){:target="_blank"} 💎 | ✔️ | ✔️ | ✔️ | ✔️ |
-| | Ask | ✔️ | ✔️ | ✔️ | ✔️ |
-| | Describe | ✔️ | ✔️ | ✔️ | ✔️ |
-| | ⮑ [Inline file summary](https://pr-agent-docs.codium.ai/tools/describe/#inline-file-summary){:target="_blank"} 💎 | ✔️ | ✔️ | ✔️ | ✔️ |
-| | Improve | ✔️ | ✔️ | ✔️ | ✔️ |
-| | ⮑ Extended | ✔️ | ✔️ | ✔️ | ✔️ |
-| | [Custom Suggestions](./tools/custom_suggestions.md){:target="_blank"} 💎 | ✔️ | ✔️ | ✔️ | ✔️ |
-| | Reflect and Review | ✔️ | ✔️ | ✔️ | ✔️ |
-| | Update CHANGELOG.md | ✔️ | ✔️ | ✔️ | ️ |
-| | Find Similar Issue | ✔️ | | | ️ |
-| | [Add PR Documentation](./tools/documentation.md){:target="_blank"} 💎 | ✔️ | ✔️ | ✔️ | ✔️ |
-| | [Generate Custom Labels](./tools/describe.md#handle-custom-labels-from-the-repos-labels-page-💎){:target="_blank"} 💎 | ✔️ | ✔️ | | ✔️ |
-| | [Analyze PR Components](./tools/analyze.md){:target="_blank"} 💎 | ✔️ | ✔️ | ✔️ | ✔️ |
+| TOOLS | Review | ✅ | ✅ | ✅ | ✅ |
+| | ⮑ Incremental | ✅ | | | |
+| | ⮑ [SOC2 Compliance](https://pr-agent-docs.codium.ai/tools/review/#soc2-ticket-compliance){:target="_blank"} 💎 | ✅ | ✅ | ✅ | ✅ |
+| | Ask | ✅ | ✅ | ✅ | ✅ |
+| | Describe | ✅ | ✅ | ✅ | ✅ |
+| | ⮑ [Inline file summary](https://pr-agent-docs.codium.ai/tools/describe/#inline-file-summary){:target="_blank"} 💎 | ✅ | ✅ | ✅ | ✅ |
+| | Improve | ✅ | ✅ | ✅ | ✅ |
+| | ⮑ Extended | ✅ | ✅ | ✅ | ✅ |
+| | [Custom Suggestions](./tools/custom_suggestions.md){:target="_blank"} 💎 | ✅ | ✅ | ✅ | ✅ |
+| | Reflect and Review | ✅ | ✅ | ✅ | ✅ |
+| | Update CHANGELOG.md | ✅ | ✅ | ✅ | ️ |
+| | Find Similar Issue | ✅ | | | ️ |
+| | [Add PR Documentation](./tools/documentation.md){:target="_blank"} 💎 | ✅ | ✅ | ✅ | ✅ |
+| | [Generate Custom Labels](./tools/describe.md#handle-custom-labels-from-the-repos-labels-page-💎){:target="_blank"} 💎 | ✅ | ✅ | | ✅ |
+| | [Analyze PR Components](./tools/analyze.md){:target="_blank"} 💎 | ✅ | ✅ | ✅ | ✅ |
| | | | | | ️ |
-| USAGE | CLI | ✔️ | ✔️ | ✔️ | ✔️ |
-| | App / webhook | ✔️ | ✔️ | | ✔️ |
-| | Tagging bot | ✔️ | | | ✔️ |
-| | Actions | ✔️ | | | ️ |
+| USAGE | CLI | ✅ | ✅ | ✅ | ✅ |
+| | App / webhook | ✅ | ✅ | | ✅ |
+| | Tagging bot | ✅ | | | ✅ |
+| | Actions | ✅ | | | ️ |
| | | | | |
-| CORE | PR compression | ✔️ | ✔️ | ✔️ | ✔️ |
-| | Repo language prioritization | ✔️ | ✔️ | ✔️ | ✔️ |
-| | Adaptive and token-aware file patch fitting | ✔️ | ✔️ | ✔️ | ✔️ |
-| | Multiple models support | ✔️ | ✔️ | ✔️ | ✔️ |
-| | Incremental PR review | ✔️ | | | |
-| | [Static code analysis](./tools/analyze.md/){:target="_blank"} 💎 | ✔️ | ✔️ | ✔️ | ✔️ |
-| | [Multiple configuration options](./usage-guide/configuration_options.md){:target="_blank"} 💎 | ✔️ | ✔️ | ✔️ | ✔️ |
+| CORE | PR compression | ✅ | ✅ | ✅ | ✅ |
+| | Repo language prioritization | ✅ | ✅ | ✅ | ✅ |
+| | Adaptive and token-aware file patch fitting | ✅ | ✅ | ✅ | ✅ |
+| | Multiple models support | ✅ | ✅ | ✅ | ✅ |
+| | Incremental PR review | ✅ | | | |
+| | [Static code analysis](./tools/analyze.md/){:target="_blank"} 💎 | ✅ | ✅ | ✅ | ✅ |
+| | [Multiple configuration options](./usage-guide/configuration_options.md){:target="_blank"} 💎 | ✅ | ✅ | ✅ | ✅ |
💎 marks a feature available only in [PR-Agent Pro](https://www.codium.ai/pricing/){:target="_blank"}
diff --git a/docs/docs/installation/index.md b/docs/docs/installation/index.md
index 18b7b056..fc71ecbb 100644
--- a/docs/docs/installation/index.md
+++ b/docs/docs/installation/index.md
@@ -1,5 +1,6 @@
# Installation
+## self-hosted PR-Agent
If you choose to host you own PR-Agent, you first need to acquire two tokens:
1. An OpenAI key from [here](https://platform.openai.com/api-keys), with access to GPT-4 (or a key for [other models](../usage-guide/additional_configurations.md/#changing-a-model), if you prefer).
@@ -13,7 +14,9 @@ There are several ways to use self-hosted PR-Agent:
- [BitBucket](./bitbucket.md)
- [Azure DevOps](./azure.md)
-___
-Note that [PR-Agent Pro 💎](https://app.codium.ai/), an app for GitHub\GitLab\BitBucket hosted by CodiumAI, is also available.
+## PR-Agent Pro 💎
+PR-Agent Pro, an app for GitHub\GitLab\BitBucket hosted by CodiumAI, is also available.
-With PR-Agent Pro Installation is as simple as signing up and adding the PR-Agent app to your relevant repo.
\ No newline at end of file
+With PR-Agent Pro Installation is as simple as signing up and adding the PR-Agent app to your relevant repo.
+
+See [here](./pr_agent_pro.md) for more details.
\ No newline at end of file
diff --git a/docs/docs/installation/gitlab_pro.md b/docs/docs/installation/pr_agent_pro.md
similarity index 50%
rename from docs/docs/installation/gitlab_pro.md
rename to docs/docs/installation/pr_agent_pro.md
index 20902b74..cb371df7 100644
--- a/docs/docs/installation/gitlab_pro.md
+++ b/docs/docs/installation/pr_agent_pro.md
@@ -1,4 +1,27 @@
-## Install Hosted PR-Agent Pro for GitLab (Teams & Enterprise)
+
+## Getting Started with PR-Agent Pro
+
+PR-Agent Pro is a versatile application compatible with GitHub, GitLab, and BitBucket, hosted by CodiumAI.
+See [here](https://pr-agent-docs.codium.ai/#pr-agent-pro) for more details about the benefits of using PR-Agent Pro.
+
+Interested parties can subscribe to PR-Agent Pro through the following [link](https://www.codium.ai/pricing/).
+After subscribing, you are granted the ability to easily install the application across any of your repositories.
+
+
+
+
+
+Each user who wants to use PR-Agent pro needs to buy a seat.
+Initially, CodiumAI offers a two-week trial period at no cost, after which continued access requires each user to secure a personal seat.
+Once a user acquires a seat, they gain the flexibility to use PR-Agent Pro across any repository where it was enabled.
+
+Users without a purchased seat who interact with a repository featuring PR-Agent Pro are entitled to receive up to five complimentary feedbacks.
+Beyond this limit, PR-Agent Pro will cease to respond to their inquiries unless a seat is purchased.
+
+
+## Install PR-Agent Pro for GitLab (Teams & Enterprise)
+
+Since GitLab platform does not support apps, installing PR-Agent Pro for GitLab is a bit more involved, and requires the following steps:
### Step 1
diff --git a/docs/docs/usage-guide/additional_configurations.md b/docs/docs/usage-guide/additional_configurations.md
index 4a6224bd..1a756252 100644
--- a/docs/docs/usage-guide/additional_configurations.md
+++ b/docs/docs/usage-guide/additional_configurations.md
@@ -162,8 +162,9 @@ To use Amazon Bedrock and its foundational models, add the below configuration:
```
[config] # in configuration.toml
-model = "anthropic.claude-v2"
-fallback_models="anthropic.claude-instant-v1"
+model="bedrock/anthropic.claude-3-sonnet-20240229-v1:0"
+model_turbo="bedrock/anthropic.claude-3-sonnet-20240229-v1:0"
+fallback_models=["bedrock/anthropic.claude-v2:1"]
[aws] # in .secrets.toml
bedrock_region = "us-east-1"
@@ -171,6 +172,12 @@ bedrock_region = "us-east-1"
Note that you have to add access to foundational models before using them. Please refer to [this document](https://docs.aws.amazon.com/bedrock/latest/userguide/setting-up.html) for more details.
+If you are using the claude-3 model, please configure the following settings as there are parameters incompatible with claude-3.
+```
+[litellm]
+drop_params = true
+```
+
AWS session is automatically authenticated from your environment, but you can also explicitly set `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables.
diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml
index 0a76acf1..c3e10abd 100644
--- a/docs/mkdocs.yml
+++ b/docs/mkdocs.yml
@@ -7,9 +7,9 @@ nav:
- Locally: 'installation/locally.md'
- GitHub: 'installation/github.md'
- GitLab: 'installation/gitlab.md'
- - 💎 GitLab Pro: 'installation/gitlab_pro.md'
- BitBucket: 'installation/bitbucket.md'
- Azure DevOps: 'installation/azure.md'
+ - 💎 PR-Agent Pro: 'installation/pr_agent_pro.md'
- Usage Guide:
- 'usage-guide/index.md'
- Introduction: 'usage-guide/introduction.md'
@@ -35,7 +35,7 @@ nav:
- Core Abilities: 'core-abilities/index.md'
theme:
- logo: assets/logo.png
+ logo: assets/logo.svg
favicon: assets/favicon.ico
name: material
features:
diff --git a/pr_agent/algo/__init__.py b/pr_agent/algo/__init__.py
index 7c537e3a..9e05ed9f 100644
--- a/pr_agent/algo/__init__.py
+++ b/pr_agent/algo/__init__.py
@@ -23,4 +23,9 @@ MAX_TOKENS = {
'anthropic.claude-v1': 100000,
'anthropic.claude-v2': 100000,
'anthropic/claude-3-opus-20240229': 100000,
+ 'bedrock/anthropic.claude-instant-v1': 100000,
+ 'bedrock/anthropic.claude-v2': 100000,
+ 'bedrock/anthropic.claude-v2:1': 100000,
+ 'bedrock/anthropic.claude-3-sonnet-20240229-v1:0': 100000,
+ 'bedrock/anthropic.claude-3-haiku-20240307-v1:0': 100000,
}
diff --git a/pr_agent/algo/ai_handlers/litellm_ai_handler.py b/pr_agent/algo/ai_handlers/litellm_ai_handler.py
index 527a20a8..ce4d1db0 100644
--- a/pr_agent/algo/ai_handlers/litellm_ai_handler.py
+++ b/pr_agent/algo/ai_handlers/litellm_ai_handler.py
@@ -36,6 +36,8 @@ class LiteLLMAIHandler(BaseAiHandler):
assert litellm_token, "LITELLM_TOKEN is required"
os.environ["LITELLM_TOKEN"] = litellm_token
litellm.use_client = True
+ if get_settings().get("LITELLM.DROP_PARAMS", None):
+ litellm.drop_params = get_settings().litellm.drop_params
if get_settings().get("OPENAI.ORG", None):
litellm.organization = get_settings().openai.org
if get_settings().get("OPENAI.API_TYPE", None):
@@ -68,6 +70,7 @@ class LiteLLMAIHandler(BaseAiHandler):
)
if get_settings().get("AWS.BEDROCK_REGION", None):
litellm.AmazonAnthropicConfig.max_tokens_to_sample = 2000
+ litellm.AmazonAnthropicClaude3Config.max_tokens = 2000
self.aws_bedrock_client = boto3.client(
service_name="bedrock-runtime",
region_name=get_settings().aws.bedrock_region,
diff --git a/pr_agent/algo/utils.py b/pr_agent/algo/utils.py
index dede9850..c2b6323c 100644
--- a/pr_agent/algo/utils.py
+++ b/pr_agent/algo/utils.py
@@ -70,6 +70,7 @@ def convert_to_markdown(output_data: dict, gfm_supported: bool = True, increment
"""
emojis = {
+ "Can be split": "🔀",
"Possible issues": "🔍",
"Score": "🏅",
"Relevant tests": "🧪",
@@ -94,7 +95,8 @@ def convert_to_markdown(output_data: dict, gfm_supported: bool = True, increment
for key, value in output_data['review'].items():
if value is None or value == '' or value == {} or value == []:
- continue
+ if key.lower() != 'can_be_split':
+ continue
key_nice = key.replace('_', ' ').capitalize()
emoji = emojis.get(key_nice, "")
if gfm_supported:
@@ -103,6 +105,8 @@ def convert_to_markdown(output_data: dict, gfm_supported: bool = True, increment
if 'security concerns' in key_nice.lower():
value = emphasize_header(value.strip())
markdown_text += f"