Open-source AI-powered tool for smart repository maintainance
- Q&A service for documentation and code understanding with advanced RAG techniques
- PR analysis is provided by pr-agent
- Documentation generatinon using RepoAgent
- I strongly recommend to use deepseek model. Package was tested only with this model.
- Create new github account (or use exist)
- Generate new personal token
- Run qdrant:
docker run -p 6333:6333 qdrant/qdrant:v1.12.1
-
Create folder with following structure:
my_project --.env # file with environment envs --config.yml # config file for Q&A RAG --pr_agent.toml # config for pr-agent --start.py # startup script
You can find config and .env file examples in
examples
folder..env file structure as follows:
HUGGINGFACE_ACCESS_TOKEN=<<hf token>> OPENAI_BASE_URL=https://api.deepseek.com OPENAI_API_KEY=<<deepseek key>> DEEPSEEK_API_KEY=<<deepseek key>> GITHUB_TOKEN=<<github token>>
-
Run
docker run --net=host --gpus all -it -v /path/to/folder/with/startup/script:/usr/local/app/example valer1435/repo_pilot bash
Then in the container run
cd /usr/local/app/example && python start.py
-
Run
docker run --net=host -it -v /path/to/folder/with/startup/script:/usr/local/app/example valer1435/repo_pilot bash
Then in the container run
cd /usr/local/app/example && python start.py
Run
git clone https://github.com/valer1435/RepoPilot.git
cd RepoPilot
docker build -f docker/Dockerfile -t valer1435/repo_pilot:0.0.1 .
-
Install locally
git clone https://github.com/valer1435/RepoPilot.git cd RepoPilot pip3 install -r requirements.txt pip3 install -e .
-
Create folder with following structure:
my_project --.env # file with environment envs --config.yml # config file for Q&A RAG --pr_agent.toml # config for pr-agent --start.py # startup script
You can find config and .env file examples in
examples
folder..env file structure as follows:
HUGGINGFACE_ACCESS_TOKEN=<<hf token>> OPENAI_BASE_URL=https://api.deepseek.com OPENAI_API_KEY=<<deepseek key>> DEEPSEEK_API_KEY=<<deepseek key>> GITHUB_TOKEN=<<github token>>
-
Run
python start.py
Please follow format are presented in the examples
folder.
PR review capabilities have not been changed comparing with original framework.
For more information please refer to pr-agent documentation.
To disable pr reviewer just set pr_config_path=None
in RepoPilot
in startup script.
You have to create .yml config file. Most things are common, but let's consider specific:
You have to setup 2 data sources (here example for vllm framework).
-
Doc parser will recursively parse all pages of documentation, starting from single one. To do this algorithm parses all links to documentation pages on a single page. Then collects links from the second page and so on.
docs: collection_name: "vllm" # should be the same with qdrant collection site: "https://docs.vllm.ai/en/latest/" # site with docs extensions: ["/", '.html'] # extension of files to use
-
code: collection_name: "vllm_code" # should be the same with qdrant collection repo_owner: "vllm-project" # repo owner (from github) repo_name: "vllm" # repo name (from github) branch: "main" # repo branch (from github) extensions: [".py"] # files to include folders: ["vllm"] # folders to include
You can follow AI-generated documentation genereted by RepoAgent. Please note that llm can hallucinate!