AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Leo's starter: chat with your PDFs, answers cite the page. Works without an AI key. FastAPI. MIT. From Replore by Cardzo.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Upload PDFs, ask questions, and get answers that cite the file and page they came from. It works with no API key at all. Add an OpenAI key, or point it at Ollama, and it writes short answers grounded only in your documents.
Leo's starters are free templates from Replore, a Cardzo product that helps you find open source GitHub repos for what you are building.
| Dark theme | Phone |
|---|---|
| Empty state | Citation preview |
|---|---|
app/bm25.py). No numpy, no embeddings, no GPU.[file p.N]. Click a citation to read the passage, with your
question's words highlighted.data/index.json that survives restarts. Files never leave your computer
unless you turn on a hosted model.You need Python 3.11 or newer.
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS or Linux
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload
Open http://127.0.0.1:8000, press Load the sample guide (or drop your own PDF), and ask "How often should I water the ZZ plant?".
To regenerate the sample PDF: python scripts/make_sample_pdf.py.
The app returns the passages that best match your question, best first, each labelled with file name and page. The top passage opens automatically. If nothing in your PDFs matches, it says "I can't find that in your PDFs."
Set environment variables before starting uvicorn. Nothing is read from files, so keys never end up in the repository.
OpenAI:
# macOS or Linux
export OPENAI_API_KEY=sk-...
export OPENAI_MODEL=gpt-4o-mini # optional, this is the default
# Windows PowerShell
$env:OPENAI_API_KEY="sk-..."
Ollama (free, runs on your machine):
ollama pull llama3.2
export OPENAI_BASE_URL=http://localhost:11434/v1
export OPENAI_API_KEY=ollama # any value, Ollama ignores it
export OPENAI_MODEL=llama3.2
The same works for LM Studio, vLLM, llama.cpp server, OpenRouter or Groq: set
OPENAI_BASE_URL to their /v1 address and use their key and model name.
The model receives only the top passages, inside a fenced block, and is told to:
[file p.N],The fence markers are stripped from PDF text first, so a document cannot close the block early and inject its own instructions. If the model call fails, you get the passages instead, with a note saying so.
| Variable | Default | What it does |
|---|---|---|
OPENAI_API_KEY | unset | Turns on answer mode. |
OPENAI_BASE_URL | https://api.openai.com/v1 | Any OpenAI compatible server. |
OPENAI_MODEL | gpt-4o-mini | Model name sent to the server. |
DATA_DIR | ./data | Where the index is stored. |
MAX_UPLOAD_MB | 25 | Largest PDF accepted. |
TOP_K | 5 | Passages retrieved per question. |
pypdf reads the text of each page (app/pdf_text.py).app/chunking.py). Chunks never cross a page, so every citation is one exact page.app/bm25.py): lowercase words, common stopwords
removed, a light stemmer so "plants" matches "plant". The file list and chunks are saved
to data/index.json. The same PDF uploaded twice is indexed once.app/answer.py).API, if you want to build your own front end (interactive docs at /api/docs):
| Method | Path | Body |
|---|---|---|
| GET | /api/status | |
| GET | /api/files | |
| POST | /api/files | multipart, field files (one or more PDFs) |
| DELETE | /api/files/{id} | |
| POST | /api/sample | indexes the bundled sample |
| POST | /api/ask | {"question": "...", "k": 5} |
pip install -r requirements-dev.txt
python -m pytest
Tests cover chunking, BM25 ranking, the full no-key path through the API (upload, ask, cited page, not found, duplicates, delete, restart), the prompt fence, and the model path with the model call mocked. No test calls a real model.
This template comes with Governor pre-installed: a safety kit for AI coding agents in Claude Code (and advisory rules for Codex).
What it does. When you open this folder in Claude Code, Governor's rules stop the agent from
reading secret files such as .env (where your OPENAI_API_KEY might live), wiping folders with
rm -rf or Remove-Item -Recurse -Force, force-pushing, piping downloaded scripts into a shell,
or switching its own safety off. It asks you before production deploys, package installs, web
fetches and commands that call paid AI services, it scans every file the agent writes for API
keys, and it will not let the agent say "done" while python -m pytest fails. This template is
set to tier 3, the strictest, because people upload PDFs that may hold personal data and you may
put it online. Every rule is listed, as enforced or advisory, in .claude/governor/COVERAGE.md.
What was added: governance.yaml (the answers and the tier), .claude/settings.json,
.claude/hooks/ (small Python scripts, standard library only), .claude/rules/governor.md and a
marked block in CLAUDE.md and AGENTS.md. The app never loads any of it. After cloning,
restart Claude Code once so the hooks load.
Refresh it when your project changes (logins, a database, a hosted model, more tests):
install the plugin with /plugin marketplace add chittychat-studio/Governance-manager and
/plugin install governor@chittychat-governor, then run /governor:init in this folder.
/governor:status shows what is blocked and what needs your OK.
Remove it: run /governor:remove. It shows what would be removed and prints a command for you
to run yourself in a terminal outside Claude Code (the agent is not allowed to remove its own
guardrails). Without the plugin, delete governance.yaml, the .claude/ folder and the
<!-- governor:start --> to <!-- governor:end --> blocks in CLAUDE.md and AGENTS.md.
ocrmypdf input.pdf output.pdf) and upload the result.MIT, Copyright (c) 2026 Cardzo. See LICENSE.
three.js (MIT) is bundled in static/vendor/three/ for the empty-state field; there is no
animation library. Fonts (Literata, Schibsted Grotesk) are under the SIL Open Font License, and
Governor (the AI coding guardrails) is MIT. See NOTICE.md. Ideas came from
bhaskatripathi/pdfGPT, Nutlope/pdftochat and datvodinh/rag-chatbot; no code was copied.