Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
77c821e
initial commit
FairozaAmira Feb 21, 2026
b4e951f
Add response metadata and docs for interactive API testing
FairozaAmira Feb 21, 2026
57e151d
Expand RAG documentation and sample datasets
FairozaAmira Feb 21, 2026
c57afbc
Add external website ingestion and expand API documentation
FairozaAmira Feb 21, 2026
36481f2
Add CI/CD workflow with tag-based UAT and PROD deployments
FairozaAmira Feb 21, 2026
30fac8f
Fix setuptools flat-layout build error
FairozaAmira Feb 21, 2026
297b770
Fix LangChain import error and modernize RAG pipeline
FairozaAmira Feb 21, 2026
8ac94cd
Remove deprecated langchain.chains imports and simplify RAG pipeline
FairozaAmira Feb 21, 2026
e7d51fe
Freeze Python and dependency versions; enforce CPU-only builds
FairozaAmira Feb 21, 2026
b919685
Fix BaseRetriever import and enforce CPU-only PyTorch in Docker
FairozaAmira Feb 21, 2026
ea39d2e
Fix Pydantic v2 private attribute error in DomainAwareRetriever
FairozaAmira Feb 21, 2026
90ab967
Remove torch/torchvision from dependencies; enforce CPU-only in Docker
FairozaAmira Feb 21, 2026
e98fff7
Add env-specific deploy configs and Ollama-ready Docker runtime
FairozaAmira Feb 21, 2026
20c6a64
Add env-specific deployment configs and stabilize Docker/Ollama runtime
FairozaAmira Feb 21, 2026
b9bd3e6
Stabilize Docker/Ollama setup and deployment env templates
FairozaAmira Feb 21, 2026
3e0eab6
update readme
FairozaAmira Feb 21, 2026
21910e7
build: switch to bookworm images and remove sqlite compatibility shim
FairozaAmira Feb 21, 2026
56e27b7
feat(config): add configurable Ollama timeout and disable Chroma tele…
FairozaAmira Feb 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
__pycache__
*.pyc
*.pyo
.env
.git
.gitignore
.chroma_store
generated_qa
uv.lock
.uv
.venv
venv
.pytest_cache
22 changes: 22 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Production environment configuration
CHATBOT_APP_NAME="Enterprise RAG Chatbot"
CHATBOT_APP_ENV="production"

# LLM configuration
# Provider options: placeholder | openai | ollama
CHATBOT_LLM_PROVIDER="placeholder"
# set if using openai provider
CHATBOT_LLM_API_KEY=""
CHATBOT_LLM_MODEL="llama3.2"
CHATBOT_OLLAMA_BASE_URL="http://127.0.0.1:11434"
CHATBOT_OLLAMA_TIMEOUT_SECONDS=300
CHATBOT_LLM_COST_PER_1K_TOKENS=0.0
CHATBOT_ENABLE_DEEPEVAL=false

# Chroma telemetry
ANONYMIZED_TELEMETRY=False

# Storage locations
CHATBOT_CHROMA_PERSIST_DIRECTORY=.chroma_store
CHATBOT_DATA_DIRECTORY=data
CHATBOT_QA_CACHE_DIRECTORY=generated_qa
22 changes: 22 additions & 0 deletions .env.uat
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# UAT environment configuration
CHATBOT_APP_NAME="Enterprise RAG Chatbot"
CHATBOT_APP_ENV="uat"

# LLM configuration
# Provider options: placeholder | openai | ollama
CHATBOT_LLM_PROVIDER="placeholder"
# set if using openai provider
CHATBOT_LLM_API_KEY=""
CHATBOT_LLM_MODEL="llama3.2"
CHATBOT_OLLAMA_BASE_URL="http://127.0.0.1:11434"
CHATBOT_OLLAMA_TIMEOUT_SECONDS=300
CHATBOT_LLM_COST_PER_1K_TOKENS=0.0
CHATBOT_ENABLE_DEEPEVAL=false

# Chroma telemetry
ANONYMIZED_TELEMETRY=False

# Storage locations
CHATBOT_CHROMA_PERSIST_DIRECTORY=.chroma_store
CHATBOT_DATA_DIRECTORY=data
CHATBOT_QA_CACHE_DIRECTORY=generated_qa
84 changes: 84 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: CI-CD

on:
push:
pull_request:
workflow_dispatch:

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install uv
run: |
python -m pip install --upgrade pip
pip install uv

- name: Install dependencies
run: |
uv pip install --system .[dev]

- name: Run tests
run: |
pytest --maxfail=1 --disable-warnings -q

deploy-uat:
name: Deploy UAT
runs-on: ubuntu-latest
needs: build-and-test
if: startsWith(github.ref, 'refs/tags/') && endsWith(github.ref_name, '-uat')
environment: uat

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Load UAT environment file
run: |
test -f .env.uat || (echo "Missing .env.uat" && exit 1)
cp .env.uat .env

- name: Build Docker image for UAT
run: |
docker build -t enterprise-chatbot:${{ github.ref_name }} .

- name: Sample UAT deployment
run: |
echo "Using environment file: .env.uat"
echo "Deploying to UAT with tag ${{ github.ref_name }}"
echo "Example tag format: 0.0.1-uat"

deploy-prod:
name: Deploy Production
runs-on: ubuntu-latest
needs: build-and-test
if: startsWith(github.ref, 'refs/tags/') && endsWith(github.ref_name, '-prod')
environment: production

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Load production environment file
run: |
test -f .env.production || (echo "Missing .env.production" && exit 1)
cp .env.production .env

- name: Build Docker image for Production
run: |
docker build -t enterprise-chatbot:${{ github.ref_name }} .

- name: Sample production deployment
run: |
echo "Using environment file: .env.production"
echo "Deploying to Production with tag ${{ github.ref_name }}"
echo "Example tag format: 0.0.1-prod"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ celerybeat.pid

# Environments
.env
!.env.uat
!.env.production
.envrc
.venv
env/
Expand Down
56 changes: 56 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# syntax=docker/dockerfile:1

FROM python:3.10-slim-bookworm AS builder

ENV POETRY_VIRTUALENVS_CREATE=false \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
TORCH_CUDA_ARCH_LIST="" \
CUDA_VISIBLE_DEVICES="" \
FORCE_CPU="1" \
TRANSFORMERS_CACHE=/tmp/transformers_cache \
HF_DATASETS_CACHE=/tmp/datasets_cache

WORKDIR /app

RUN pip install --upgrade pip uv

COPY pyproject.toml README.md ./
COPY utils ./utils
COPY controllers ./controllers
COPY routers ./routers
COPY main.py ./main.py
COPY tests ./tests

# Install project dependencies from default Python index
RUN pip3 install --no-cache-dir -e .

# Force CPU-only torch wheel
RUN pip3 install --no-cache-dir --upgrade --force-reinstall torch --index-url https://download.pytorch.org/whl/cpu

FROM python:3.10-slim-bookworm AS runtime

ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
TORCH_CUDA_ARCH_LIST="" \
CUDA_VISIBLE_DEVICES="" \
FORCE_CPU="1"

WORKDIR /app

RUN apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates zstd \
&& rm -rf /var/lib/apt/lists/*

RUN curl -fsSL https://ollama.com/install.sh | sh

COPY --from=builder /usr/local/lib/python3.10 /usr/local/lib/python3.10
COPY --from=builder /usr/local/bin /usr/local/bin
COPY --from=builder /app /app
COPY scripts/start-with-ollama.sh /app/scripts/start-with-ollama.sh

RUN chmod +x /app/scripts/start-with-ollama.sh

EXPOSE 8000 11434

CMD ["/app/scripts/start-with-ollama.sh"]
Loading