pr-agent 0.2.2__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pr_agent-0.2.2/pr_agent.egg-info → pr_agent-0.2.4}/PKG-INFO +71 -95
- {pr_agent-0.2.2 → pr_agent-0.2.4}/README.md +60 -88
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/agent/pr_agent.py +6 -4
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/algo/__init__.py +25 -1
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/algo/ai_handlers/base_ai_handler.py +2 -2
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/algo/ai_handlers/langchain_ai_handler.py +44 -35
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/algo/ai_handlers/litellm_ai_handler.py +91 -20
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/algo/ai_handlers/openai_ai_handler.py +5 -4
- pr_agent-0.2.4/pr_agent/algo/file_filter.py +65 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/algo/git_patch_processing.py +121 -51
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/algo/language_handler.py +12 -7
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/algo/pr_processing.py +200 -120
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/algo/token_handler.py +12 -6
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/algo/utils.py +346 -98
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/cli.py +19 -5
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/config_loader.py +11 -2
- pr_agent-0.2.4/pr_agent/git_providers/__init__.py +62 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/git_providers/azuredevops_provider.py +38 -8
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/git_providers/bitbucket_provider.py +162 -31
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/git_providers/bitbucket_server_provider.py +162 -60
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/git_providers/codecommit_provider.py +1 -1
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/git_providers/gerrit_provider.py +1 -1
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/git_providers/git_provider.py +57 -2
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/git_providers/github_provider.py +165 -55
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/git_providers/gitlab_provider.py +171 -73
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/git_providers/local_git_provider.py +1 -1
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/git_providers/utils.py +16 -2
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/secret_providers/google_cloud_storage_secret_provider.py +1 -1
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/servers/azuredevops_server_webhook.py +16 -8
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/servers/bitbucket_app.py +12 -6
- pr_agent-0.2.4/pr_agent/servers/bitbucket_server_webhook.py +159 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/servers/github_action_runner.py +8 -4
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/servers/github_app.py +34 -31
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/servers/github_polling.py +14 -5
- pr_agent-0.2.4/pr_agent/servers/gitlab_webhook.py +216 -0
- pr_agent-0.2.4/pr_agent/servers/gunicorn_config.py +191 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/settings/.secrets_template.toml +3 -6
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/settings/configuration.toml +91 -16
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/settings/ignore.toml +1 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/settings/language_extensions.toml +1 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/settings/pr_add_docs.toml +1 -1
- pr_agent-0.2.4/pr_agent/settings/pr_code_suggestions_prompts.toml +217 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/settings/pr_code_suggestions_reflect_prompts.toml +10 -8
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/settings/pr_description_prompts.toml +5 -5
- pr_agent-0.2.4/pr_agent/settings/pr_evaluate_prompt_response.toml +68 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/settings/pr_reviewer_prompts.toml +78 -29
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/tools/pr_add_docs.py +2 -6
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/tools/pr_code_suggestions.py +242 -64
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/tools/pr_description.py +215 -44
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/tools/pr_generate_labels.py +5 -3
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/tools/pr_help_message.py +1 -1
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/tools/pr_information_from_user.py +2 -2
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/tools/pr_line_questions.py +2 -2
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/tools/pr_questions.py +7 -7
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/tools/pr_reviewer.py +55 -34
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/tools/pr_update_changelog.py +5 -5
- {pr_agent-0.2.2 → pr_agent-0.2.4/pr_agent.egg-info}/PKG-INFO +71 -95
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent.egg-info/SOURCES.txt +2 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent.egg-info/requires.txt +10 -6
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pyproject.toml +1 -1
- {pr_agent-0.2.2 → pr_agent-0.2.4}/requirements.txt +13 -7
- pr_agent-0.2.2/pr_agent/algo/file_filter.py +0 -36
- pr_agent-0.2.2/pr_agent/git_providers/__init__.py +0 -30
- pr_agent-0.2.2/pr_agent/servers/bitbucket_server_webhook.py +0 -80
- pr_agent-0.2.2/pr_agent/servers/gitlab_webhook.py +0 -140
- pr_agent-0.2.2/pr_agent/settings/pr_code_suggestions_prompts.toml +0 -112
- {pr_agent-0.2.2 → pr_agent-0.2.4}/LICENSE +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/MANIFEST.in +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/__init__.py +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/agent/__init__.py +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/algo/types.py +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/cli_pip.py +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/git_providers/codecommit_client.py +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/identity_providers/__init__.py +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/identity_providers/default_identity_provider.py +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/identity_providers/identity_provider.py +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/log/__init__.py +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/secret_providers/__init__.py +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/secret_providers/secret_provider.py +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/servers/__init__.py +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/servers/gerrit_server.py +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/servers/help.py +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/servers/serverless.py +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/servers/utils.py +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/settings/custom_labels.toml +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/settings/pr_custom_labels.toml +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/settings/pr_information_from_user_prompts.toml +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/settings/pr_line_questions_prompts.toml +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/settings/pr_questions_prompts.toml +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/settings/pr_sort_code_suggestions_prompts.toml +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/settings/pr_update_changelog_prompts.toml +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/tools/__init__.py +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/tools/pr_config.py +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent/tools/pr_similar_issue.py +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent.egg-info/dependency_links.txt +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent.egg-info/entry_points.txt +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/pr_agent.egg-info/top_level.txt +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/setup.cfg +0 -0
- {pr_agent-0.2.2 → pr_agent-0.2.4}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pr-agent
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: CodiumAI PR-Agent aims to help efficiently review and handle pull requests, by providing AI feedbacks and suggestions.
|
|
5
5
|
Author-email: CodiumAI <tal.r@codium.ai>
|
|
6
6
|
Maintainer-email: Tal Ridnik <tal.r@codium.ai>, Ori Kotek <ori.k@codium.ai>, Hussam Lawen <hussam.l@codium.ai>
|
|
@@ -214,21 +214,22 @@ Classifier: Programming Language :: Python :: 3
|
|
|
214
214
|
Requires-Python: >=3.10
|
|
215
215
|
Description-Content-Type: text/markdown
|
|
216
216
|
License-File: LICENSE
|
|
217
|
-
Requires-Dist: aiohttp==3.9.
|
|
217
|
+
Requires-Dist: aiohttp==3.9.4
|
|
218
|
+
Requires-Dist: anthropic[vertex]==0.21.3
|
|
218
219
|
Requires-Dist: atlassian-python-api==3.41.4
|
|
219
220
|
Requires-Dist: azure-devops==7.1.0b3
|
|
220
221
|
Requires-Dist: azure-identity==1.15.0
|
|
221
222
|
Requires-Dist: boto3==1.33.6
|
|
222
223
|
Requires-Dist: dynaconf==3.2.4
|
|
223
|
-
Requires-Dist: fastapi==0.
|
|
224
|
-
Requires-Dist: GitPython==3.1.
|
|
225
|
-
Requires-Dist: google-cloud-aiplatform==1.
|
|
224
|
+
Requires-Dist: fastapi==0.111.0
|
|
225
|
+
Requires-Dist: GitPython==3.1.41
|
|
226
|
+
Requires-Dist: google-cloud-aiplatform==1.38.0
|
|
226
227
|
Requires-Dist: google-cloud-storage==2.10.0
|
|
227
228
|
Requires-Dist: Jinja2==3.1.2
|
|
228
|
-
Requires-Dist: litellm==1.
|
|
229
|
+
Requires-Dist: litellm==1.43.13
|
|
229
230
|
Requires-Dist: loguru==0.7.2
|
|
230
231
|
Requires-Dist: msrest==0.7.1
|
|
231
|
-
Requires-Dist: openai==1.
|
|
232
|
+
Requires-Dist: openai==1.40.6
|
|
232
233
|
Requires-Dist: pytest==7.4.0
|
|
233
234
|
Requires-Dist: PyGithub==1.59.*
|
|
234
235
|
Requires-Dist: PyYAML==6.0.1
|
|
@@ -239,6 +240,9 @@ Requires-Dist: tiktoken==0.7.0
|
|
|
239
240
|
Requires-Dist: ujson==5.8.0
|
|
240
241
|
Requires-Dist: uvicorn==0.22.0
|
|
241
242
|
Requires-Dist: tenacity==8.2.3
|
|
243
|
+
Requires-Dist: gunicorn==22.0.0
|
|
244
|
+
Requires-Dist: pytest-cov==5.0.0
|
|
245
|
+
Requires-Dist: pydantic==2.8.2
|
|
242
246
|
|
|
243
247
|
<div align="center">
|
|
244
248
|
|
|
@@ -252,13 +256,15 @@ Requires-Dist: tenacity==8.2.3
|
|
|
252
256
|
|
|
253
257
|
</picture>
|
|
254
258
|
<br/>
|
|
255
|
-
CodiumAI PR-Agent aims to help efficiently review and handle pull requests, by providing AI
|
|
259
|
+
CodiumAI PR-Agent aims to help efficiently review and handle pull requests, by providing AI feedback and suggestions
|
|
256
260
|
</div>
|
|
257
261
|
|
|
258
262
|
[](https://github.com/Codium-ai/pr-agent/blob/main/LICENSE)
|
|
259
263
|
[](https://chromewebstore.google.com/detail/pr-agent-chrome-extension/ephlnjeghhogofkifjloamocljapahnl)
|
|
264
|
+
[](https://pr-agent-docs.codium.ai/finetuning_benchmark/)
|
|
260
265
|
[](https://discord.com/channels/1057273017547378788/1126104260430528613)
|
|
261
266
|
[](https://twitter.com/codiumai)
|
|
267
|
+
[](https://www.codium.ai/images/pr_agent/cheat_sheet.pdf)
|
|
262
268
|
<a href="https://github.com/Codium-ai/pr-agent/commits/main">
|
|
263
269
|
<img alt="GitHub" src="https://img.shields.io/github/last-commit/Codium-ai/pr-agent/main?style=for-the-badge" height="20">
|
|
264
270
|
</a>
|
|
@@ -277,75 +283,78 @@ CodiumAI PR-Agent aims to help efficiently review and handle pull requests, by p
|
|
|
277
283
|
- [Overview](#overview)
|
|
278
284
|
- [Example results](#example-results)
|
|
279
285
|
- [Try it now](#try-it-now)
|
|
280
|
-
- [PR-Agent Pro 💎](
|
|
286
|
+
- [PR-Agent Pro 💎](https://pr-agent-docs.codium.ai/overview/pr_agent_pro/)
|
|
281
287
|
- [How it works](#how-it-works)
|
|
282
288
|
- [Why use PR-Agent?](#why-use-pr-agent)
|
|
283
289
|
|
|
284
290
|
## News and Updates
|
|
285
291
|
|
|
286
|
-
###
|
|
287
|
-
GPT-4o is now the default fast model ("Turbo"). This model will be used for all commands except `review` and `improve`, which will still use "GPT-4-2024-04-09", since they are harder and would still benefit from the larger model.
|
|
292
|
+
### August 26, 2024
|
|
288
293
|
|
|
289
|
-
|
|
290
|
-
Inspired by [AlphaCodium](https://github.com/Codium-ai/AlphaCodium) flow engineering scheme, PR-Agent now performs **self-reflection** on the code suggestions it provides,
|
|
291
|
-
enabling to remove invalid suggestions, and score the valid ones. The suggestions will be presented sorted by their score, enabling to focus on the most important ones first.
|
|
294
|
+
New version of [PR Agent Chrom Extension](https://chromewebstore.google.com/detail/pr-agent-chrome-extension/ephlnjeghhogofkifjloamocljapahnl) was released, with full support of context-aware **PR Chat**. This novel feature is free to use for any open-source repository. See more details in [here](https://pr-agent-docs.codium.ai/chrome-extension/#pr-chat).
|
|
292
295
|
|
|
293
|
-
|
|
296
|
+
<kbd><img src="https://www.codium.ai/images/pr_agent/pr_chat_1.png" width="768"></kbd>
|
|
294
297
|
|
|
295
|
-
<kbd><img src="https://codium.ai/images/pr_agent/
|
|
298
|
+
<kbd><img src="https://www.codium.ai/images/pr_agent/pr_chat_2.png" width="768"></kbd>
|
|
296
299
|
|
|
297
|
-
<kbd><img src="https://codium.ai/images/pr_agent/self_reflection2.png" width="512"></kbd>
|
|
298
300
|
|
|
301
|
+
### August 11, 2024
|
|
302
|
+
Increased PR context size for improved results, and enabled [asymmetric context](https://github.com/Codium-ai/pr-agent/pull/1114/files#diff-9290a3ad9a86690b31f0450b77acd37ef1914b41fabc8a08682d4da433a77f90R69-R70)
|
|
299
303
|
|
|
300
|
-
###
|
|
301
|
-
|
|
304
|
+
### August 10, 2024
|
|
305
|
+
Added support for [Azure devops pipeline](https://pr-agent-docs.codium.ai/installation/azure/) - you can now easily run PR-Agent as an Azure devops pipeline, without needing to set up your own server.
|
|
302
306
|
|
|
303
|
-
This toolbar integrates seamlessly with your GitHub environment, allowing you to access PR-Agent tools [directly from the GitHub interface](https://www.youtube.com/watch?v=gT5tli7X4H4).
|
|
304
|
-
You can also easily export your chosen configuration, and use it for the automatic commands.
|
|
305
307
|
|
|
306
|
-
|
|
308
|
+
### August 5, 2024
|
|
309
|
+
Added support for [GitLab pipeline](https://pr-agent-docs.codium.ai/installation/gitlab/#run-as-a-gitlab-pipeline) - you can now run easily PR-Agent as a GitLab pipeline, without needing to set up your own server.
|
|
310
|
+
|
|
311
|
+
### July 28, 2024
|
|
312
|
+
|
|
313
|
+
(1) improved support for bitbucket server - [auto commands](https://github.com/Codium-ai/pr-agent/pull/1059) and [direct links](https://github.com/Codium-ai/pr-agent/pull/1061)
|
|
314
|
+
|
|
315
|
+
(2) custom models are now [supported](https://pr-agent-docs.codium.ai/usage-guide/changing_a_model/#custom-models)
|
|
316
|
+
|
|
307
317
|
|
|
308
|
-
<kbd><img src="https://codium.ai/images/pr_agent/toolbar2.png" width="512"></kbd>
|
|
309
318
|
|
|
310
319
|
## Overview
|
|
311
320
|
<div style="text-align:left;">
|
|
312
321
|
|
|
313
322
|
Supported commands per platform:
|
|
314
323
|
|
|
315
|
-
| | | GitHub | Gitlab | Bitbucket | Azure DevOps
|
|
316
|
-
|
|
317
|
-
| TOOLS | Review | ✅ | ✅ | ✅ |
|
|
318
|
-
| | ⮑ Incremental | ✅ | | |
|
|
319
|
-
| | ⮑ [SOC2 Compliance](https://pr-agent-docs.codium.ai/tools/review/#soc2-ticket-compliance) 💎 | ✅ | ✅ | ✅ |
|
|
320
|
-
| | Describe | ✅ | ✅ | ✅ |
|
|
321
|
-
| | ⮑ [Inline File Summary](https://pr-agent-docs.codium.ai/tools/describe#inline-file-summary) 💎 | ✅ | | |
|
|
322
|
-
| | Improve | ✅ | ✅ | ✅ |
|
|
323
|
-
| | ⮑ Extended | ✅ | ✅ | ✅ |
|
|
324
|
-
| | Ask | ✅ | ✅ | ✅ |
|
|
325
|
-
| | ⮑ [Ask on code lines](https://pr-agent-docs.codium.ai/tools/ask#ask-lines) | ✅ | ✅ | |
|
|
326
|
-
| | [Custom Prompt](https://pr-agent-docs.codium.ai/tools/custom_prompt/) 💎 | ✅ | ✅ | ✅ |
|
|
327
|
-
| | [Test](https://pr-agent-docs.codium.ai/tools/test/) 💎 | ✅ | ✅ | |
|
|
328
|
-
| | Reflect and Review | ✅ | ✅ | ✅ |
|
|
329
|
-
| | Update CHANGELOG.md | ✅ | ✅ | ✅ |
|
|
330
|
-
| | Find Similar Issue | ✅ | | |
|
|
331
|
-
| | [Add PR Documentation](https://pr-agent-docs.codium.ai/tools/documentation/) 💎 | ✅ | ✅ | |
|
|
332
|
-
| | [Custom Labels](https://pr-agent-docs.codium.ai/tools/custom_labels/) 💎 | ✅ | ✅ | |
|
|
333
|
-
| | [Analyze](https://pr-agent-docs.codium.ai/tools/analyze/) 💎 | ✅ | ✅ | |
|
|
334
|
-
| | [CI Feedback](https://pr-agent-docs.codium.ai/tools/ci_feedback/) 💎 | ✅ | | |
|
|
335
|
-
| | [Similar Code](https://pr-agent-docs.codium.ai/tools/similar_code/) 💎 | ✅ | | |
|
|
336
|
-
| | | | | |
|
|
337
|
-
| USAGE | CLI | ✅ | ✅ | ✅ |
|
|
338
|
-
| | App / webhook | ✅ | ✅ | ✅ |
|
|
339
|
-
| | Tagging bot | ✅ | | |
|
|
340
|
-
| | Actions | ✅
|
|
341
|
-
| | | | | |
|
|
342
|
-
| CORE | PR compression | ✅ | ✅ | ✅ |
|
|
343
|
-
| | Repo language prioritization | ✅ | ✅ | ✅ |
|
|
344
|
-
| | Adaptive and token-aware file patch fitting | ✅ | ✅ | ✅ |
|
|
345
|
-
| | Multiple models support | ✅ | ✅ | ✅ |
|
|
346
|
-
| | [Static code analysis](https://pr-agent-docs.codium.ai/core-abilities/#static-code-analysis) 💎 | ✅ | ✅ | ✅ |
|
|
347
|
-
| | [Global and wiki configurations](https://pr-agent-docs.codium.ai/usage-guide/configuration_options/) 💎 | ✅ | ✅ | ✅ |
|
|
348
|
-
| | [PR interactive actions](https://www.codium.ai/images/pr_agent/pr-actions.mp4) 💎 | ✅ |
|
|
324
|
+
| | | GitHub | Gitlab | Bitbucket | Azure DevOps |
|
|
325
|
+
|-------|---------------------------------------------------------------------------------------------------------|:--------------------:|:--------------------:|:--------------------:|:------------:|
|
|
326
|
+
| TOOLS | Review | ✅ | ✅ | ✅ | ✅ |
|
|
327
|
+
| | ⮑ Incremental | ✅ | | | |
|
|
328
|
+
| | ⮑ [SOC2 Compliance](https://pr-agent-docs.codium.ai/tools/review/#soc2-ticket-compliance) 💎 | ✅ | ✅ | ✅ | |
|
|
329
|
+
| | Describe | ✅ | ✅ | ✅ | ✅ |
|
|
330
|
+
| | ⮑ [Inline File Summary](https://pr-agent-docs.codium.ai/tools/describe#inline-file-summary) 💎 | ✅ | | | |
|
|
331
|
+
| | Improve | ✅ | ✅ | ✅ | ✅ |
|
|
332
|
+
| | ⮑ Extended | ✅ | ✅ | ✅ | ✅ |
|
|
333
|
+
| | Ask | ✅ | ✅ | ✅ | ✅ |
|
|
334
|
+
| | ⮑ [Ask on code lines](https://pr-agent-docs.codium.ai/tools/ask#ask-lines) | ✅ | ✅ | | |
|
|
335
|
+
| | [Custom Prompt](https://pr-agent-docs.codium.ai/tools/custom_prompt/) 💎 | ✅ | ✅ | ✅ | |
|
|
336
|
+
| | [Test](https://pr-agent-docs.codium.ai/tools/test/) 💎 | ✅ | ✅ | | |
|
|
337
|
+
| | Reflect and Review | ✅ | ✅ | ✅ | ✅ |
|
|
338
|
+
| | Update CHANGELOG.md | ✅ | ✅ | ✅ | ✅ |
|
|
339
|
+
| | Find Similar Issue | ✅ | | | |
|
|
340
|
+
| | [Add PR Documentation](https://pr-agent-docs.codium.ai/tools/documentation/) 💎 | ✅ | ✅ | | |
|
|
341
|
+
| | [Custom Labels](https://pr-agent-docs.codium.ai/tools/custom_labels/) 💎 | ✅ | ✅ | | |
|
|
342
|
+
| | [Analyze](https://pr-agent-docs.codium.ai/tools/analyze/) 💎 | ✅ | ✅ | | |
|
|
343
|
+
| | [CI Feedback](https://pr-agent-docs.codium.ai/tools/ci_feedback/) 💎 | ✅ | | | |
|
|
344
|
+
| | [Similar Code](https://pr-agent-docs.codium.ai/tools/similar_code/) 💎 | ✅ | | | |
|
|
345
|
+
| | | | | | |
|
|
346
|
+
| USAGE | CLI | ✅ | ✅ | ✅ | ✅ |
|
|
347
|
+
| | App / webhook | ✅ | ✅ | ✅ | ✅ |
|
|
348
|
+
| | Tagging bot | ✅ | | | |
|
|
349
|
+
| | Actions | ✅ |✅| ✅ |✅|
|
|
350
|
+
| | | | | | |
|
|
351
|
+
| CORE | PR compression | ✅ | ✅ | ✅ | ✅ |
|
|
352
|
+
| | Repo language prioritization | ✅ | ✅ | ✅ | ✅ |
|
|
353
|
+
| | Adaptive and token-aware file patch fitting | ✅ | ✅ | ✅ | ✅ |
|
|
354
|
+
| | Multiple models support | ✅ | ✅ | ✅ | ✅ |
|
|
355
|
+
| | [Static code analysis](https://pr-agent-docs.codium.ai/core-abilities/#static-code-analysis) 💎 | ✅ | ✅ | ✅ | |
|
|
356
|
+
| | [Global and wiki configurations](https://pr-agent-docs.codium.ai/usage-guide/configuration_options/) 💎 | ✅ | ✅ | ✅ | |
|
|
357
|
+
| | [PR interactive actions](https://www.codium.ai/images/pr_agent/pr-actions.mp4) 💎 | ✅ | ✅ | | |
|
|
349
358
|
- 💎 means this feature is available only in [PR-Agent Pro](https://www.codium.ai/pricing/)
|
|
350
359
|
|
|
351
360
|
[//]: # (- Support for additional git providers is described in [here](./docs/Full_environments.md))
|
|
@@ -464,7 +473,11 @@ For example, add a comment to any pull request with the following text:
|
|
|
464
473
|
```
|
|
465
474
|
@CodiumAI-Agent /review
|
|
466
475
|
```
|
|
467
|
-
and the agent will respond with a review of your PR
|
|
476
|
+
and the agent will respond with a review of your PR.
|
|
477
|
+
|
|
478
|
+
Note that this is a promotional bot, suitable only for initial experimentation.
|
|
479
|
+
It does not have 'edit' access to your repo, for example, so it cannot update the PR description or add labels (`@CodiumAI-Agent /describe` will publish PR description as a comment). In addition, the bot cannot be used on private repositories, as it does not have access to the files there.
|
|
480
|
+
|
|
468
481
|
|
|
469
482
|

|
|
470
483
|
|
|
@@ -474,43 +487,6 @@ Note that when you set your own PR-Agent or use CodiumAI hosted PR-Agent, there
|
|
|
474
487
|
|
|
475
488
|
---
|
|
476
489
|
|
|
477
|
-
[//]: # (## Installation)
|
|
478
|
-
|
|
479
|
-
[//]: # (To use your own version of PR-Agent, you first need to acquire two tokens:)
|
|
480
|
-
|
|
481
|
-
[//]: # ()
|
|
482
|
-
[//]: # (1. An OpenAI key from [here](https://platform.openai.com/), with access to GPT-4.)
|
|
483
|
-
|
|
484
|
-
[//]: # (2. A GitHub personal access token (classic) with the repo scope.)
|
|
485
|
-
|
|
486
|
-
[//]: # ()
|
|
487
|
-
[//]: # (There are several ways to use PR-Agent:)
|
|
488
|
-
|
|
489
|
-
[//]: # ()
|
|
490
|
-
[//]: # (**Locally**)
|
|
491
|
-
|
|
492
|
-
[//]: # (- [Using pip package](https://pr-agent-docs.codium.ai/installation/locally/#using-pip-package))
|
|
493
|
-
|
|
494
|
-
[//]: # (- [Using Docker image](https://pr-agent-docs.codium.ai/installation/locally/#using-docker-image))
|
|
495
|
-
|
|
496
|
-
[//]: # (- [Run from source](https://pr-agent-docs.codium.ai/installation/locally/#run-from-source))
|
|
497
|
-
|
|
498
|
-
[//]: # ()
|
|
499
|
-
[//]: # (**GitHub specific methods**)
|
|
500
|
-
|
|
501
|
-
[//]: # (- [Run as a GitHub Action](https://pr-agent-docs.codium.ai/installation/github/#run-as-a-github-action))
|
|
502
|
-
|
|
503
|
-
[//]: # (- [Run as a GitHub App](https://pr-agent-docs.codium.ai/installation/github/#run-as-a-github-app))
|
|
504
|
-
|
|
505
|
-
[//]: # ()
|
|
506
|
-
[//]: # (**GitLab specific methods**)
|
|
507
|
-
|
|
508
|
-
[//]: # (- [Run a GitLab webhook server](https://pr-agent-docs.codium.ai/installation/gitlab/))
|
|
509
|
-
|
|
510
|
-
[//]: # ()
|
|
511
|
-
[//]: # (**BitBucket specific methods**)
|
|
512
|
-
|
|
513
|
-
[//]: # (- [Run as a Bitbucket Pipeline](https://pr-agent-docs.codium.ai/installation/bitbucket/))
|
|
514
490
|
|
|
515
491
|
## PR-Agent Pro 💎
|
|
516
492
|
[PR-Agent Pro](https://www.codium.ai/pricing/) is a hosted version of PR-Agent, provided by CodiumAI. It is available for a monthly fee, and provides the following benefits:
|
|
@@ -10,13 +10,15 @@
|
|
|
10
10
|
|
|
11
11
|
</picture>
|
|
12
12
|
<br/>
|
|
13
|
-
CodiumAI PR-Agent aims to help efficiently review and handle pull requests, by providing AI
|
|
13
|
+
CodiumAI PR-Agent aims to help efficiently review and handle pull requests, by providing AI feedback and suggestions
|
|
14
14
|
</div>
|
|
15
15
|
|
|
16
16
|
[](https://github.com/Codium-ai/pr-agent/blob/main/LICENSE)
|
|
17
17
|
[](https://chromewebstore.google.com/detail/pr-agent-chrome-extension/ephlnjeghhogofkifjloamocljapahnl)
|
|
18
|
+
[](https://pr-agent-docs.codium.ai/finetuning_benchmark/)
|
|
18
19
|
[](https://discord.com/channels/1057273017547378788/1126104260430528613)
|
|
19
20
|
[](https://twitter.com/codiumai)
|
|
21
|
+
[](https://www.codium.ai/images/pr_agent/cheat_sheet.pdf)
|
|
20
22
|
<a href="https://github.com/Codium-ai/pr-agent/commits/main">
|
|
21
23
|
<img alt="GitHub" src="https://img.shields.io/github/last-commit/Codium-ai/pr-agent/main?style=for-the-badge" height="20">
|
|
22
24
|
</a>
|
|
@@ -35,75 +37,78 @@ CodiumAI PR-Agent aims to help efficiently review and handle pull requests, by p
|
|
|
35
37
|
- [Overview](#overview)
|
|
36
38
|
- [Example results](#example-results)
|
|
37
39
|
- [Try it now](#try-it-now)
|
|
38
|
-
- [PR-Agent Pro 💎](
|
|
40
|
+
- [PR-Agent Pro 💎](https://pr-agent-docs.codium.ai/overview/pr_agent_pro/)
|
|
39
41
|
- [How it works](#how-it-works)
|
|
40
42
|
- [Why use PR-Agent?](#why-use-pr-agent)
|
|
41
43
|
|
|
42
44
|
## News and Updates
|
|
43
45
|
|
|
44
|
-
###
|
|
45
|
-
GPT-4o is now the default fast model ("Turbo"). This model will be used for all commands except `review` and `improve`, which will still use "GPT-4-2024-04-09", since they are harder and would still benefit from the larger model.
|
|
46
|
+
### August 26, 2024
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
Inspired by [AlphaCodium](https://github.com/Codium-ai/AlphaCodium) flow engineering scheme, PR-Agent now performs **self-reflection** on the code suggestions it provides,
|
|
49
|
-
enabling to remove invalid suggestions, and score the valid ones. The suggestions will be presented sorted by their score, enabling to focus on the most important ones first.
|
|
48
|
+
New version of [PR Agent Chrom Extension](https://chromewebstore.google.com/detail/pr-agent-chrome-extension/ephlnjeghhogofkifjloamocljapahnl) was released, with full support of context-aware **PR Chat**. This novel feature is free to use for any open-source repository. See more details in [here](https://pr-agent-docs.codium.ai/chrome-extension/#pr-chat).
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
<kbd><img src="https://www.codium.ai/images/pr_agent/pr_chat_1.png" width="768"></kbd>
|
|
52
51
|
|
|
53
|
-
<kbd><img src="https://codium.ai/images/pr_agent/
|
|
52
|
+
<kbd><img src="https://www.codium.ai/images/pr_agent/pr_chat_2.png" width="768"></kbd>
|
|
54
53
|
|
|
55
|
-
<kbd><img src="https://codium.ai/images/pr_agent/self_reflection2.png" width="512"></kbd>
|
|
56
54
|
|
|
55
|
+
### August 11, 2024
|
|
56
|
+
Increased PR context size for improved results, and enabled [asymmetric context](https://github.com/Codium-ai/pr-agent/pull/1114/files#diff-9290a3ad9a86690b31f0450b77acd37ef1914b41fabc8a08682d4da433a77f90R69-R70)
|
|
57
57
|
|
|
58
|
-
###
|
|
59
|
-
|
|
58
|
+
### August 10, 2024
|
|
59
|
+
Added support for [Azure devops pipeline](https://pr-agent-docs.codium.ai/installation/azure/) - you can now easily run PR-Agent as an Azure devops pipeline, without needing to set up your own server.
|
|
60
60
|
|
|
61
|
-
This toolbar integrates seamlessly with your GitHub environment, allowing you to access PR-Agent tools [directly from the GitHub interface](https://www.youtube.com/watch?v=gT5tli7X4H4).
|
|
62
|
-
You can also easily export your chosen configuration, and use it for the automatic commands.
|
|
63
61
|
|
|
64
|
-
|
|
62
|
+
### August 5, 2024
|
|
63
|
+
Added support for [GitLab pipeline](https://pr-agent-docs.codium.ai/installation/gitlab/#run-as-a-gitlab-pipeline) - you can now run easily PR-Agent as a GitLab pipeline, without needing to set up your own server.
|
|
64
|
+
|
|
65
|
+
### July 28, 2024
|
|
66
|
+
|
|
67
|
+
(1) improved support for bitbucket server - [auto commands](https://github.com/Codium-ai/pr-agent/pull/1059) and [direct links](https://github.com/Codium-ai/pr-agent/pull/1061)
|
|
68
|
+
|
|
69
|
+
(2) custom models are now [supported](https://pr-agent-docs.codium.ai/usage-guide/changing_a_model/#custom-models)
|
|
70
|
+
|
|
65
71
|
|
|
66
|
-
<kbd><img src="https://codium.ai/images/pr_agent/toolbar2.png" width="512"></kbd>
|
|
67
72
|
|
|
68
73
|
## Overview
|
|
69
74
|
<div style="text-align:left;">
|
|
70
75
|
|
|
71
76
|
Supported commands per platform:
|
|
72
77
|
|
|
73
|
-
| | | GitHub | Gitlab | Bitbucket | Azure DevOps
|
|
74
|
-
|
|
75
|
-
| TOOLS | Review | ✅ | ✅ | ✅ |
|
|
76
|
-
| | ⮑ Incremental | ✅ | | |
|
|
77
|
-
| | ⮑ [SOC2 Compliance](https://pr-agent-docs.codium.ai/tools/review/#soc2-ticket-compliance) 💎 | ✅ | ✅ | ✅ |
|
|
78
|
-
| | Describe | ✅ | ✅ | ✅ |
|
|
79
|
-
| | ⮑ [Inline File Summary](https://pr-agent-docs.codium.ai/tools/describe#inline-file-summary) 💎 | ✅ | | |
|
|
80
|
-
| | Improve | ✅ | ✅ | ✅ |
|
|
81
|
-
| | ⮑ Extended | ✅ | ✅ | ✅ |
|
|
82
|
-
| | Ask | ✅ | ✅ | ✅ |
|
|
83
|
-
| | ⮑ [Ask on code lines](https://pr-agent-docs.codium.ai/tools/ask#ask-lines) | ✅ | ✅ | |
|
|
84
|
-
| | [Custom Prompt](https://pr-agent-docs.codium.ai/tools/custom_prompt/) 💎 | ✅ | ✅ | ✅ |
|
|
85
|
-
| | [Test](https://pr-agent-docs.codium.ai/tools/test/) 💎 | ✅ | ✅ | |
|
|
86
|
-
| | Reflect and Review | ✅ | ✅ | ✅ |
|
|
87
|
-
| | Update CHANGELOG.md | ✅ | ✅ | ✅ |
|
|
88
|
-
| | Find Similar Issue | ✅ | | |
|
|
89
|
-
| | [Add PR Documentation](https://pr-agent-docs.codium.ai/tools/documentation/) 💎 | ✅ | ✅ | |
|
|
90
|
-
| | [Custom Labels](https://pr-agent-docs.codium.ai/tools/custom_labels/) 💎 | ✅ | ✅ | |
|
|
91
|
-
| | [Analyze](https://pr-agent-docs.codium.ai/tools/analyze/) 💎 | ✅ | ✅ | |
|
|
92
|
-
| | [CI Feedback](https://pr-agent-docs.codium.ai/tools/ci_feedback/) 💎 | ✅ | | |
|
|
93
|
-
| | [Similar Code](https://pr-agent-docs.codium.ai/tools/similar_code/) 💎 | ✅ | | |
|
|
94
|
-
| | | | | |
|
|
95
|
-
| USAGE | CLI | ✅ | ✅ | ✅ |
|
|
96
|
-
| | App / webhook | ✅ | ✅ | ✅ |
|
|
97
|
-
| | Tagging bot | ✅ | | |
|
|
98
|
-
| | Actions | ✅
|
|
99
|
-
| | | | | |
|
|
100
|
-
| CORE | PR compression | ✅ | ✅ | ✅ |
|
|
101
|
-
| | Repo language prioritization | ✅ | ✅ | ✅ |
|
|
102
|
-
| | Adaptive and token-aware file patch fitting | ✅ | ✅ | ✅ |
|
|
103
|
-
| | Multiple models support | ✅ | ✅ | ✅ |
|
|
104
|
-
| | [Static code analysis](https://pr-agent-docs.codium.ai/core-abilities/#static-code-analysis) 💎 | ✅ | ✅ | ✅ |
|
|
105
|
-
| | [Global and wiki configurations](https://pr-agent-docs.codium.ai/usage-guide/configuration_options/) 💎 | ✅ | ✅ | ✅ |
|
|
106
|
-
| | [PR interactive actions](https://www.codium.ai/images/pr_agent/pr-actions.mp4) 💎 | ✅ |
|
|
78
|
+
| | | GitHub | Gitlab | Bitbucket | Azure DevOps |
|
|
79
|
+
|-------|---------------------------------------------------------------------------------------------------------|:--------------------:|:--------------------:|:--------------------:|:------------:|
|
|
80
|
+
| TOOLS | Review | ✅ | ✅ | ✅ | ✅ |
|
|
81
|
+
| | ⮑ Incremental | ✅ | | | |
|
|
82
|
+
| | ⮑ [SOC2 Compliance](https://pr-agent-docs.codium.ai/tools/review/#soc2-ticket-compliance) 💎 | ✅ | ✅ | ✅ | |
|
|
83
|
+
| | Describe | ✅ | ✅ | ✅ | ✅ |
|
|
84
|
+
| | ⮑ [Inline File Summary](https://pr-agent-docs.codium.ai/tools/describe#inline-file-summary) 💎 | ✅ | | | |
|
|
85
|
+
| | Improve | ✅ | ✅ | ✅ | ✅ |
|
|
86
|
+
| | ⮑ Extended | ✅ | ✅ | ✅ | ✅ |
|
|
87
|
+
| | Ask | ✅ | ✅ | ✅ | ✅ |
|
|
88
|
+
| | ⮑ [Ask on code lines](https://pr-agent-docs.codium.ai/tools/ask#ask-lines) | ✅ | ✅ | | |
|
|
89
|
+
| | [Custom Prompt](https://pr-agent-docs.codium.ai/tools/custom_prompt/) 💎 | ✅ | ✅ | ✅ | |
|
|
90
|
+
| | [Test](https://pr-agent-docs.codium.ai/tools/test/) 💎 | ✅ | ✅ | | |
|
|
91
|
+
| | Reflect and Review | ✅ | ✅ | ✅ | ✅ |
|
|
92
|
+
| | Update CHANGELOG.md | ✅ | ✅ | ✅ | ✅ |
|
|
93
|
+
| | Find Similar Issue | ✅ | | | |
|
|
94
|
+
| | [Add PR Documentation](https://pr-agent-docs.codium.ai/tools/documentation/) 💎 | ✅ | ✅ | | |
|
|
95
|
+
| | [Custom Labels](https://pr-agent-docs.codium.ai/tools/custom_labels/) 💎 | ✅ | ✅ | | |
|
|
96
|
+
| | [Analyze](https://pr-agent-docs.codium.ai/tools/analyze/) 💎 | ✅ | ✅ | | |
|
|
97
|
+
| | [CI Feedback](https://pr-agent-docs.codium.ai/tools/ci_feedback/) 💎 | ✅ | | | |
|
|
98
|
+
| | [Similar Code](https://pr-agent-docs.codium.ai/tools/similar_code/) 💎 | ✅ | | | |
|
|
99
|
+
| | | | | | |
|
|
100
|
+
| USAGE | CLI | ✅ | ✅ | ✅ | ✅ |
|
|
101
|
+
| | App / webhook | ✅ | ✅ | ✅ | ✅ |
|
|
102
|
+
| | Tagging bot | ✅ | | | |
|
|
103
|
+
| | Actions | ✅ |✅| ✅ |✅|
|
|
104
|
+
| | | | | | |
|
|
105
|
+
| CORE | PR compression | ✅ | ✅ | ✅ | ✅ |
|
|
106
|
+
| | Repo language prioritization | ✅ | ✅ | ✅ | ✅ |
|
|
107
|
+
| | Adaptive and token-aware file patch fitting | ✅ | ✅ | ✅ | ✅ |
|
|
108
|
+
| | Multiple models support | ✅ | ✅ | ✅ | ✅ |
|
|
109
|
+
| | [Static code analysis](https://pr-agent-docs.codium.ai/core-abilities/#static-code-analysis) 💎 | ✅ | ✅ | ✅ | |
|
|
110
|
+
| | [Global and wiki configurations](https://pr-agent-docs.codium.ai/usage-guide/configuration_options/) 💎 | ✅ | ✅ | ✅ | |
|
|
111
|
+
| | [PR interactive actions](https://www.codium.ai/images/pr_agent/pr-actions.mp4) 💎 | ✅ | ✅ | | |
|
|
107
112
|
- 💎 means this feature is available only in [PR-Agent Pro](https://www.codium.ai/pricing/)
|
|
108
113
|
|
|
109
114
|
[//]: # (- Support for additional git providers is described in [here](./docs/Full_environments.md))
|
|
@@ -222,7 +227,11 @@ For example, add a comment to any pull request with the following text:
|
|
|
222
227
|
```
|
|
223
228
|
@CodiumAI-Agent /review
|
|
224
229
|
```
|
|
225
|
-
and the agent will respond with a review of your PR
|
|
230
|
+
and the agent will respond with a review of your PR.
|
|
231
|
+
|
|
232
|
+
Note that this is a promotional bot, suitable only for initial experimentation.
|
|
233
|
+
It does not have 'edit' access to your repo, for example, so it cannot update the PR description or add labels (`@CodiumAI-Agent /describe` will publish PR description as a comment). In addition, the bot cannot be used on private repositories, as it does not have access to the files there.
|
|
234
|
+
|
|
226
235
|
|
|
227
236
|

|
|
228
237
|
|
|
@@ -232,43 +241,6 @@ Note that when you set your own PR-Agent or use CodiumAI hosted PR-Agent, there
|
|
|
232
241
|
|
|
233
242
|
---
|
|
234
243
|
|
|
235
|
-
[//]: # (## Installation)
|
|
236
|
-
|
|
237
|
-
[//]: # (To use your own version of PR-Agent, you first need to acquire two tokens:)
|
|
238
|
-
|
|
239
|
-
[//]: # ()
|
|
240
|
-
[//]: # (1. An OpenAI key from [here](https://platform.openai.com/), with access to GPT-4.)
|
|
241
|
-
|
|
242
|
-
[//]: # (2. A GitHub personal access token (classic) with the repo scope.)
|
|
243
|
-
|
|
244
|
-
[//]: # ()
|
|
245
|
-
[//]: # (There are several ways to use PR-Agent:)
|
|
246
|
-
|
|
247
|
-
[//]: # ()
|
|
248
|
-
[//]: # (**Locally**)
|
|
249
|
-
|
|
250
|
-
[//]: # (- [Using pip package](https://pr-agent-docs.codium.ai/installation/locally/#using-pip-package))
|
|
251
|
-
|
|
252
|
-
[//]: # (- [Using Docker image](https://pr-agent-docs.codium.ai/installation/locally/#using-docker-image))
|
|
253
|
-
|
|
254
|
-
[//]: # (- [Run from source](https://pr-agent-docs.codium.ai/installation/locally/#run-from-source))
|
|
255
|
-
|
|
256
|
-
[//]: # ()
|
|
257
|
-
[//]: # (**GitHub specific methods**)
|
|
258
|
-
|
|
259
|
-
[//]: # (- [Run as a GitHub Action](https://pr-agent-docs.codium.ai/installation/github/#run-as-a-github-action))
|
|
260
|
-
|
|
261
|
-
[//]: # (- [Run as a GitHub App](https://pr-agent-docs.codium.ai/installation/github/#run-as-a-github-app))
|
|
262
|
-
|
|
263
|
-
[//]: # ()
|
|
264
|
-
[//]: # (**GitLab specific methods**)
|
|
265
|
-
|
|
266
|
-
[//]: # (- [Run a GitLab webhook server](https://pr-agent-docs.codium.ai/installation/gitlab/))
|
|
267
|
-
|
|
268
|
-
[//]: # ()
|
|
269
|
-
[//]: # (**BitBucket specific methods**)
|
|
270
|
-
|
|
271
|
-
[//]: # (- [Run as a Bitbucket Pipeline](https://pr-agent-docs.codium.ai/installation/bitbucket/))
|
|
272
244
|
|
|
273
245
|
## PR-Agent Pro 💎
|
|
274
246
|
[PR-Agent Pro](https://www.codium.ai/pricing/) is a hosted version of PR-Agent, provided by CodiumAI. It is available for a monthly fee, and provides the following benefits:
|
|
@@ -46,9 +46,10 @@ command2class = {
|
|
|
46
46
|
|
|
47
47
|
commands = list(command2class.keys())
|
|
48
48
|
|
|
49
|
+
|
|
49
50
|
class PRAgent:
|
|
50
51
|
def __init__(self, ai_handler: partial[BaseAiHandler,] = LiteLLMAIHandler):
|
|
51
|
-
self.ai_handler = ai_handler
|
|
52
|
+
self.ai_handler = ai_handler # will be initialized in run_action
|
|
52
53
|
self.forbidden_cli_args = ['enable_auto_approval']
|
|
53
54
|
|
|
54
55
|
async def handle_request(self, pr_url, request, notify=None) -> bool:
|
|
@@ -68,7 +69,9 @@ class PRAgent:
|
|
|
68
69
|
for forbidden_arg in self.forbidden_cli_args:
|
|
69
70
|
for arg in args:
|
|
70
71
|
if forbidden_arg in arg:
|
|
71
|
-
get_logger().error(
|
|
72
|
+
get_logger().error(
|
|
73
|
+
f"CLI argument for param '{forbidden_arg}' is forbidden. Use instead a configuration file."
|
|
74
|
+
)
|
|
72
75
|
return False
|
|
73
76
|
args = update_settings_from_args(args)
|
|
74
77
|
|
|
@@ -76,7 +79,7 @@ class PRAgent:
|
|
|
76
79
|
if action not in command2class:
|
|
77
80
|
get_logger().debug(f"Unknown command: {action}")
|
|
78
81
|
return False
|
|
79
|
-
with get_logger().contextualize(command=action):
|
|
82
|
+
with get_logger().contextualize(command=action, pr_url=pr_url):
|
|
80
83
|
get_logger().info("PR-Agent request handler started", analytics=True)
|
|
81
84
|
if action == "reflect_and_review":
|
|
82
85
|
get_settings().pr_reviewer.ask_and_reflect = True
|
|
@@ -94,4 +97,3 @@ class PRAgent:
|
|
|
94
97
|
else:
|
|
95
98
|
return False
|
|
96
99
|
return True
|
|
97
|
-
|
|
@@ -9,13 +9,16 @@ MAX_TOKENS = {
|
|
|
9
9
|
'gpt-4': 8000,
|
|
10
10
|
'gpt-4-0613': 8000,
|
|
11
11
|
'gpt-4-32k': 32000,
|
|
12
|
-
'gpt-4-1106-preview': 128000,
|
|
12
|
+
'gpt-4-1106-preview': 128000, # 128K, but may be limited by config.max_model_tokens
|
|
13
13
|
'gpt-4-0125-preview': 128000, # 128K, but may be limited by config.max_model_tokens
|
|
14
14
|
'gpt-4o': 128000, # 128K, but may be limited by config.max_model_tokens
|
|
15
15
|
'gpt-4o-2024-05-13': 128000, # 128K, but may be limited by config.max_model_tokens
|
|
16
16
|
'gpt-4-turbo-preview': 128000, # 128K, but may be limited by config.max_model_tokens
|
|
17
17
|
'gpt-4-turbo-2024-04-09': 128000, # 128K, but may be limited by config.max_model_tokens
|
|
18
18
|
'gpt-4-turbo': 128000, # 128K, but may be limited by config.max_model_tokens
|
|
19
|
+
'gpt-4o-mini': 128000, # 128K, but may be limited by config.max_model_tokens
|
|
20
|
+
'gpt-4o-mini-2024-07-18': 128000, # 128K, but may be limited by config.max_model_tokens
|
|
21
|
+
'gpt-4o-2024-08-06': 128000, # 128K, but may be limited by config.max_model_tokens
|
|
19
22
|
'claude-instant-1': 100000,
|
|
20
23
|
'claude-2': 100000,
|
|
21
24
|
'command-nightly': 4096,
|
|
@@ -23,17 +26,38 @@ MAX_TOKENS = {
|
|
|
23
26
|
'meta-llama/Llama-2-7b-chat-hf': 4096,
|
|
24
27
|
'vertex_ai/codechat-bison': 6144,
|
|
25
28
|
'vertex_ai/codechat-bison-32k': 32000,
|
|
29
|
+
'vertex_ai/claude-3-haiku@20240307': 100000,
|
|
30
|
+
'vertex_ai/claude-3-sonnet@20240229': 100000,
|
|
31
|
+
'vertex_ai/claude-3-opus@20240229': 100000,
|
|
32
|
+
'vertex_ai/claude-3-5-sonnet@20240620': 100000,
|
|
33
|
+
'vertex_ai/gemini-1.5-pro': 1048576,
|
|
34
|
+
'vertex_ai/gemini-1.5-flash': 1048576,
|
|
35
|
+
'vertex_ai/gemma2': 8200,
|
|
26
36
|
'codechat-bison': 6144,
|
|
27
37
|
'codechat-bison-32k': 32000,
|
|
28
38
|
'anthropic.claude-instant-v1': 100000,
|
|
29
39
|
'anthropic.claude-v1': 100000,
|
|
30
40
|
'anthropic.claude-v2': 100000,
|
|
31
41
|
'anthropic/claude-3-opus-20240229': 100000,
|
|
42
|
+
'anthropic/claude-3-5-sonnet-20240620': 100000,
|
|
32
43
|
'bedrock/anthropic.claude-instant-v1': 100000,
|
|
33
44
|
'bedrock/anthropic.claude-v2': 100000,
|
|
34
45
|
'bedrock/anthropic.claude-v2:1': 100000,
|
|
35
46
|
'bedrock/anthropic.claude-3-sonnet-20240229-v1:0': 100000,
|
|
36
47
|
'bedrock/anthropic.claude-3-haiku-20240307-v1:0': 100000,
|
|
48
|
+
'bedrock/anthropic.claude-3-5-sonnet-20240620-v1:0': 100000,
|
|
49
|
+
'claude-3-5-sonnet': 100000,
|
|
37
50
|
'groq/llama3-8b-8192': 8192,
|
|
38
51
|
'groq/llama3-70b-8192': 8192,
|
|
52
|
+
'groq/mixtral-8x7b-32768': 32768,
|
|
53
|
+
'groq/llama-3.1-8b-instant': 131072,
|
|
54
|
+
'groq/llama-3.1-70b-versatile': 131072,
|
|
55
|
+
'groq/llama-3.1-405b-reasoning': 131072,
|
|
56
|
+
'ollama/llama3': 4096,
|
|
57
|
+
'watsonx/meta-llama/llama-3-8b-instruct': 4096,
|
|
58
|
+
"watsonx/meta-llama/llama-3-70b-instruct": 4096,
|
|
59
|
+
"watsonx/meta-llama/llama-3-405b-instruct": 16384,
|
|
60
|
+
"watsonx/ibm/granite-13b-chat-v2": 8191,
|
|
61
|
+
"watsonx/ibm/granite-34b-code-instruct": 8191,
|
|
62
|
+
"watsonx/mistralai/mistral-large": 32768,
|
|
39
63
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
class BaseAiHandler(ABC):
|
|
4
5
|
"""
|
|
5
6
|
This class defines the interface for an AI handler to be used by the PR Agents.
|
|
@@ -14,7 +15,7 @@ class BaseAiHandler(ABC):
|
|
|
14
15
|
def deployment_id(self):
|
|
15
16
|
pass
|
|
16
17
|
|
|
17
|
-
@abstractmethod
|
|
18
|
+
@abstractmethod
|
|
18
19
|
async def chat_completion(self, model: str, system: str, user: str, temperature: float = 0.2, img_path: str = None):
|
|
19
20
|
"""
|
|
20
21
|
This method should be implemented to return a chat completion from the AI model.
|
|
@@ -25,4 +26,3 @@ class BaseAiHandler(ABC):
|
|
|
25
26
|
temperature (float): the temperature to use for the chat completion
|
|
26
27
|
"""
|
|
27
28
|
pass
|
|
28
|
-
|