Survival LLM
A free AI assistant and survival library (1.5 million offline articles) that runs on your own computer, with no internet. Shows the source of every answer. Mac and Windows.
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗We don't write personas. We built the system that writes one per seller from their data, backs every choice with evidence from 9,657 real VANI calls, and rewrites it mid-call when the seller's behaviour changes.
┌──────────────── offline (batch) ────────────────┐
IndiaMART CSVs ─┤ data/warehouse.py → DuckDB warehouse │
(data/private) │ evidence/miner.py → evidence.json (140 findings)│
└──────────────────────────────────────────────────┘
│
seller glid ──> persona/generator.py ──> PersonaSpec (voice, language, tone, plan; reason + confidence per field)
│
┌────────────────────────────┴───────────────────────────┐
web runtime (our UI) Sarvam Samvaad agent (phone/web)
Saaras STT → signals → adapter → policy → LLM → Bulbul agent → tool analyze_turn → signals → adapter → policy
└──────────────── runtime/service.py (one CallService) ─┘
│
SQLite: sessions + switch log → /api/v1/switch-log
| Layer | Code | Notes |
|---|---|---|
| Domain | vani/domain/ | Typed models: SellerProfile, PersonaSpec + Decision, Signal, SwitchEvent, CallSession |
| Data | vani/data/ | Normaliser (state→language, turnover bands, disposition parsing, missing-field flags), DuckDB warehouse, repository interface |
| Evidence | vani/evidence/ | Call features from AI summaries + transcripts; outcome drivers, segment risks (Bonferroni, Wilson CI), bot-version variants; EvidenceBook query API |
| Persona | vani/persona/ | Generator (seller history > evidence > rule > default), voices, bilingual lines, LLM/agent prompt rendering, distinctness metric |
| Live | vani/live/ | LLM brain (one structured Sarvam LLM call per turn: understand + reply), rule detector calibrated on real seller turns as guardrail/fallback, adapter (latest-turn strategy, audible pace/tone targets), offline evaluation |
| Speech text | vani/speech/ | Bulbul formatter: strips markdown/notes/emoji, Indian number commas, optional Sarvam transliteration |
| Runtime | vani/runtime/ | Dialogue policy, CallService, session stores (SQLite/memory) |
| Sarvam | vani/integrations/sarvam/ | Async client (Saaras, Bulbul, sarvam-105b), agent prompt template |
| API | vani/api/ | FastAPI /api/v1/* incl. agent tools, demo-sellers, TTS |
| UI | web/ | Plain HTML/JS (no build step): Live call, Compare personas, Evidence |
Scaling: the API is stateless (state lives in the session store); repository, store and speech client sit behind interfaces, so DuckDB→Postgres, SQLite→Redis or a second STT/TTS vendor are drop-in. Evidence mining is a batch job; persona generation is pure and fast (~5k sellers/40 s including DB reads).
cd backend
pip install -r requirements.txt
cp .env.example .env # add SARVAM_API_KEY
# put the dataset CSVs in data/private/raw/gc/ (gitignored)
python -m vani.data.warehouse # CSV -> DuckDB
python -m vani.evidence.miner # -> data/private/evidence.json
python -m vani.tools.smoke # check Sarvam STT/TTS/LLM with your key
python -m uvicorn vani.api.app:app --port 8000 # UI: http://localhost:8000 API docs: /docs
Other tools:
python -m vani.live.evaluate # detector precision/recall on real transcripts
python -m vani.tools.export --sample 50 # persona specs + 3 contrasting demo sellers -> data/private/out
python -m vani.tools.voice_audition # every Bulbul voice x pace, to pick voices by ear
python -m vani.tools.tts_compare # Roman vs Devanagari vs transliterated text, to pick by ear
python -m pytest -q # 234 tests (real-data tests auto-skip without the dataset)
Sarvam agent setup: docs/SARVAM_AGENT_SETUP.md.
seller audio ─> Saaras STT (translit: Roman Hinglish)
─> rule detector (1 ms, guardrail + offline fallback)
─> LLM brain: ONE Sarvam LLM call over the WHOLE conversation, json_schema output
{intent, mood, seller_question, seller_slot, seller_cannot_days, agreed_to_meeting, agreed_slot, reply}
prompt carries: persona + global seller context (mined from 9,657 calls) + this seller's past
call summaries + call state (slots offered, days ruled out)
─> merge: LLM's contextual reading decides mood & agreement; rules keep only hard safety signals
(do-not-call, end-call, explicit slow-down/language, seller gender) and run alone if the LLM is down
─> call state: days ruled out, seller's slot (their time beats ours), agreed slot; Hinglish + Gujarati time parser
double-checks the LLM ("kal shaam paanch baje" -> tomorrow 17:00)
─> adapter: pace / expressiveness / strategy switch ─> switch log
─> policy: outcome lines (booked / goodbye) are fixed templates, never improvised
─> reply guardrails (no false 'booked', no rude fillers) ─> Bulbul formatter ─> Bulbul TTS
Every persona field carries source (seller_data / evidence / rule / default / live_signal) and confidence (strong / moderate / weak / informed_guess / default / live).
bulbul:v2 supports it; the spec carries a target that v3 ignores.Raw data, the warehouse, evidence, sessions and exports live in data/private/ (gitignored). Test fixtures use the real column headers with invented rows; test phrases are paraphrased.
With the server running: node tests_e2e/ui_scenarios.js http://127.0.0.1:8001. It plays 15 seller scenarios
through the web UI (rush, frustration, confusion, interest, English and Gujarati switches, slow down, bot question,
human request, do-not-call, end call, slot negotiation, two refusals, a multi-switch call, male voice + seller gender),
checks the switch log, persona fields, language, outcome and the human acknowledgement, and saves screenshots
to tests_e2e/out/.
A public demo runs on Vercel with fictional sellers and aggregate evidence only (no customer data):
see docs/DEPLOY_VERCEL.md for the demo glids and how it is deployed.