How xiaofangstudio/ai-xiaofang works
AI 小方 is a local Chinese AI assistant. The documented main workflow is Web or CLI input → local judgment and routing → llama.cpp expression → self-review and output; the Web also manages conversations and multimodal input. The README describes several Covi 2 subsystems whose implementation files are absent from this tree, so those nodes have null paths and documented relationships cite the README. The sampled code is mostly Covi 1 and earlier; its historical runtime and training tool are shown separately, not as the current request pipeline.
Main entry points: app.js Web interface · xiaofang_data_v04search.py Legacy knowledge data · v0.1/xiaofang.py Early runtime · v0.2/xiaofang.py Early runtime v0.2
Components 21
User interaction
- Web interface
Web界面/app.js - CLI interface
- Conversation controls
Web界面/app.js
Assistant pipeline
- Input judgment
- Intent routing
- Qwen expression
- Output review
- llama.cpp server
Assistant capabilities
- Image and video
- Web search
- Memory and learning
- Skills and skins
- Persistent settings
xiaofang_settings.py
Earlier versions
- Covi 1 runtime
xiaofang_covi1.py - Legacy knowledge data
历史版本/v0.4search/xiaofang_data_v04search.py - Early runtime
历史版本/v0.1/xiaofang.py - Early runtime v0.2
历史版本/v0.2/xiaofang.py - Flash runtime
历史版本/v1.7_flash/xiaofang_v17alpha.py - Flash knowledge data
历史版本/v1.7_flash/xiaofang_data_v17alpha.py - Novel training tool
历史版本/_训练脚本存档/学习小说.py
Other components
- User
Connections 19
- User → Web interface: sends input
- User → CLI interface: sends input
- Web interface → Input judgment: submits input
- CLI interface → Input judgment: submits input
- Input judgment → Intent routing: routes request
- Intent routing → llama.cpp server: requests generation
- llama.cpp server → Qwen expression: streams tokens
- Qwen expression → Output review: returns draft
- Output review → Web interface: delivers answer
- Web interface → Image and video: attaches media
- Intent routing → Web search: may search
- Output review → Memory and learning: trains on answer
- Web interface → Conversation controls: manages chats
Web界面/app.js - Web interface → Skills and skins: offers skills
- Web interface → Persistent settings: changes settings
- Early runtime → Legacy knowledge data: imports data
历史版本/v0.1/xiaofang.py - Early runtime v0.2 → Legacy knowledge data: imports data
历史版本/v0.2/xiaofang.py - Flash runtime → Flash knowledge data: uses knowledge
历史版本/v1.7_flash/xiaofang_v17alpha.py - Novel training tool → Covi 1 runtime: trains weights
历史版本/_训练脚本存档/学习小说.py