Spaces:
Running
Running
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,421 +1,431 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
- **
|
| 29 |
-
- **
|
| 30 |
-
- **
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
- **
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
- **
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
- **
|
| 60 |
-
- **
|
| 61 |
-
- **
|
| 62 |
-
- **
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
- **
|
| 70 |
-
- **
|
| 71 |
-
- **
|
| 72 |
-
- **
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
-
|
| 79 |
-
-
|
| 80 |
-
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
-
|
| 88 |
-
-
|
| 89 |
-
-
|
| 90 |
-
-
|
| 91 |
-
|
| 92 |
-
###
|
| 93 |
-
|
| 94 |
-
-
|
| 95 |
-
-
|
| 96 |
-
-
|
| 97 |
-
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
-
|
| 103 |
-
|
| 104 |
-
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
-
|
| 132 |
-
-
|
| 133 |
-
-
|
| 134 |
-
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
βββ
|
| 170 |
-
β βββ kimi-
|
| 171 |
-
β βββ kimi-
|
| 172 |
-
β βββ kimi-
|
| 173 |
-
β βββ kimi-
|
| 174 |
-
βββ
|
| 175 |
-
β
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
-
|
| 217 |
-
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
-
|
| 231 |
-
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
-
|
| 240 |
-
-
|
| 241 |
-
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
```
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
```
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
-
|
| 340 |
-
-
|
| 341 |
-
|
| 342 |
-
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
-
|
| 348 |
-
-
|
| 349 |
-
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
| 356 |
-
-
|
| 357 |
-
|
| 358 |
-
|
| 359 |
-
|
| 360 |
-
|
| 361 |
-
|
| 362 |
-
|
| 363 |
-
-
|
| 364 |
-
-
|
| 365 |
-
-
|
| 366 |
-
|
| 367 |
-
|
| 368 |
-
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
|
| 378 |
-
|
| 379 |
-
|
| 380 |
-
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
|
| 388 |
-
-
|
| 389 |
-
-
|
| 390 |
-
-
|
| 391 |
-
-
|
| 392 |
-
|
| 393 |
-
|
| 394 |
-
|
| 395 |
-
- [ ]
|
| 396 |
-
- [ ]
|
| 397 |
-
- [ ]
|
| 398 |
-
- [ ]
|
| 399 |
-
- [ ]
|
| 400 |
-
- [ ]
|
| 401 |
-
- [ ]
|
| 402 |
-
- [ ]
|
| 403 |
-
|
| 404 |
-
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
|
| 408 |
-
|
| 409 |
-
|
| 410 |
-
|
| 411 |
-
|
| 412 |
-
[
|
| 413 |
-
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
|
| 420 |
-
|
| 421 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: openrail
|
| 3 |
+
title: Virtual Kimi - AI Companion App π
|
| 4 |
+
sdk: static
|
| 5 |
+
emoji: π»
|
| 6 |
+
colorFrom: indigo
|
| 7 |
+
colorTo: purple
|
| 8 |
+
pinned: true
|
| 9 |
+
short_description: AI companion girlfriends with adaptive personalities
|
| 10 |
+
---
|
| 11 |
+
<div align="center">
|
| 12 |
+
|
| 13 |
+
<b>Virtual Kimi</b>
|
| 14 |
+
|
| 15 |
+
[](https://github.com/virtualkimi)
|
| 16 |
+
[](#license)
|
| 17 |
+
|
| 18 |
+
</div>
|
| 19 |
+
|
| 20 |
+
# Virtual Kimi - AI Companion Application π
|
| 21 |
+
|
| 22 |
+
Web-based AI companion girlfriends featuring adaptive personalities, intelligent memory systems, and immersive conversational experiences.
|
| 23 |
+
|
| 24 |
+
## Overview
|
| 25 |
+
|
| 26 |
+
Virtual Kimi is an advanced virtual companion application that combines modern web technologies with state-of-the-art AI models to create meaningful, evolving relationships between users and AI girlfriend personalities.
|
| 27 |
+
|
| 28 |
+
- **Lightweight:** ~600 KB of pure JavaScript, HTML, and CSS (no frameworks)
|
| 29 |
+
- **Local-first:** All data is stored in your browser's IndexedDB (managed by Dexie.js)
|
| 30 |
+
- **No tracking:** The only external calls are to FontAwesome (for icons) and the OpenRouter API (for AI)
|
| 31 |
+
|
| 32 |
+
Built with vanilla JavaScript and modern web APIs, it offers a rich, responsive experience across devices.
|
| 33 |
+
|
| 34 |
+
---
|
| 35 |
+
|
| 36 |
+
## π Support & Links
|
| 37 |
+
|
| 38 |
+
- **Website**: [virtualkimi.com](https://virtualkimi.com)
|
| 39 |
+
- **Email**: [[email protected]]([email protected])
|
| 40 |
+
- **X (Twitter)**: [x.com/virtualkimi](https://x.com/virtualkimi)
|
| 41 |
+
- **GitHub**: [github.com/virtualkimi](https://github.com/virtualkimi)
|
| 42 |
+
- **HuggingFace**: [huggingface.co/VirtualKimi](https://huggingface.co/VirtualKimi)
|
| 43 |
+
- **YouTube**: [YouTube Channel](https://www.youtube.com/@VirtualKimi)
|
| 44 |
+
|
| 45 |
+
- **Support the project**: [ko-fi.com/virtualkimi](https://ko-fi.com/virtualkimi)
|
| 46 |
+
_If you like this project or want to help me (I'm currently without a permanent job), you can buy me a coffee or make a donation. Every bit helps keep Virtual Kimi alive and evolving!_
|
| 47 |
+
|
| 48 |
+
- **ETH Wallet**: 0x836C9D2e605f98Bc7144C62Bef837627b1a9C30c
|
| 49 |
+
|
| 50 |
+
---
|
| 51 |
+
|
| 52 |
+
## Key Features
|
| 53 |
+
|
| 54 |
+
### π€ **Advanced AI Integration**
|
| 55 |
+
|
| 56 |
+
**Available recommended models and pricing for Openrouter (per 1M tokens):**
|
| 57 |
+
|
| 58 |
+
- **Mistral-small-3.2**: 0.05$ input, 0.1$ output (128k context)
|
| 59 |
+
- **Nous Hermes Llama 3.1 70B**: 0.1$ input, 0.28$ output (131k context)
|
| 60 |
+
- **Cohere Command-R-08-2024**: 0.15$ input, 0.6$ output (131k context)
|
| 61 |
+
- **Qwen3-235b-a22b-think**: 0.13$ input, 0.6$ output (262k context)
|
| 62 |
+
- **Grok 3 mini**: 0.3$ input, 0.5$ output (131k context)
|
| 63 |
+
- **Nous Hermes Llama 3.1 405B**: 0.7$ input, 0.8$ output (131k context)
|
| 64 |
+
- **Anthropic Claude 3 Haiku**: 0.25$ input, 1.25$ output (131k context)
|
| 65 |
+
- **Local Model (Ollama)**: 0$ input, 0$ output (4k context, runs offline β _experimental, not fully functional yet_)
|
| 66 |
+
|
| 67 |
+
### π₯ **Multiple AI Personalities**
|
| 68 |
+
|
| 69 |
+
- **Kimi**: Cosmic dreamer and astrophysicist with ethereal sensibilities
|
| 70 |
+
- **Bella**: Nurturing botanist who sees people as plants needing care
|
| 71 |
+
- **Rosa**: Chaotic prankster thriving on controlled chaos
|
| 72 |
+
- **Stella**: Digital artist transforming reality through pixelated vision
|
| 73 |
+
|
| 74 |
+
### Personality Trait Ranges
|
| 75 |
+
|
| 76 |
+
All personality traits operate on a 0-100 scale:
|
| 77 |
+
|
| 78 |
+
- **Affection**: Emotional warmth and attachment
|
| 79 |
+
- **Playfulness**: Fun-loving and spontaneous behavior
|
| 80 |
+
- **Intelligence**: Analytical and thoughtful responses
|
| 81 |
+
- **Empathy**: Understanding and emotional support
|
| 82 |
+
- **Humor**: Wit and lighthearted interactions
|
| 83 |
+
- **Romance**: Romantic and intimate expressions
|
| 84 |
+
|
| 85 |
+
### π§ **Intelligent Memory System**
|
| 86 |
+
|
| 87 |
+
- Automatic extraction and categorization of conversation memories
|
| 88 |
+
- Seven memory categories: Personal, Preferences, Relationships, Activities, Goals, Experiences, Events
|
| 89 |
+
- Persistent memory across sessions with search and management capabilities
|
| 90 |
+
- Character-specific memory isolation
|
| 91 |
+
|
| 92 |
+
### π« **Dynamic Personality Evolution**
|
| 93 |
+
|
| 94 |
+
- Six personality traits that evolve based on interactions:
|
| 95 |
+
- Affection, Playfulness, Intelligence, Empathy, Humor, Romance
|
| 96 |
+
- Real-time trait adjustments based on conversation tone and content
|
| 97 |
+
- Visual personality indicators and progression tracking
|
| 98 |
+
- Intelligent model selection and switching
|
| 99 |
+
- Real-time emotion detection and analysis
|
| 100 |
+
- Contextually-aware responses
|
| 101 |
+
|
| 102 |
+
### π¬ **Emotion-Driven Visual Experience**
|
| 103 |
+
|
| 104 |
+
- Real-time video responses matching detected emotions
|
| 105 |
+
- Smooth transitions between emotional states
|
| 106 |
+
- Character-specific visual libraries with 50+ video clips
|
| 107 |
+
- Context-aware video selection system
|
| 108 |
+
|
| 109 |
+
### π¨ **Customizable Interface**
|
| 110 |
+
|
| 111 |
+
- Five professionally designed themes
|
| 112 |
+
- Adjustable interface transparency
|
| 113 |
+
- Responsive design optimized for desktop, tablet, and mobile
|
| 114 |
+
- Accessibility features and keyboard navigation
|
| 115 |
+
|
| 116 |
+
### π **Multilingual Support**
|
| 117 |
+
|
| 118 |
+
- Full localization in 7 languages: English, French, Spanish, German, Italian, Japanese, Chinese
|
| 119 |
+
- Automatic language detection from user input
|
| 120 |
+
- Culturally-aware responses and emotion keywords
|
| 121 |
+
|
| 122 |
+
### π **Extensible Plugin System**
|
| 123 |
+
|
| 124 |
+
- Theme plugins for visual customization (currently, only the color theme plugin is functional)
|
| 125 |
+
- Voice plugins for speech synthesis options (planned)
|
| 126 |
+
- Behavior plugins for personality modifications (planned)
|
| 127 |
+
- Secure plugin loading with validation
|
| 128 |
+
|
| 129 |
+
### π‘οΈ **Security & Privacy**
|
| 130 |
+
|
| 131 |
+
- Input validation and sanitization
|
| 132 |
+
- Secure API key handling
|
| 133 |
+
- Local data storage with IndexedDB
|
| 134 |
+
- No server dependencies for core functionality
|
| 135 |
+
|
| 136 |
+
## ποΈ Technical Architecture
|
| 137 |
+
|
| 138 |
+
### π§© Core Technologies
|
| 139 |
+
|
| 140 |
+
- **Frontend**: Vanilla JavaScript (ES6+), HTML5, CSS3
|
| 141 |
+
- **Database**: IndexedDB with Dexie.js
|
| 142 |
+
- **AI Integration**: OpenRouter API
|
| 143 |
+
- **Speech**: Web Speech API
|
| 144 |
+
- **Audio**: Web Audio API
|
| 145 |
+
|
| 146 |
+
---
|
| 147 |
+
|
| 148 |
+
## β¨ Inspiration & Assets
|
| 149 |
+
|
| 150 |
+
This project was originally inspired by the [JackyWine GitHub repository](https://github.com/Jackywine).
|
| 151 |
+
@Jackywine on X (Twitter)
|
| 152 |
+
|
| 153 |
+
The four main characters are visually based on images from four creators on X (Twitter):
|
| 154 |
+
|
| 155 |
+
- @JulyFox33 (Kimi)
|
| 156 |
+
- @BelisariaNew (Bella)
|
| 157 |
+
- @JuliAIkiko (Rosa and Stella)
|
| 158 |
+
|
| 159 |
+
All character videos were generated using the image-to-video AI from Kling.ai, specifically with the Kling v2.1 model.
|
| 160 |
+
|
| 161 |
+
Get 50% bonus Credits in your first month with this code referral 7BR9GT2WQ6JF - link: [https://klingai.com](https://klingai.com/h5-app/invitation?code=7BR9GT2WQ6JF)
|
| 162 |
+
|
| 163 |
+
---
|
| 164 |
+
|
| 165 |
+
### ποΈ Module Structure
|
| 166 |
+
|
| 167 |
+
```
|
| 168 |
+
|
| 169 |
+
βββ Core System
|
| 170 |
+
β βββ kimi-script.js # Main initialization
|
| 171 |
+
β βββ kimi-database.js # Data persistence layer
|
| 172 |
+
β βββ kimi-config.js # Configuration management
|
| 173 |
+
β βββ kimi-security.js # Security utilities
|
| 174 |
+
βββ AI & Memory
|
| 175 |
+
β βββ kimi-llm-manager.js # LLM integration
|
| 176 |
+
β βββ kimi-emotion-system.js # Emotion analysis
|
| 177 |
+
β βββ kimi-memory-system.js # Intelligent memory
|
| 178 |
+
β βββ kimi-memory-ui.js # Memory interface
|
| 179 |
+
βββ Interface & Media
|
| 180 |
+
β βββ kimi-appearance.js # Theme management
|
| 181 |
+
β βββ kimi-voices.js # Speech synthesis
|
| 182 |
+
β βββ kimi-utils.js # Utility classes
|
| 183 |
+
β βββ kimi-module.js # Core functions
|
| 184 |
+
βββ Localization
|
| 185 |
+
β βββ kimi-locale/ # Translation files
|
| 186 |
+
βββ Extensions
|
| 187 |
+
βββ kimi-plugins/ # Plugin system
|
| 188 |
+
|
| 189 |
+
```
|
| 190 |
+
|
| 191 |
+
### Data Flow
|
| 192 |
+
|
| 193 |
+
1. **Input Processing**: User input β Security validation β Language detection
|
| 194 |
+
2. **AI Analysis**: Emotion detection β Memory extraction β LLM processing
|
| 195 |
+
3. **Response Generation**: Personality-aware response β Emotion mapping β Visual selection
|
| 196 |
+
4. **Memory Update**: Trait evolution β Memory storage β UI synchronization
|
| 197 |
+
|
| 198 |
+
## Installation & Setup
|
| 199 |
+
|
| 200 |
+
### Prerequisites
|
| 201 |
+
|
| 202 |
+
- Modern web browser (Chrome, Edge, Firefox recommended)
|
| 203 |
+
- OpenRouter API key (optional but recommended for full functionality)
|
| 204 |
+
|
| 205 |
+
### Quick Start
|
| 206 |
+
|
| 207 |
+
1. **Clone the repository**
|
| 208 |
+
|
| 209 |
+
```bash
|
| 210 |
+
git clone https://github.com/virtualkimi/virtual-kimi.git
|
| 211 |
+
cd virtual-kimi
|
| 212 |
+
```
|
| 213 |
+
|
| 214 |
+
2. **Open the application**
|
| 215 |
+
|
| 216 |
+
- Open `index.html` in your web browser
|
| 217 |
+
- Or serve via local web server for optimal performance:
|
| 218 |
+
```bash
|
| 219 |
+
python -m http.server 8000
|
| 220 |
+
# Navigate to http://localhost:8000
|
| 221 |
+
```
|
| 222 |
+
|
| 223 |
+
3. **Configure API access**
|
| 224 |
+
|
| 225 |
+
- Open Settings β AI & Models
|
| 226 |
+
- Add your OpenRouter API key
|
| 227 |
+
- Select preferred AI model
|
| 228 |
+
|
| 229 |
+
4. **Customize your experience**
|
| 230 |
+
- Choose a character in Personality tab
|
| 231 |
+
- Enable memory system in Data tab
|
| 232 |
+
- Adjust themes in Appearance tab
|
| 233 |
+
|
| 234 |
+
### Production Deployment
|
| 235 |
+
|
| 236 |
+
For production deployment, ensure:
|
| 237 |
+
|
| 238 |
+
- HTTPS is enabled (required for microphone access)
|
| 239 |
+
- Gzip compression for assets
|
| 240 |
+
- Proper cache headers
|
| 241 |
+
- CSP headers for enhanced security
|
| 242 |
+
|
| 243 |
+
## βοΈ Configuration
|
| 244 |
+
|
| 245 |
+
### API Integration
|
| 246 |
+
|
| 247 |
+
The application supports multiple AI providers through OpenRouter:
|
| 248 |
+
|
| 249 |
+
- Mistral models
|
| 250 |
+
- Nous Hermes models
|
| 251 |
+
- Qwen3 models
|
| 252 |
+
- Open-source alternatives
|
| 253 |
+
|
| 254 |
+
### Memory System Configuration
|
| 255 |
+
|
| 256 |
+
```javascript
|
| 257 |
+
// Memory categories can be customized
|
| 258 |
+
const memoryCategories = [
|
| 259 |
+
"personal", // Personal information
|
| 260 |
+
"preferences", // Likes and dislikes
|
| 261 |
+
"relationships", // People and connections
|
| 262 |
+
"activities", // Hobbies and activities
|
| 263 |
+
"goals", // Aspirations and plans
|
| 264 |
+
"experiences", // Past events
|
| 265 |
+
"important" // Significant moments
|
| 266 |
+
];
|
| 267 |
+
```
|
| 268 |
+
|
| 269 |
+
## π οΈ Development
|
| 270 |
+
|
| 271 |
+
### Project Structure
|
| 272 |
+
|
| 273 |
+
```
|
| 274 |
+
virtual-kimi/
|
| 275 |
+
βββ index.html # Main application
|
| 276 |
+
βββ virtualkimi.html # Landing page
|
| 277 |
+
βββ kimi-*.js # Core modules
|
| 278 |
+
βββ kimi-locale/ # Localization
|
| 279 |
+
βββ kimi-plugins/ # Plugin examples
|
| 280 |
+
βββ kimi-videos/ # Character videos
|
| 281 |
+
βββ kimi-icons/ # Character assets
|
| 282 |
+
βββ docs/ # Documentation
|
| 283 |
+
```
|
| 284 |
+
|
| 285 |
+
### Adding New Features
|
| 286 |
+
|
| 287 |
+
#### Creating a New Plugin
|
| 288 |
+
|
| 289 |
+
```javascript
|
| 290 |
+
// manifest.json
|
| 291 |
+
{
|
| 292 |
+
"name": "Custom Theme",
|
| 293 |
+
"version": "1.0.0",
|
| 294 |
+
"type": "theme",
|
| 295 |
+
"style": "theme.css",
|
| 296 |
+
"main": "theme.js",
|
| 297 |
+
"enabled": true
|
| 298 |
+
}
|
| 299 |
+
```
|
| 300 |
+
|
| 301 |
+
> **Note:** As of version 1.0, only the color theme plugin is fully functional. Voice and behavior plugins are planned for future releases. See `kimi-plugins/sample-theme/` for a working example.
|
| 302 |
+
|
| 303 |
+
#### Extending Memory Categories
|
| 304 |
+
|
| 305 |
+
```javascript
|
| 306 |
+
// Add to kimi-memory-system.js
|
| 307 |
+
const customCategory = {
|
| 308 |
+
name: "custom",
|
| 309 |
+
icon: "fas fa-star",
|
| 310 |
+
keywords: ["keyword1", "keyword2"],
|
| 311 |
+
confidence: 0.7
|
| 312 |
+
};
|
| 313 |
+
```
|
| 314 |
+
|
| 315 |
+
### Health Check System
|
| 316 |
+
|
| 317 |
+
The application includes a comprehensive health check system:
|
| 318 |
+
|
| 319 |
+
```javascript
|
| 320 |
+
// Run health check
|
| 321 |
+
const healthCheck = new KimiHealthCheck();
|
| 322 |
+
const report = await healthCheck.runAllChecks();
|
| 323 |
+
console.log(report.status); // 'HEALTHY' or 'NEEDS_ATTENTION'
|
| 324 |
+
```
|
| 325 |
+
|
| 326 |
+
## Browser Compatibility
|
| 327 |
+
|
| 328 |
+
| Browser | Voice Recognition | Full Features | Notes |
|
| 329 |
+
| ----------- | ----------------- | ------------- | ------------------------- |
|
| 330 |
+
| Chrome 90+ | β
| β
| Recommended |
|
| 331 |
+
| Edge 90+ | β
| β
| Optimal voice performance |
|
| 332 |
+
| Firefox 88+ | β οΈ | β
| Limited voice support |
|
| 333 |
+
| Safari 14+ | β οΈ | β
| iOS limitations |
|
| 334 |
+
|
| 335 |
+
## Performance
|
| 336 |
+
|
| 337 |
+
### Optimization Features
|
| 338 |
+
|
| 339 |
+
- Lazy loading of non-critical modules
|
| 340 |
+
- Efficient batch database operations
|
| 341 |
+
- Debounced UI interactions
|
| 342 |
+
- Memory management with cleanup
|
| 343 |
+
- Optimized video preloading
|
| 344 |
+
|
| 345 |
+
### Resource Usage
|
| 346 |
+
|
| 347 |
+
- Memory footprint: ~15-30MB active usage
|
| 348 |
+
- Storage: Scales with conversation history
|
| 349 |
+
- Network: API calls only, no tracking
|
| 350 |
+
- CPU: Minimal background processing
|
| 351 |
+
|
| 352 |
+
## Privacy & Security
|
| 353 |
+
|
| 354 |
+
### Data Handling
|
| 355 |
+
|
| 356 |
+
- All data stored locally in browser
|
| 357 |
+
- No telemetry or analytics
|
| 358 |
+
- API keys encrypted in local storage
|
| 359 |
+
- User content never sent to external servers (except chosen AI provider)
|
| 360 |
+
|
| 361 |
+
### Security Measures
|
| 362 |
+
|
| 363 |
+
- Input validation and sanitization
|
| 364 |
+
- XSS protection
|
| 365 |
+
- Safe plugin loading
|
| 366 |
+
- Secure API communication
|
| 367 |
+
|
| 368 |
+
## Troubleshooting
|
| 369 |
+
|
| 370 |
+
### Common Issues
|
| 371 |
+
|
| 372 |
+
- **Microphone not working**: Ensure HTTPS and browser permissions
|
| 373 |
+
- **API errors**: Verify OpenRouter key and model availability
|
| 374 |
+
- **Performance issues**: Clear browser cache, check available memory
|
| 375 |
+
- **Memory system not learning**: Ensure system is enabled in Data tab
|
| 376 |
+
|
| 377 |
+
## Contributing
|
| 378 |
+
|
| 379 |
+
We welcome contributions! Please see our contributing guidelines:
|
| 380 |
+
|
| 381 |
+
1. Fork the repository
|
| 382 |
+
2. Create a feature branch
|
| 383 |
+
3. Make your changes with appropriate tests
|
| 384 |
+
4. Submit a pull request with detailed description
|
| 385 |
+
|
| 386 |
+
### Development Guidelines
|
| 387 |
+
|
| 388 |
+
- Follow existing code style and patterns
|
| 389 |
+
- Add comments for complex functionality
|
| 390 |
+
- Test across multiple browsers
|
| 391 |
+
- Update documentation for new features
|
| 392 |
+
|
| 393 |
+
## π TODO / Roadmap
|
| 394 |
+
|
| 395 |
+
- [ ] Full support for local models (Ollama integration, offline mode)
|
| 396 |
+
- [ ] Voice plugin system (custom voices, TTS engines)
|
| 397 |
+
- [ ] Behavior plugin system (custom AI behaviors)
|
| 398 |
+
- [ ] Better advanced memory management UI
|
| 399 |
+
- [ ] More character personalities and backgrounds
|
| 400 |
+
- [ ] In-app onboarding and help system
|
| 401 |
+
- [ ] Enhanced mobile experience (UI/UX)
|
| 402 |
+
- [ ] More granular privacy controls
|
| 403 |
+
- [ ] User profile and persistent settings sync (optional)
|
| 404 |
+
- [ ] Community plugin/theme sharing platform
|
| 405 |
+
- [ ] Improved error reporting and diagnostics
|
| 406 |
+
- [ ] Accessibility improvements (screen reader, contrast, etc.)
|
| 407 |
+
- [ ] Automated testing and CI/CD pipeline
|
| 408 |
+
- [ ] Documentation in multiple languages
|
| 409 |
+
- [ ] Performance profiling and optimization for large histories
|
| 410 |
+
- [ ] Create new character videos better matching specific contexts
|
| 411 |
+
- [ ] Improve emotion and context logic
|
| 412 |
+
- [ ] Enhance memory management and logic
|
| 413 |
+
|
| 414 |
+
---
|
| 415 |
+
|
| 416 |
+
## π License
|
| 417 |
+
|
| 418 |
+
This project is distributed under a custom license. **Any commercial use, resale, or monetization of this application or its derivatives is strictly prohibited without the explicit written consent of the author.**
|
| 419 |
+
|
| 420 |
+
See the [LICENSE](LICENSE) file for details.
|
| 421 |
+
|
| 422 |
+
[](https://github.com/virtualkimi)
|
| 423 |
+
[](#license)
|
| 424 |
+
|
| 425 |
+
---
|
| 426 |
+
|
| 427 |
+
**Virtual Kimi** - Creating meaningful connections between humans and AI, one conversation at a time.
|
| 428 |
+
|
| 429 |
+
> _"Love is the most powerful code"_ π
|
| 430 |
+
>
|
| 431 |
+
> β 2025 Virtual Kimi - Created with π by Jean & Kimi
|