Commit graph

540 commits

Author SHA1 Message Date
Hussam.lawen
c59e9f77a6
fix 2023-12-18 17:06:02 +02:00
mrT23
1c4e64333c
feat: Implement label case conversion and update label descriptions in settings files 2023-12-18 12:29:06 +02:00
mrT23
38ea9143f3
Make LangChain dependency optional in pr-agent and update requirements.txt 2023-12-14 09:05:53 +02:00
mrT23
3531016a2c
Refactor AI handler instantiation in PRAgent and related classes 2023-12-14 08:53:22 +02:00
Brian Pham
557b39ec87 Merge branch 'base-ai-handler' into abstract-BaseAiHandler 2023-12-14 07:44:13 +08:00
Brian Pham
8fb4a42ef1 Update AI handler instantiation in server files 2023-12-13 08:16:02 +08:00
Brian Pham
ca1ccd7b91 update base 2023-12-12 23:56:20 +08:00
Brian Pham
b7225cc674 update langchain 2023-12-12 23:52:50 +08:00
Brian Pham
a627dcd64f Update langchain 2023-12-12 23:28:58 +08:00
Brian Pham
0c66554d50 langchain: move model and temperature to chat_completion 2023-12-12 23:07:46 +08:00
Brian Pham
6c7beccb4f add LangChain AI Handler 2023-12-12 23:03:49 +08:00
Brian Pham
7eb2e769cf Move ai handlers to specific folder 2023-12-12 23:03:38 +08:00
Brian Pham
5239e1c3e9 Load default AI Handler from util function 2023-12-12 21:51:05 +08:00
Brian Pham
ebf7027aab add openai handler 2023-12-11 17:49:20 +08:00
Brian Pham
a1cbd80b2a update base ai handler 2023-12-11 17:49:09 +08:00
Brian Pham
b8021d7ca3 rename file 2023-12-11 16:57:23 +08:00
Brian Pham
523a896465 Rename AiHandler to LiteLLMAiHandler 2023-12-11 16:56:49 +08:00
Brian Pham
b6409929d2 Remove extra code 2023-12-09 16:51:50 +00:00
Brian Pham
c0303ff9ec Merge remote-tracking branch 'upstream/main' into abstract-BaseAiHandler 2023-12-09 16:47:13 +00:00
Brian Pham
f2abe5c73e Abstract AiHandler to BaseAiHandler 2023-12-09 16:39:25 +00:00
Brian Pham
7e47baa9db Refactor AI handler classes 2023-12-10 00:25:25 +08:00
mrT23
cf3401536a
feat: Remove 'Refactoring' label from custom labels and update related descriptions 2023-12-05 07:48:21 +02:00
Phill Zarfos
317fec0536 Throw descriptive error message if model is not in MAX_TOKENS array 2023-12-03 21:06:55 -05:00
tmokmss
5e642c10fa fallback to try_fix_yaml 2023-11-29 17:57:54 +09:00
tmokmss
f8f57419c4 Update ai_handler.py 2023-11-28 23:08:17 +09:00
tmokmss
917f4b6a01 hard code value 2023-11-28 20:59:21 +09:00
tmokmss
97d6fb999a set max_tokens_to_sample 2023-11-28 20:58:57 +09:00
tmokmss
1373ca23fc support Amazon Bedrock 2023-11-28 20:58:42 +09:00
mrT23
8f615e17a3
s 2023-11-26 16:42:41 +02:00
mrT23
d8ae32fc55
language_extension_map 2023-11-26 08:52:55 +02:00
mrT23
9465b7b577
refactor: Move clip_tokens function from pr_processing to utils module, and add tests 2023-11-26 08:29:47 +02:00
mrT23
fdfd6247fb
Merge branch 'main' into tr/pydantic 2023-11-25 21:36:16 -08:00
mrT23
e80a0ed9c8
glob 2023-11-23 09:16:50 +02:00
mrT23
1b600cd85f
Refactor YAML parsing for improved error handling 2023-11-20 10:30:59 +02:00
mrT23
83247cadec
protections 2023-11-19 17:30:57 +02:00
mrT23
388cc740b6
Merge pull request #436 from rhyst/support-vertex-ai
Support Google's Vertex AI
2023-11-15 04:26:08 -08:00
Rhys Tyers
6b4b16dcf9 Support Google's Vertex AI 2023-11-15 10:26:58 +00:00
mrT23
c4899a6c54
bitbucket 2023-11-15 12:11:02 +02:00
mrT23
0df0542958
prompt 2023-11-13 15:55:35 +02:00
mrT23
0e932af2e3
multi line 2023-11-13 12:01:08 +02:00
mrT23
e9891fc530
s1 2023-11-12 16:37:53 +02:00
mrT23
727eea2b62
s1 2023-11-12 15:00:06 +02:00
mrT23
8fdf174dec
fallback 2023-11-10 18:44:19 +02:00
mrT23
c2bec614e5
s 2023-11-08 14:46:11 +02:00
mrT23
0293412a42
s 2023-11-08 14:31:08 +02:00
mrT23
69b68b78f5
s 2023-11-08 14:17:59 +02:00
mrT23
c5bc4b44ff
fix added files 2023-11-08 12:51:30 +02:00
mrT23
39e5102a2e
fix added files 2023-11-08 12:47:18 +02:00
mrT23
54f41dd603
code 2023-11-07 14:41:15 +02:00
mrT23
094f641fb5
code 2023-11-07 14:38:37 +02:00
mrT23
a35a75eb34
get_max_tokens + added 'gpt-4-1106-preview' 2023-11-07 14:28:41 +02:00
Hussam.lawen
ff79776410
Keep user labels 2023-11-06 15:14:08 +02:00
Hussam.lawen
ec3f2fb485
Revert "generate labels keep user labels only"
This reverts commit 94a2a5e527.
2023-11-06 15:08:29 +02:00
Hussam.lawen
94a2a5e527
generate labels keep user labels only 2023-11-06 15:07:06 +02:00
mrT23
c895657310
fixed review 2023-10-29 17:59:46 +02:00
mrT23
e3845283f8
release notes 2023-10-29 14:58:36 +02:00
Hussam.lawen
f3bdbfc103
Add /generate_labels function + fix issues 2023-10-26 23:28:33 +03:00
Hussam.lawen
1a89c7eadf
refactor + add description options 2023-10-24 22:28:57 +03:00
Ori Kotek
c324d88be3
Refactor logging system to use custom logger across the codebase 2023-10-16 14:56:00 +03:00
jamesrom
92e9012fb6 Error handling 2023-10-07 09:39:53 +11:00
jamesrom
43dc648b05 Simplify filter 2023-10-06 22:44:29 +11:00
jamesrom
e387086890 Add support for ignoring files
Add ignore.toml, configuration for ignoring files
Add file_filter.py, for matching files against glob/regex patterns
Update relevant code to use file filter
+Tests
2023-10-06 01:43:35 +11:00
mrT23
fd8c90041c
azure 2023-10-06 08:31:31 +03:00
mrT23
ea6253e2e8
revert azure 2023-10-06 08:12:11 +03:00
mrT23
1bab26f1c5
gfm_supported 2023-10-05 18:08:02 +03:00
mrT23
088f256415
stable 2023-10-05 17:03:10 +03:00
mrT23
44239f1a79
Patch Extra Lines 2023-10-05 08:38:43 +03:00
mrT23
992f51a019
protections 2023-09-20 15:59:35 +03:00
mrT23
fcd9821d10
protections 2023-09-20 15:57:06 +03:00
mrT23
c0511c954e
icon 2023-09-17 17:08:02 +03:00
mrT23
4fbe7d14b5
protection for no language 2023-09-17 16:41:53 +03:00
mrT23
ea91a38541
Estimated effort to review 2023-09-17 16:31:58 +03:00
mrT23
caaee4e43d
Estimated time to review 2023-09-15 17:09:58 +03:00
mrT23
d7f43d6ee0
gfm_supported 2023-09-12 07:43:15 +03:00
Ori Kotek
98d0835c48
Merge remote-tracking branch 'origin/main' into fix_bitbucket_publish_description 2023-09-10 14:08:17 +03:00
Ori Kotek
2aef9dfe55
Merge remote-tracking branch 'origin/main' into fix_bitbucket_publish_description 2023-09-10 14:06:54 +03:00
Ori Kotek
115b513c9b
Remove 'bitbucket' explicit dependency anywhere that's not in bitbucket_provider.py 2023-09-10 14:06:13 +03:00
mrT23
d40285e4d3
Merge branch 'main' into tr/litellm_debugger 2023-09-10 13:40:35 +03:00
mrT23
892dbe458e
litellm client 2023-09-09 17:35:45 +03:00
mrT23
b23a4c0535
Merge remote-tracking branch 'origin/main' into tr/issue_tool
# Conflicts:
#	requirements.txt
2023-09-07 12:30:16 +03:00
mrT23
901c1dc3f0
issue tool 2023-09-06 08:43:01 +03:00
Krrish Dholakia
5da6a0147c showing how to use huggingface models 2023-09-05 16:23:22 -07:00
Krrish Dholakia
ca50724952 adding details on calling azure 2023-09-05 15:19:56 -07:00
mrT23
c0b23e1091
Merge remote-tracking branch 'origin/main' into tr/issue_tool
# Conflicts:
#	pr_agent/algo/utils.py
2023-09-05 08:05:33 +03:00
mrT23
f14c5d296a
Merge pull request #251 from zmeir/zmeir-fix_azure_api
Fixed incorrect usage for Azure OpenAI API
2023-08-28 20:52:04 +03:00
zmeir
314d13e25f Fixed incorrect usage for Azure OpenAI API 2023-08-28 16:13:26 +03:00
mrT23
2dc2a45e4b
yaml 2023-08-28 09:48:43 +03:00
mrT23
16150e9c84
update litellm 2023-08-23 09:19:15 +03:00
mrT23
6599cbc7f2
Merge remote-tracking branch 'origin/main' into tr/tweaks_and_improvements 2023-08-23 09:17:53 +03:00
mrT23
53108a9b20
Merge branch 'main' into main 2023-08-23 09:16:00 +03:00
mrT23
412c86593d
fixed tests 2023-08-22 20:21:52 +03:00
mrT23
04be1573d5
improved review 2023-08-22 20:10:36 +03:00
mrT23
f4f040bf8d
publish each suggestion separably 2023-08-22 16:11:51 +03:00
mrT23
b85679e5e4
improve --extend 2023-08-22 09:42:59 +03:00
Krrish Dholakia
dcad490513 adding huggingface inference support + litellm debugger 2023-08-21 15:31:51 -07:00
mrT23
fb9335f424
extended improve 2023-08-21 18:17:34 +03:00
mrT23
6693aa3cbc
semi stable 2023-08-20 15:01:06 +03:00
zmeir
c6f8d985c2 Safe parse key value in config override 2023-08-20 10:11:39 +03:00
zmeir
6ca0655517 Extracted to helper functions 2023-08-13 11:03:10 +03:00
zmeir
7762a67250 Fail if not enough fallback deployments 2023-08-13 10:55:44 +03:00
zmeir
7049c73790 Merge branch 'main' into zmeir-fallback_deployments 2023-08-13 10:48:21 +03:00
mrT23
bb5878c99a
Merge branch 'main' into tr/block_scalar 2023-08-11 18:36:21 +03:00
mrT23
273a9e35d9
block scalar 2023-08-11 18:35:34 +03:00
Ori Kotek
b206b1c5ff
Protect for empty description 2023-08-10 02:08:36 +03:00
mrT23
d38c5236dd
Merge pull request #187 from Codium-ai/ok/limit_description
Limiting Description and Commit Messages Length
2023-08-09 14:14:47 +03:00
Ori Kotek
e0f295659d
A less hacky way 2023-08-09 12:17:54 +03:00
mrT23
fe75e3f2ec
yaml
yaml
2023-08-09 12:15:52 +03:00
Ori Kotek
e3274af831
A (still) hacky way to clip description and commit messages 2023-08-09 10:17:58 +03:00
Zohar Meir
95b6abef09
Merge branch 'main' into zmeir-fallback_deployments 2023-08-08 11:00:13 +03:00
zmeir
7f1849a867 Logging 2023-08-07 22:42:53 +03:00
zmeir
6c4a5bae52 Support fallback deployments to accompany fallback models
This is useful for example in Azure OpenAI deployments where you have a different deployment per model, so the current fallback implementation doesn't work (still uses the same deployment for each fallback attempt)
2023-08-07 16:18:48 +03:00
Ori Kotek
8f751f7371
Default timeout for AI is now 180s, configurable 2023-08-07 13:26:28 +03:00
Ori Kotek
a00038fbd8
Merge remote-tracking branch 'origin/main' into patch-1 2023-08-06 18:09:09 +03:00
Krrish Dholakia
0f975ccf4a bug fixes 2023-08-05 22:50:41 -07:00
mrT23
7367c62cf9
TestFindLineNumberOfRelevantLineInFile 2023-08-06 08:31:15 +03:00
mrT23
fed0ea349a
find_line_number_of_relevant_line_in_file
find_line_number_of_relevant_line_in_file
2023-08-06 08:13:07 +03:00
Krrish Dholakia
ed8554699b bug fixes and updates 2023-08-03 16:05:46 -07:00
mrT23
7a57db5d88
load_large_diff is done once 2023-08-03 22:14:05 +03:00
Krish Dholakia
102edcdcf1
adding support for Anthropic, Cohere, Replicate, Azure 2023-08-03 12:04:08 -07:00
mrT23
0dec24aa37
edge case for hunks 2023-08-03 10:50:22 +03:00
Ori Kotek
d7b77764c3
Support context aware settings (for each incoming request), support override of settings, refactor CLI to use pr_agent.py 2023-08-01 14:43:26 +03:00
mrT23
a6ba8b614a
Example args 2023-07-30 12:16:43 +03:00
mrT23
4f0fabd2ca
update_settings_from_args refactor 2023-07-30 12:14:26 +03:00
mrT23
42b047a14e
update_settings_from_args 2023-07-30 12:04:57 +03:00
mrT23
3daf94954a
update_settings_from_args 2023-07-30 11:43:44 +03:00
Ori Kotek
a50e137bba
Merge pull request #133 from idavidov/idavidov/github-ratelimit-message
Handling GitHub API Rate Limit Exceeded Exception
2023-07-27 14:22:11 +03:00
Ori Kotek
8ae5faca53
Fix cyclic dependency 2023-07-25 16:52:18 +03:00
idavidov
1229fba346 + settings.github.ratelimit_retries setup in configuration.toml 2023-07-25 16:37:13 +03:00
idavidov
3b334805ee still need GithubException.RateLimitExceededException in pr_processing.py for correct exception catch 2023-07-25 15:14:56 +03:00
idavidov
b6f6c903a0 moved @retry to github_provider.py and fetch number of retries from settings 2023-07-25 15:12:02 +03:00
idavidov
55637a5620 added retry decorator similar to used in ai_handler following @okotek suggestion 2023-07-25 14:42:54 +03:00
idavidov
404cc0a00e small change to show message and fail 2023-07-25 14:20:20 +03:00
idavidov
d1a8a610e9 Revert "show how much time until rate limit reset"
This reverts commit 8f482cd41a.
2023-07-25 13:38:55 +03:00
Ilya Davidov
8f482cd41a
show how much time until rate limit reset
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-25 13:23:19 +03:00
idavidov
34096059ff quick and dirty response for github API ratelimit, until some smart solution will be implemented 2023-07-25 13:05:56 +03:00
Patryk Kowalski
02ecaa340f Local Git Provider Implementation 2023-07-24 12:49:57 +02:00
salberts
cd8bbbf889 bugfix 2023-07-24 00:58:21 +03:00
Ori Kotek
1e97236a15
Add support for fallback models 2023-07-23 16:39:25 +03:00
Ori Kotek
02a1d8dbfc
Add support for fallback models 2023-07-23 16:16:36 +03:00
mrT23
bbdfd2c3d4
Merge pull request #108 from patryk-kowalski-ds/deepsense.ai/configurable-language-extensions
Configurable Language Extensions
2023-07-21 21:47:52 +03:00
Patryk Kowalski
a71a12791b Move hard-coded language configurations to a configuration file.
Load this configuration file in the config loader.
2023-07-20 15:37:42 +02:00
Ori Kotek
2e246869d0
Retry on rate limit error on OpenAI calls 2023-07-20 15:02:34 +03:00
Ori Kotek
2f9546e144
Retry on rate limit error on OpenAI calls 2023-07-20 15:01:12 +03:00
mrT23
e2a4cd6b03
docstring 2023-07-20 10:51:21 +03:00
mrT23
577f24d107
Merge pull request #89 from zmeir/zmeir-review_score
Add Score Review Feature
2023-07-19 17:07:05 +03:00
Hussam.lawen
523839be7d
Merge commit 'd1586ddd77b86f0d3b29aee3370f29624799e388' into hl/incremental_review 2023-07-19 16:14:33 +03:00
mrT23
7fdbd6a680
Update utils.py 2023-07-19 15:12:50 +03:00
Hussam.lawen
17b40a1fa1
Merge commit '7abbe08ff15d31c7e20de6d88638bfe27430c2f4' into hl/incremental_review 2023-07-19 14:24:44 +03:00
Hussam.lawen
8038b6ab99
refactor and clean 2023-07-19 14:22:34 +03:00
mrT23
97bfee47a3
minor fixes 2023-07-19 11:34:55 +03:00
zmeir
8868c92141 Merge branch 'main' into zmeir-review_score 2023-07-19 11:05:24 +03:00
Hussam.lawen
f73cddcb93
Change Review title when 2023-07-19 01:03:47 +03:00
Hussam.lawen
5f36f0d753
Merge commit 'bdf7eff7cd0a8894c3e66e49bdf89f27da1bfcb4' into hl/incremental_review 2023-07-18 23:28:43 +03:00
Hussam.lawen
dc4bf13d39
Add Incremental Review 2023-07-18 23:14:47 +03:00
zmeir
0396e10706 Add configuration to request a score for the PR
This can help teams compare the review of the PR agent with that of a human reviewer, and fine-tune a score threshold for automatic approval where they decide the agent's review is satisfactory.
2023-07-18 16:40:35 +03:00
mrT23
c507785475
bugfix 2023-07-18 16:32:51 +03:00
Hussam.lawen
5d45632247
Performance improvement: Filter out bad files before getting their head and original source code and diff 2023-07-18 13:33:32 +03:00
Hussam.lawen
f2b74b6970
support gitlab describe function 2023-07-18 13:03:36 +03:00
Ori Kotek
90f97b0226
Lint fixes 2023-07-18 11:34:57 +03:00
Hussam.lawen
fc309f69b9
Support Code Suggestion in Gitlab 2023-07-17 01:44:40 +03:00
mrT23
4f4989af8c
full code suggestions
full code suggestions
2023-07-16 09:01:57 +03:00
Hussam Lawen
4a6bf4c55a
Merge branch 'main' into hl/gitlab_fix 2023-07-14 22:48:13 +03:00
mrT23
ae9cedd50d
Merge pull request #46 from Codium-ai/tr/description_tool
Add PR Description Tool
2023-07-13 21:00:50 +03:00
Hussam.lawen
ae63833043
Merge commit '055a8ea8590fbe9078cdc6af6398df2f053b9ce7' into hl/gitlab_fix 2023-07-13 20:44:26 +03:00
Hussam.lawen
da6828ad87
Inline suggestion refactor + Gitlab WORKS 2023-07-13 20:43:49 +03:00
mrT23
4e59693c76
diff_files 2023-07-13 18:26:35 +03:00
Ori Kotek
055a8ea859
Merge pull request #44 from zmeir/patch-1
Typo when setting `openai.api_version`
2023-07-13 17:52:33 +03:00
mrT23
9fadde388b
remove title and description 2023-07-13 16:26:33 +03:00
Zohar Meir
f57d58ee7d
Typo when setting openai.api_version 2023-07-13 10:22:57 +03:00
mrT23
77a451ada0
inline_code_comments 2023-07-13 09:44:33 +03:00
mrT23
4b8420aa16
remove suggestion number 2023-07-13 08:10:36 +03:00
Ori Kotek
cd1e62ec96
Add Azure OpenAI support 2023-07-12 11:53:46 +03:00
Hussam.lawen
b8a71b369d
add max_iter 2023-07-11 22:22:08 +03:00
Hussam.lawen
fd4a2bf7ff
refactor try_fix_json, generalize finding the ending of a json item (support new lines, spaces tab) 2023-07-11 22:11:42 +03:00
Ori Kotek
b2d952cafa
1. Move deployment_type to configuration.toml
2. Lint
3. Inject GitHub app installation ID into GitHub provider using the settings mechanism.
2023-07-11 16:55:09 +03:00
Ori Kotek
c2639a2520
Merge pull request #32 from Codium-ai/tr/focused_pr
Focused PR update
2023-07-11 15:29:36 +03:00
Hussam Lawen
e1b856f7e6
Merge pull request #34 from Codium-ai/enhancement/soft_and_hard_thresh
Separate output token threshold to soft and hard instead of implicit hard = soft/2
2023-07-11 14:35:00 +03:00
Ori Kotek
5fdc9223e9
Separate output token threshold to soft and hard instead of implicit hard = soft/2 2023-07-11 14:11:46 +03:00
mrT23
301622216f
Focused PR update 2023-07-11 08:50:28 +03:00
Hussam.lawen
efc8f755d5
exclude snap files 2023-07-06 20:22:54 +03:00
mrT23
e5e90e35e5
minor fixes 2023-07-06 16:27:39 +03:00
Hussam Lawen
53e7ff62bf
Merge pull request #3 from Codium-ai/algo/combine_modified_files_one_list
Combine all modified and deleted files that been compressed to the prompt
2023-07-06 14:59:13 +03:00
Hussam.lawen
259fa84eeb
disabling encoding error on special_tokens 2023-07-06 13:22:12 +03:00
Hussam.lawen
ff720d32fe
pylance 2023-07-06 13:20:08 +03:00
mrT23
e53ae712f9
formatting 2023-07-06 12:49:10 +03:00
Hussam.lawen
795f6ab8d5
Add deleted files section and count their tokens 2023-07-06 12:21:27 +03:00
Hussam.lawen
1a626fb1f3
change "modified files" to "more modified files" 2023-07-06 11:23:38 +03:00
Hussam.lawen
0ce42e786e
Combine all modified file that been compressed into one list at the end of the PR 2023-07-06 11:12:41 +03:00
Ori Kotek
b94734e69a
Add support for OpenAI organization in the secrets file 2023-07-06 09:52:01 +03:00
Ori Kotek
4b4d91dfe9
Initial commit - PR-Agent OSS release 2023-07-06 00:21:08 +03:00