Skip to content

Commit 8ff927e

Browse files
Merge pull request #10 from DMontgomery40/cleanup
Cleanup
2 parents 222e744 + 54a9de6 commit 8ff927e

140 files changed

Lines changed: 19021 additions & 21336 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,13 @@ NEO4J_PASSWORD=password
3131
# NEO4J_HEAP_MAX=4G
3232
# NEO4J_PAGECACHE=2G
3333

34-
# ===== Embedding Configuration =====
35-
EMBEDDING_PROVIDER=openai # openai, voyage, local
36-
EMBEDDING_MODEL=text-embedding-3-small
37-
EMBEDDING_DIMENSIONS=1536
38-
39-
# ===== LLM Configuration =====
40-
LLM_PROVIDER=openai
41-
LLM_MODEL=gpt-4o-mini
42-
LLM_TEMPERATURE=0.0
34+
# ===== Model Selection (THE LAW) =====
35+
# Embedding + generation models/providers are configured via Pydantic config:
36+
# - Global template: tribrid_config.json
37+
# - Per-corpus overrides: stored in Postgres corpus_configs
38+
#
39+
# Use the UI (e.g. Retrieval → Generation Models) instead of adding model
40+
# settings here.
4341

4442
# ===== Server =====
4543
SERVER_HOST=0.0.0.0
Lines changed: 38 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,36 @@
1-
name: Documentation Automation
1+
name: Docs Autopilot (push)
22
on:
33
push:
44
branches: ["main", "develop"]
5-
pull_request:
6-
branches: ["main"]
5+
paths:
6+
- "server/**"
7+
- "web/**"
8+
- "scripts/docs_ai/**"
9+
- "data/models.json"
10+
- "data/glossary.json"
11+
- "docker-compose.yml"
12+
- "pyproject.toml"
13+
- "tribrid_config.json"
14+
- "start.sh"
715
workflow_dispatch:
816
inputs:
9-
regenerate_all:
10-
description: 'Regenerate all documentation'
17+
base_ref:
18+
description: "Base ref to diff against (default: previous push SHA)"
1119
required: false
12-
type: boolean
13-
default: false
20+
default: ""
1421

1522
permissions:
1623
contents: write
17-
pages: write
18-
id-token: write
19-
pull-requests: write
2024

2125
jobs:
22-
generate-docs:
26+
docs-autopilot:
27+
if: github.actor != 'github-actions[bot]'
2328
runs-on: ubuntu-latest
2429
steps:
2530
- uses: actions/checkout@v4
2631
with:
2732
fetch-depth: 0
33+
ref: ${{ github.ref }}
2834

2935
- name: Set up Python
3036
uses: actions/setup-python@v5
@@ -34,75 +40,36 @@ jobs:
3440
- name: Install dependencies
3541
run: |
3642
python -m pip install --upgrade pip
43+
pip install requests
3744
pip install mkdocs==1.6.1 mkdocs-material==9.7.1 pymdown-extensions==10.7.1
3845
pip install mike==2.1.0 mkdocs-git-revision-date-localized-plugin==1.2.6 mkdocs-minify-plugin==0.8.0
3946
pip install mkdocs-glightbox
40-
pip install requests pyyaml openai
4147
42-
- name: Generate documentation with AI
43-
if: ${{ github.event.inputs.regenerate_all == 'true' }}
48+
- name: Generate docs patch (apply)
4449
env:
4550
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
51+
OPENAI_MODEL: gpt-5
4652
run: |
47-
python scripts/docs_ai/docs_autopilot_enhanced.py --regenerate-all
53+
BASE="${{ github.event.inputs.base_ref }}"
54+
if [ -z "$BASE" ]; then
55+
BASE="${{ github.event.before }}"
56+
fi
57+
if [ -z "$BASE" ] || [ "$BASE" = "0000000000000000000000000000000000000000" ]; then
58+
BASE="origin/${{ github.ref_name }}"
59+
fi
60+
echo "Using base ref: $BASE"
61+
python scripts/docs_ai/generate_docs_from_diff.py --base "$BASE" --llm openai --apply
4862
4963
- name: Build documentation
5064
run: mkdocs build --strict
5165

52-
- name: Create PR with documentation updates
53-
if: github.event_name == 'workflow_dispatch' && github.event.inputs.regenerate_all == 'true'
54-
uses: peter-evans/create-pull-request@v6
55-
with:
56-
token: ${{ secrets.GITHUB_TOKEN }}
57-
title: "docs: AI-generated documentation updates"
58-
body: |
59-
This PR contains AI-generated documentation updates based on the codebase.
60-
61-
**Please review carefully before merging.**
62-
63-
- [ ] Documentation is accurate
64-
- [ ] No internal/sensitive information exposed
65-
- [ ] Material for MkDocs features utilized
66-
- [ ] Navigation structure is logical
67-
- [ ] No banned terms (Qdrant, Redis, LangChain, cards)
68-
commit-message: "docs: update documentation with AI assistance"
69-
branch: docs/ai-updates-${{ github.run_id }}
70-
base: main
71-
72-
deploy-docs:
73-
needs: generate-docs
74-
if: github.ref == 'refs/heads/main'
75-
runs-on: ubuntu-latest
76-
environment:
77-
name: github-pages
78-
url: ${{ steps.deployment.outputs.page_url }}
79-
steps:
80-
- uses: actions/checkout@v4
81-
with:
82-
fetch-depth: 0
83-
84-
- uses: actions/setup-python@v5
85-
with:
86-
python-version: '3.11'
87-
88-
- name: Install dependencies
66+
- name: Commit and push docs updates
8967
run: |
90-
python -m pip install --upgrade pip
91-
pip install mkdocs==1.6.1 mkdocs-material==9.7.1 pymdown-extensions==10.7.1
92-
pip install mike==2.1.0 mkdocs-git-revision-date-localized-plugin==1.2.6 mkdocs-minify-plugin==0.8.0
93-
pip install mkdocs-glightbox
94-
95-
- name: Build documentation
96-
run: mkdocs build --strict
97-
98-
- name: Setup Pages
99-
uses: actions/configure-pages@v4
100-
101-
- name: Upload artifact
102-
uses: actions/upload-pages-artifact@v3
103-
with:
104-
path: 'site'
105-
106-
- name: Deploy to GitHub Pages
107-
id: deployment
108-
uses: actions/deploy-pages@v4
68+
if git diff --cached --quiet; then
69+
echo "No docs changes to commit."
70+
exit 0
71+
fi
72+
git config user.name "github-actions[bot]"
73+
git config user.email "github-actions[bot]@users.noreply.github.com"
74+
git commit -m "docs(ai): autopilot update"
75+
git push origin HEAD:${{ github.ref_name }}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ models/cross-encoder-tribrid/pytorch_model.bin
9999
*.dmg
100100

101101
# ===== Data =====
102-
data/
102+
data/*
103+
!data/models.json
104+
!data/glossary.json
103105
*.db
104106
*.sqlite
105107
*.sqlite3

0 commit comments

Comments
 (0)