Initial commit: CLAUDE.md and .gitignore for TrAI suite
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
23
.gitignore
vendored
Normal file
23
.gitignore
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# Sub-projects are their own git repos — ignore their contents
|
||||||
|
lami/
|
||||||
|
sami/
|
||||||
|
tami/
|
||||||
|
dami/
|
||||||
|
dtllamas/
|
||||||
|
dclaw/
|
||||||
|
traibase/
|
||||||
|
|
||||||
|
# Python
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
*.pyo
|
||||||
|
.venv/
|
||||||
|
venv/
|
||||||
|
*.egg-info/
|
||||||
|
|
||||||
|
# Node
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# OS
|
||||||
|
.DS_Store
|
||||||
|
*.swp
|
||||||
75
CLAUDE.md
Normal file
75
CLAUDE.md
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
# TrAI — Local AI Management Intelligence Suite
|
||||||
|
|
||||||
|
TrAI is a collection of AI-powered HR document chat apps and supporting services. Each sub-project is a **separate git repo** under this directory.
|
||||||
|
|
||||||
|
## Sub-Projects
|
||||||
|
|
||||||
|
### LAMI — Local AI
|
||||||
|
- **Purpose:** HR document chat using local LLM (Qwen3.5 9B Q4 via dtllamas)
|
||||||
|
- **Stack:** FastAPI, llama-cpp-python, SQLite, Jinja2
|
||||||
|
- **Port:** 8000 | **Deploy:** Podman container
|
||||||
|
- **Deps:** traibase (UI/DB/admin), dtllamas (inference on :8080), DAMI (index baked at build)
|
||||||
|
|
||||||
|
### SAMI — DashScope (Alibaba Qwen Cloud)
|
||||||
|
- **Purpose:** HR document chat using Alibaba DashScope Qwen API
|
||||||
|
- **Stack:** FastAPI, DashScope SDK, SQLite, Jinja2
|
||||||
|
- **Port:** 8000 | **Deploy:** Kubernetes (dtlonghorn PVC 2Gi)
|
||||||
|
- **Deps:** traibase, DAMI (index baked at build) | **Key:** DashScope API key
|
||||||
|
|
||||||
|
### TAMI — Gemini (Google Cloud)
|
||||||
|
- **Purpose:** HR document chat using Google Gemini 2.5 Flash Lite
|
||||||
|
- **Stack:** FastAPI, google-genai SDK, SQLite, Jinja2
|
||||||
|
- **Port:** 8000 | **Deploy:** `./deploy.sh` → SCP to clouderized.com (cldrzd@194.233.75.123:9876)
|
||||||
|
- **Deps:** traibase, DAMI (index synced via SCP) | **Key:** GEMINI_API_KEY
|
||||||
|
|
||||||
|
### DAMI — Document Processor
|
||||||
|
- **Purpose:** Upload PDFs, extract/chunk text, produce `chunks.json` index for LAMI/SAMI/TAMI
|
||||||
|
- **Stack:** FastAPI, PyMuPDF, file-based JSON index
|
||||||
|
- **Port:** 8000 | **Deploy:** Standalone container
|
||||||
|
- **Deps:** None — upstream source for all chat apps
|
||||||
|
|
||||||
|
### dtllamas — LLM Server Manager
|
||||||
|
- **Purpose:** llama.cpp wrapper with model switching UI and OpenAI-compatible API proxy
|
||||||
|
- **Stack:** FastAPI, llama.cpp (CUDA + Vulkan multi-stage build)
|
||||||
|
- **Default model:** Qwen3.5 9B Q4
|
||||||
|
- **Port:** 8080 (public) → 11434 (internal llama-server) | **Deploy:** Podman container
|
||||||
|
- **GPU:** Auto-detects CUDA (RTX A5000 16GB) or Vulkan (AMD iGPU) at runtime
|
||||||
|
- **Deps:** None — consumed by LAMI and dclaw
|
||||||
|
|
||||||
|
### dclaw — Autonomous Agent
|
||||||
|
- **Purpose:** OpenClaw multi-platform autonomous agent (web/mobile/desktop)
|
||||||
|
- **Stack:** Node.js 22, pnpm, TypeScript, OpenClaw framework
|
||||||
|
- **Port:** 9999 (browser gateway) | **Deploy:** Local daemon (`openclaw onboard --install-daemon`)
|
||||||
|
- **Deps:** dtllamas (:8080/v1 as LLM backend)
|
||||||
|
|
||||||
|
### traibase — Shared Module
|
||||||
|
- **Purpose:** Shared library providing admin panel, database ORM, PDF indexer, and UI templates
|
||||||
|
- **Stack:** Python package installed via git URL in requirements.txt
|
||||||
|
- **Deps:** Central dependency for LAMI, SAMI, TAMI, DAMI
|
||||||
|
|
||||||
|
## Dependency Graph
|
||||||
|
|
||||||
|
```
|
||||||
|
DAMI → chunks.json → LAMI, SAMI, TAMI (baked into container images)
|
||||||
|
TAMI (synced via SCP to clouderized)
|
||||||
|
|
||||||
|
traibase → imported by LAMI, SAMI, TAMI, DAMI
|
||||||
|
|
||||||
|
dtllamas (:8080) → consumed by LAMI (/v1/* proxy)
|
||||||
|
→ consumed by dclaw (/v1/* proxy)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Git & Deploy Notes
|
||||||
|
|
||||||
|
- Each sub-project pushes to `gitea.dtio.app` (davidtio user) — use `davidtio:selina3001` for push (pip token is read-only)
|
||||||
|
- **TAMI** uses `./deploy.sh` (not git push) — syncs DAMI index to clouderized volume
|
||||||
|
- **traibase** is installed as a git package: `git+https://davidtio:..<token>@gitea.dtio.app/davidtio/traibase.git@main`
|
||||||
|
- SSH to clouderized: `ssh -i ~/tslab/clouderized/ssh/id_rsa -p 9876 cldrzd@194.233.75.123`
|
||||||
|
|
||||||
|
## API Keys Required
|
||||||
|
|
||||||
|
| Project | Key |
|
||||||
|
|---------|-----|
|
||||||
|
| SAMI | DashScope API key |
|
||||||
|
| TAMI | GEMINI_API_KEY |
|
||||||
|
| LAMI, dtllamas, dclaw | None (local inference) |
|
||||||
Reference in New Issue
Block a user