Files
pr-agent/docs/docs/tools/similar_issues.md

43 lines
1.6 KiB
Markdown
Raw Normal View History

2024-03-06 21:52:11 +02:00
## Overview
2023-09-29 09:47:13 +03:00
The similar issue tool retrieves the most similar issues to the current issue.
2023-09-29 11:53:39 +03:00
It can be invoked manually by commenting on any PR:
2023-09-29 09:47:13 +03:00
```
/similar_issue
```
2024-04-18 10:04:38 +03:00
## Example usage
2023-09-29 09:47:13 +03:00
![similar_issue_original_issue](https://codium.ai/images/pr_agent/similar_issue_original_issue.png){width=768}
2024-03-06 21:52:11 +02:00
![similar_issue_comment](https://codium.ai/images/pr_agent/similar_issue_comment.png){width=768}
2024-03-06 21:52:11 +02:00
![similar_issue](https://codium.ai/images/pr_agent/similar_issue.png){width=768}
2023-09-29 09:47:13 +03:00
Note that to perform retrieval, the `similar_issue` tool indexes all the repo previous issues (once).
2023-12-25 00:38:24 +05:30
**Select VectorDBs** by changing `pr_similar_issue` parameter in `configuration.toml` file
2 VectorDBs are available to switch in
1. LanceDB
2. Pinecone
To enable usage of the '**similar issue**' tool for Pinecone, you need to set the following keys in `.secrets.toml` (or in the relevant environment variables):
2023-09-29 09:47:13 +03:00
```
[pinecone]
api_key = "..."
environment = "..."
```
These parameters can be obtained by registering to [Pinecone](https://app.pinecone.io/?sessionType=signup/).
2024-06-18 09:29:32 +03:00
## How to use
2023-09-29 09:47:13 +03:00
- To invoke the 'similar issue' tool from **CLI**, run:
`python3 cli.py --issue_url=... similar_issue`
- To invoke the 'similar' issue tool via online usage, [comment](https://github.com/Codium-ai/pr-agent/issues/178#issuecomment-1716934893) on a PR:
`/similar_issue`
2024-03-06 21:52:11 +02:00
- You can also enable the 'similar issue' tool to run automatically when a new issue is opened, by adding it to the [pr_commands list in the github_app section](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L66)