Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
33 changes: 24 additions & 9 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
# ─── Groq API Key (Primary — Fastest, Recommended) ───
# Get yours FREE at: https://console.groq.com/keys
# 1. Sign up at https://console.groq.com
# 2. Go to API Keys → Create API Key
# 3. Copy the key and paste below
# Internal RFP Analyst environment settings
#
# Configure one provider key for chat. Document generation, ingestion,
# health checks, and retrieval-only evaluations can run without an LLM key.

GROQ_API_KEY=your_groq_api_key_here
GROQ_API_KEY=
GOOGLE_API_KEY=

# ─── Google Gemini API Key (Fallback) ───
# Get yours at: https://aistudio.google.com/apikey
# Optional model/runtime settings
AGENT_MODE=agentic
MIN_RELEVANCE_SCORE=0.50

GOOGLE_API_KEY=your_google_api_key_here
# Prompt-budget settings
MAX_PROMPT_TOKENS=6500
RFP_ANALYSIS_MAX_OUTPUT_TOKENS=1200
MAX_CONTEXT_CHARS_PER_CHUNK=1000
MAX_HISTORY_MESSAGES=3
MAX_TARGET_CHUNKS=4
MAX_CASE_STUDIES=3
MAX_CHUNKS_PER_CASE_STUDY=2

# Upload limits
MAX_UPLOAD_SIZE_MB=25
MAX_UPLOAD_PAGE_COUNT=250

# Set to 1 only when debugging provider errors locally.
RFP_ANALYST_DEBUG=0
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on:
push:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -e ".[dev]"

- name: Compile critical entry points
run: python -m py_compile app.py agent.py rag_engine.py config.py document_generator.py

- name: Compile source tree
run: python -m compileall -f src tests evals

- name: Run pytest
run: python -m pytest -q

- name: Run offline smoke evaluation
run: python -m evals.run_evals
28 changes: 22 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
# ─── Environment ───
# Environment and secrets
.env
.streamlit/secrets.toml
.venv/
venv/
.python_packages/

# Python cache and build output
__pycache__/
*.pyc
*.egg-info/
.ruff_cache/
.pytest_cache/
.pytest_tmp/

# ─── Vector Store (regenerated on deploy) ───
vectorstore/
# Logs
*.log

# ─── Generated PDFs (regenerated on deploy) ───
# Generated runtime artifacts
vectorstore/
vectorstore_build_*/
data/documents/*.pdf
data/uploads/
evals/results.json
evals/offline_smoke_results.json
evals/kb_eval_results.json
evals/real_kb_results.json

# ─── IDE ───
# IDE
.vscode/
.idea/
*.swp

# ─── OS ───
# OS
Thumbs.db
.DS_Store
1 change: 1 addition & 0 deletions .streamlit/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ font = "sans serif"

[server]
headless = true
maxUploadSize = 25
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
PYTHON ?= python
PIP ?= $(PYTHON) -m pip

.PHONY: install test lint run generate-docs

install:
$(PIP) install -r requirements.txt
$(PIP) install pytest ruff

test:
$(PYTHON) -m pytest -q

lint:
$(PYTHON) -m ruff check .

run:
$(PYTHON) -m streamlit run app.py

generate-docs:
$(PYTHON) document_generator.py
Loading
Loading