mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 21:30:40 +08:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
# RAG Context Enrichment 💎
|
# RAG Context Enrichment 💎
|
||||||
|
|
||||||
`Supported Git Platforms: GitHub`
|
`Supported Git Platforms: GitHub, Bitbucket Data Center`
|
||||||
|
|
||||||
!!! info "Prerequisites"
|
!!! info "Prerequisites"
|
||||||
- RAG is available only for Qodo enterprise plan users, with single tenant or on-premises setup.
|
- RAG is available only for Qodo enterprise plan users, with single tenant or on-premises setup.
|
||||||
@ -42,26 +42,25 @@ enable_rag=true
|
|||||||
|
|
||||||
### Applications
|
### Applications
|
||||||
|
|
||||||
#### 1\. The `/review` Tool
|
The following represents the complete list of tools with RAG capability:
|
||||||
|
|
||||||
The [`/review`](https://qodo-merge-docs.qodo.ai/tools/review/) tool offers the _Focus area from RAG data_ which contains feedback based on the RAG references analysis.
|
=== "`/review`"
|
||||||
The complete list of references found relevant to the PR will be shown in the _References_ section, helping developers understand the broader context by exploring the provided references.
|
The [`/review`](https://qodo-merge-docs.qodo.ai/tools/review/) tool offers the _Focus area from RAG data_ which contains feedback based on the RAG references analysis.
|
||||||
|
The complete list of references found relevant to the PR will be shown in the _References_ section, helping developers understand the broader context by exploring the provided references.
|
||||||
|
|
||||||
{width=640}
|
{width=640}
|
||||||
|
|
||||||
#### 2\. The `/implement` Tool
|
=== "`/implement`"
|
||||||
|
The [`/implement`](https://qodo-merge-docs.qodo.ai/tools/implement/) tool utilizes the RAG feature to provide comprehensive context of the repository codebase, allowing it to generate more refined code output.
|
||||||
|
The _References_ section contains links to the content used to support the code generation.
|
||||||
|
|
||||||
The [`/implement`](https://qodo-merge-docs.qodo.ai/tools/implement/) tool utilizes the RAG feature to provide comprehensive context of the repository codebase, allowing it to generate more refined code output.
|
{width=640}
|
||||||
The _References_ section contains links to the content used to support the code generation.
|
|
||||||
|
|
||||||
{width=640}
|
=== "`/ask`"
|
||||||
|
The [`/ask`](https://qodo-merge-docs.qodo.ai/tools/ask/) tool can access broader repository context through the RAG feature when answering questions that go beyond the PR scope alone.
|
||||||
|
The _References_ section displays the additional repository content consulted to formulate the answer.
|
||||||
|
|
||||||
#### 3\. The `/ask` Tool
|
{width=640}
|
||||||
|
|
||||||
The [`/ask`](https://qodo-merge-docs.qodo.ai/tools/ask/) tool can access broader repository context through the RAG feature when answering questions that go beyond the PR scope alone.
|
|
||||||
The _References_ section displays the additional repository content consulted to formulate the answer.
|
|
||||||
|
|
||||||
{width=640}
|
|
||||||
|
|
||||||
## Limitations
|
## Limitations
|
||||||
|
|
||||||
|
@ -267,14 +267,35 @@ In such cases, we recommend prioritizing the suggestion's detailed description,
|
|||||||
|
|
||||||
> `💎 feature` Platforms supported: GitHub, GitLab
|
> `💎 feature` Platforms supported: GitHub, GitLab
|
||||||
|
|
||||||
If you set the following in your configuration file:
|
Qodo Merge implements an orchestrator agent that enables interactive code discussions, listening and responding to comments without requiring explicit tool calls.
|
||||||
|
The orchestrator intelligently analyzes your responses to determine if you want to implement a suggestion, ask a question, or request help, then delegates to the appropriate specialized tool.
|
||||||
|
|
||||||
|
#### How it works
|
||||||
|
|
||||||
|
Enable interactive code discussions by adding the following to your configuration file (default is `True`):
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[pr_code_suggestions]
|
[pr_code_suggestions]
|
||||||
enable_chat_in_code_suggestions = true
|
enable_chat_in_code_suggestions = true
|
||||||
```
|
```
|
||||||
|
|
||||||
The Qodo Merge bot will automatically listen and respond to comments within code suggestion discussions that it has initiated, without requiring explicit tool calls.
|
!!! info "Activating Dynamic Responses"
|
||||||
|
To obtain dynamic responses, the following steps are required:
|
||||||
|
|
||||||
|
1. Run the `/improve` command (mostly automatic)
|
||||||
|
2. Tick the `/improve` recommendation checkboxes (_Apply this suggestion_) to have Qodo Merge generate a new inline code suggestion discussion
|
||||||
|
3. The orchestrator agent will then automatically listen and reply to comments within the discussion without requiring additional commands
|
||||||
|
|
||||||
|
#### Explore the available interaction patterns:
|
||||||
|
|
||||||
|
=== "Asking for Details"
|
||||||
|
{width=512}
|
||||||
|
|
||||||
|
=== "Implementing Suggestions"
|
||||||
|
{width=512}
|
||||||
|
|
||||||
|
=== "Providing Additional Help"
|
||||||
|
{width=512}
|
||||||
|
|
||||||
|
|
||||||
### Dual publishing mode
|
### Dual publishing mode
|
||||||
|
@ -172,8 +172,8 @@ To use [Google AI Studio](https://aistudio.google.com/) models, set the relevant
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
[config] # in configuration.toml
|
[config] # in configuration.toml
|
||||||
model="google_ai_studio/gemini-1.5-flash"
|
model="gemini/gemini-1.5-flash"
|
||||||
fallback_models=["google_ai_studio/gemini-1.5-flash"]
|
fallback_models=["gemini/gemini-1.5-flash"]
|
||||||
|
|
||||||
[google_ai_studio] # in .secrets.toml
|
[google_ai_studio] # in .secrets.toml
|
||||||
gemini_api_key = "..."
|
gemini_api_key = "..."
|
||||||
|
@ -149,6 +149,8 @@ markdown_extensions:
|
|||||||
- pymdownx.emoji:
|
- pymdownx.emoji:
|
||||||
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
||||||
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
||||||
|
- pymdownx.tabbed:
|
||||||
|
alternate_style: true
|
||||||
- toc:
|
- toc:
|
||||||
title: On this page
|
title: On this page
|
||||||
toc_depth: 3
|
toc_depth: 3
|
||||||
|
@ -133,7 +133,7 @@ class GitProvider(ABC):
|
|||||||
def reply_to_comment_from_comment_id(self, comment_id: int, body: str):
|
def reply_to_comment_from_comment_id(self, comment_id: int, body: str):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def get_pr_description(self, full: bool = True, split_changes_walkthrough=False) -> str or tuple:
|
def get_pr_description(self, full: bool = True, split_changes_walkthrough=False) -> str | tuple:
|
||||||
from pr_agent.algo.utils import clip_tokens
|
from pr_agent.algo.utils import clip_tokens
|
||||||
from pr_agent.config_loader import get_settings
|
from pr_agent.config_loader import get_settings
|
||||||
max_tokens_description = get_settings().get("CONFIG.MAX_DESCRIPTION_TOKENS", None)
|
max_tokens_description = get_settings().get("CONFIG.MAX_DESCRIPTION_TOKENS", None)
|
||||||
|
Reference in New Issue
Block a user