This guide provides installation instructions for Linux and Windows, along with automated setup using the Makefile.
For: Most contributors working on API, backend, or data pipeline features
make dev-liteThis will:
- Set up the Python virtual environment
- Install dependencies (skips the 4GB model and GPU packages)
- Start the API server without loading the LLM
The API runs at http://127.0.0.1:8000 within a few minutes.
Works: All API endpoints, session management, context search, data pipeline
Doesn't work: Chat completions (no model loaded)
Use this when:
- Working on API endpoints or backend services
- Developing data pipeline features
- Running tests
- You don't need to test actual chatbot responses
For: Testing complete chat functionality or working on model-specific features
Follow the platform-specific installation guide below to:
- Install llama-cpp-python with GPU support
- Download the 4GB Mistral model
- Set up the complete environment
Then run:
make apiWorks: Everything, including real chat completions with the local LLM
Use this when:
- Testing the complete chatbot experience
- Working on prompt engineering or model integration
- Debugging inference issues
- Preparing for production deployment
- Python 3.11 or later
- Git (to clone the repository)
- Maven (for the Java components)
- Sufficient disk space (at least 5GB for models and dependencies)
-
Clone the Repository
git clone <repository-url> cd resources-ai-chatbot-plugin
-
Build the Maven Project
mvn install
-
Set Up the Python Environment
Navigate to the Python subproject directory:
cd chatbot-coreCreate a Python virtual environment:
python3 -m venv venv
Activate the virtual environment
source venv/bin/activate -
Install the dependencies
pip install -r requirements.txt
Note: The backend requires
python-multipartfor multipart form handling. This dependency is included in the requirements file, but if you encounter runtime errors related to multipart requests, ensure it is installed:pip install python-multipart
-
Set the
PYTHONPATHto the current directory(chatbot-core/)export PYTHONPATH=$(pwd)
-
Download the Required Model
- Create the model directory if it doesn't exist:
mkdir -p api/models/mistral
- Download the Mistral 7B Instruct model from Hugging Face:
- Go to https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-GGUF
- Download the file named
mistral-7b-instruct-v0.2.Q4_K_M.gguf - Place the downloaded file in
api/models/mistral/
- Create the model directory if it doesn't exist:
By default, the backend attempts to load the local GGUF model during startup. If the model file is missing, the server will fail to start.
Contributors who do not need local inference can run the backend without a model by using test mode (see “Running without a local LLM model (test mode)” below).
This guide provides step-by-step instructions for installing and running the Jenkins Chatbot on Windows systems.
- Windows 10 or 11
- Python 3.11 or later
- Git (to clone the repository)
- Maven (for the Java components)
- Sufficient disk space (at least 5GB for models and dependencies)
-
Clone the Repository
git clone <repository-url> cd resources-ai-chatbot-plugin
-
Build the Maven Project
mvn install
-
Set Up the Python Environment
Navigate to the Python subproject directory:
cd chatbot-coreCreate a Python virtual environment:
python3 -m venv venv
Activate the virtual environment
.\venv\Scripts\activate
-
Install Dependencies
Install the Python dependencies using the CPU-only requirements file to avoid NVIDIA CUDA dependency issues:
pip install -r requirements-cpu.txt
Note: The backend requires
python-multipartfor multipart form handling. This dependency is included in the requirements file, but if you encounter runtime errors related to multipart requests, ensure it is installed:pip install python-multipartNote: If you encounter any dependency issues, especially with NVIDIA packages, use the
requirements-cpu.txtfile which excludes GPU-specific dependencies. -
Set the PYTHONPATH
Set the PYTHONPATH environment variable to the current directory:
$env:PYTHONPATH = (Get-Location).Path -
Download the Required Model
- Create the model directory if it doesn't exist:
mkdir -p api\models\mistral
- Download the Mistral 7B Instruct model from Hugging Face:
- Go to https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-GGUF
- Download the file named
mistral-7b-instruct-v0.2.Q4_K_M.gguf - Place the downloaded file in
api\models\mistral\
- Create the model directory if it doesn't exist:
By default, the backend attempts to load the local GGUF model during startup. If the model file is missing, the server will fail to start.
Contributors who do not need local inference can run the backend without a model by using test mode (see “Running without a local LLM model (test mode)” below).
To avoid running all the steps each time, we have provided a target in the Makefile to automate the setup process.
To run it:
make setup-backendBy default the target will use the requirements.txt to install the dependencies. In case you would like to run it with the cpu requirements run:
make setup-backend IS_CPU_REQ=1Note: The same logic holds for every other target that will be presented.
Note: The target does not include the installation of the LLM.
The setup-backend Makefile target prepares the Python backend by:
- Creating a virtual environment in
chatbot-core/venv - Installing backend dependencies from
requirements.txt(orrequirements-cpu.txtwhenIS_CPU_REQ=1is set)
You usually do not need to run this manually.
The make api target automatically runs setup-backend
if the backend has not already been set up.
By default, the backend loads a local GGUF model on startup. For contributors who do not need local inference, a test configuration is available.
The backend includes a config-testing.yml file that disables local
LLM loading. This configuration is activated when the
PYTEST_VERSION environment variable is set.
Example:
PYTEST_VERSION=1 make apiThis section covers common issues encountered during setup, especially when installing
dependencies that require native compilation (e.g. llama-cpp-python).
Symptoms
pip install llama-cpp-pythonfails- Errors mentioning
cmake,gcc, or “failed building wheel”
Cause
llama-cpp-python requires a working C/C++ toolchain and CMake to build native extensions.
Solution
For Linux (Ubuntu/Debian):
sudo apt install build-essential cmake
pip install llama-cpp-pythonFor macOS:
brew install cmake
pip install llama-cpp-python