This commit is contained in:
mrT23
2023-09-01 20:05:33 +03:00
parent 7a6efbcb55
commit 7f6493009c
2 changed files with 9 additions and 18 deletions

View File

@ -14,7 +14,7 @@ Options that are available in the configuration file can be specified at run tim
``` ```
### Working from CLI ### Working from CLI
When running from source (CLI), your local configuration file will be initially used. When running from source (CLI), your local configuration file will be used.
Examples for invoking the different tools via the CLI: Examples for invoking the different tools via the CLI:
@ -27,9 +27,9 @@ Examples for invoking the different tools via the CLI:
`<pr_url>` is the url of the relevant PR (for example: https://github.com/Codium-ai/pr-agent/pull/50). `<pr_url>` is the url of the relevant PR (for example: https://github.com/Codium-ai/pr-agent/pull/50).
Notes: **Notes:**
(1) In addition to general configurations, each tool has its own configurations. For example, the 'review' tool will use parameters from the `[pr_reviewer]` section in the [configuration file](pr_agent/settings/configuration.toml) (1) In addition to general configuration options, each tool has its own configurations. For example, the 'review' tool will use parameters from the `[pr_reviewer]` section in the [configuration file](/pr_agent/settings/configuration.toml#L16)
(2) You can print results locally, without publishing them, by setting in `configuration.toml`: (2) You can print results locally, without publishing them, by setting in `configuration.toml`:
``` ```
@ -40,11 +40,11 @@ verbosity_level=2
This is useful for debugging or experimenting with the different tools. This is useful for debugging or experimenting with the different tools.
### Working from GitHub App (pre-built repo) ### Working from GitHub App (pre-built repo)
When running PR-Agent from GitHub App, the default configuration file (`configuration.toml`) will be loaded. When running PR-Agent from GitHub App, the default configuration file (`configuration.toml`) will be initially loaded.
#### GitHub app default tools #### GitHub app default tools
The `[github_app]` section of the configuration file defines GitHub app specific configurations. The `[github_app]` section defines the GitHub app specific configurations.
The important parameter is `pr_commands`, which is a list of tools that will be run automatically when a new PR is opened: An important parameter is `pr_commands`, which is a list of tools that will be run automatically when a new PR is opened:
``` ```
[github_app] [github_app]
pr_commands = [ pr_commands = [
@ -109,15 +109,6 @@ key = ...
Also review the [AiHandler](pr_agent/algo/ai_handler.py) file for instruction how to set keys for other models. Also review the [AiHandler](pr_agent/algo/ai_handler.py) file for instruction how to set keys for other models.
#### Changing a GIT provider
See [here](pr_agent/git_providers/__init__.py) for the list of GIT providers.
To use GitHub, for example, set:
```
[config]
git_provider="github"
```
#### Extra instructions #### Extra instructions
##### General ##### General
All PR-Agent tools have a parameter called `extra_instructions`, that enables to add free-text extra instructions. Example usage: All PR-Agent tools have a parameter called `extra_instructions`, that enables to add free-text extra instructions. Example usage:

View File

@ -117,16 +117,16 @@ CodiumAI `PR-Agent` is an open-source tool aiming to help developers review pull
| | Multiple models support | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | | Multiple models support | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| | Incremental PR Review | :white_check_mark: | | | | | | | Incremental PR Review | :white_check_mark: | | | | |
Review the [configuration](./CONFIGURATION.md) section for instruction how to use the different tools, select the relevant git provider (GitHub, Gitlab, Bitbucket,...), and adjust the configuration file to your needs. Review the [configuration](./CONFIGURATION.md) section for instructions how to use the different tools, select the relevant git provider (GitHub, Gitlab, Bitbucket,...), and adjust the configuration file to your needs.
## Try it now ## Try it now
Try GPT-4 powered PR-Agent on your public GitHub repository for free. Just mention `@CodiumAI-Agent` and add the desired command in any PR comment! The agent will generate a response based on your command. Try GPT-4 powered PR-Agent on your public GitHub repository for free. Just mention `@CodiumAI-Agent` and add the desired command in any PR comment! The agent will generate a response based on your command.
For example, add a comment: For example, add a comment to any pull request with the following text:
``` ```
@CodiumAI-Agent /review @CodiumAI-Agent /review
``` ```
And the agent will respond with a review of your PR and the agent will respond with a review of your PR
![Review generation process](https://www.codium.ai/images/demo-2.gif) ![Review generation process](https://www.codium.ai/images/demo-2.gif)