How yakami129/virtualwife works
VirtualWife is a virtual-persona chatbot with a Django backend and a VRM-based web client. Its main user journey is configuring a character and model, chatting, and receiving streamed responses that can drive speech and avatar expression; README capabilities also include memory, custom roles, and Bilibili live interaction. The sampled evidence confirms several backend dependencies and ASGI channel wiring, but not the frontend-to-backend request path or all subsystem internals, so those relationships are left unconnected or marked unverified.
Main entry points: chat_service.py Chat service · bili_live_client.py Bilibili live client · memory_storage.py Memory driver · index.tsx Web interface
Components 25
Web experience
- Web interface
domain-chatvrm/src/pages/index.tsx - Character settings
domain-chatvrm/src/components/settings.tsx - Chat API
domain-chatvrm/src/pages/api/chat.ts
Conversation runtime
- Chat service
domain-chatbot/apps/chatbot/chat/chat_service.py - Chat history
domain-chatbot/apps/chatbot/chat/chat_history_queue.py - LLM selection
domain-chatbot/apps/chatbot/llms/llm_model_strategy.py - LLM providers
domain-chatbot/apps/chatbot/llms
Persona and insight
- System configuration
domain-chatbot/apps/chatbot/config/sys_config.py - Character generation
domain-chatbot/apps/chatbot/character/character_generation.py - Custom roles
domain-chatbot/apps/chatbot/character/role_package_manage.py - Reflection
domain-chatbot/apps/chatbot/reflection/reflection.py - Bilibili live client
domain-chatbot/apps/chatbot/insight/bilibili/bili_live_client.py - Live protocol SDK
domain-chatbot/apps/chatbot/insight/bilibili/sdk/client.py - Live message handlers
domain-chatbot/apps/chatbot/insight/bilibili/sdk/handlers.py - Insight queue
domain-chatbot/apps/chatbot/insight/insight_message_queue.py
Memory
- Memory driver
domain-chatbot/apps/chatbot/memory/memory_storage.py - Local memory
domain-chatbot/apps/chatbot/memory/local/local_storage_impl.py - Milvus memory
domain-chatbot/apps/chatbot/memory/milvus/milvus_storage_impl.py - Zep memory
domain-chatbot/apps/chatbot/memory/zep/zep_memory.py
Speech and avatar
- Realtime output queue
domain-chatbot/apps/chatbot/output/realtime_message_queue.py - WebSocket output
domain-chatbot/apps/chatbot/output/consumers.py - Speech synthesis
domain-chatbot/apps/speech/tts/tts_driver.py - VRM avatar viewer
domain-chatvrm/src/features/vrmViewer/viewer.ts - Expression control
domain-chatvrm/src/features/emoteController/expressionController.ts
Other components
- User
Connections 26
- User → Web interface: uses
README.md - Web interface → Character settings: configures
README.md - Web interface → Chat API: requests chat
- Chat API → Chat service: submits chat
- Chat service → Character generation: loads character
domain-chatbot/apps/chatbot/chat/chat_service.py - Chat service → System configuration: reads config
domain-chatbot/apps/chatbot/chat/chat_service.py - Chat service → LLM selection: generates reply
- LLM selection → LLM providers: selects provider
domain-chatbot/apps/chatbot/llms/llm_model_strategy.py - LLM selection → Zep memory: uses memory types
domain-chatbot/apps/chatbot/llms/llm_model_strategy.py - Chat history → Zep memory: uses
domain-chatbot/apps/chatbot/chat/chat_history_queue.py - Memory driver → Local memory: delegates storage
domain-chatbot/apps/chatbot/memory/memory_storage.py - Memory driver → Milvus memory: delegates storage
domain-chatbot/apps/chatbot/memory/memory_storage.py - System configuration → Memory driver: configures
domain-chatbot/apps/chatbot/config/sys_config.py - System configuration → Reflection: configures
domain-chatbot/apps/chatbot/config/sys_config.py - Bilibili live client → Live protocol SDK: uses client
domain-chatbot/apps/chatbot/insight/bilibili/bili_live_client.py - Bilibili live client → Live message handlers: registers handlers
domain-chatbot/apps/chatbot/insight/bilibili/bili_live_client.py - Bilibili live client → Insight queue: queues insight
domain-chatbot/apps/chatbot/insight/bilibili/bili_live_client.py - Insight queue → Realtime output queue: forwards messages
domain-chatbot/apps/chatbot/insight/insight_message_queue.py - Realtime output queue → WebSocket output: routes output
- WebSocket output → VRM avatar viewer: streams updates
- Speech synthesis → VRM avatar viewer: provides speech
- VRM avatar viewer → Expression control: controls expressions
- User → Bilibili live client: interacts live
README.md - User → Speech synthesis: speaks Chinese
README.md - User → Memory driver: uses long-term memory
README.md - User → Custom roles: customizes role
README.md