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.