GitHub - reid41/QA-Pilot: QA-Pilot is an interactive chat project that leverages online/local LLM for rapid understanding and navigation of GitHub code repository. (original) (raw)

qa-pilot

QA-Pilot is an interactive chat project that leverages online/local LLM for rapid understanding and navigation of GitHub code repository.

Features

Release

Disclaimer

QA-Pilot

qa-demo-new

CodeGraph

code-graph-new

To deploy QA-Pilot, you can follow the below steps:

  1. Clone the QA-Pilot repository:

git clone https://github.com/reid41/QA-Pilot.git cd QA-Pilot

  1. Install conda for virtual environment management. Create and activate a new virtual environment.

conda create -n QA-Pilot python=3.10.14 conda activate QA-Pilot

  1. Install the required dependencies:

pip install -r requirements.txt

  1. Install the pytorch with cuda pytorch
  2. Setup providers

ollama pull

ollama list

docker run -p 8080:8080 --name local-ai -ti localai/localai:latest-aio-cpu

Do you have a Nvidia GPUs? Use this instead

CUDA 11

docker run -p 8080:8080 --gpus all --name local-ai -ti localai/localai:latest-aio-gpu-nvidia-cuda-11

CUDA 12

docker run -p 8080:8080 --gpus all --name local-ai -ti localai/localai:latest-aio-gpu-nvidia-cuda-12

quick check the service with http://:8080/

quick check the models with http://:8080/models/

go build -o parser parser.go

test

./parser /path/test.go

  1. Set the related parameters in config/config.ini, e.g. model provider, model, variable, Ollama API url and setup the Postgresql env

create the db, e.g.

CREATE DATABASE qa_pilot_chatsession_db; CREATE USER qa_pilot_user WITH ENCRYPTED PASSWORD 'qa_pilot_p'; GRANT ALL PRIVILEGES ON DATABASE qa_pilot_chatsession_db TO qa_pilot_user;

set the connection

cat config/config.ini [database] db_name = qa_pilot_chatsession_db db_user = qa_pilot_user db_password = qa_pilot_p db_host = localhost db_port = 5432

set the arg in script and test connection

python check_postgresql_connection.py

  1. Download and install node.js and Set up the fontend env in one terminal

make sure the backend server host ip is correct, localhost is by default

cat svelte-app/src/config.js export const API_BASE_URL = 'http://localhost:5000';

install deps

cd svelte-app npm install

npm run dev

  1. Run the backend QA-Pilot in another terminal:

Tips