### 🧠 Technical Notes
- **🗂 Memory Storage**
For persistent and emotionally coherent conversations, local memory handling is essential. Depending on the application, developers can implement memory using:
- Lightweight solutions like **JSON** or **YAML logs** (great for prototyping)
- Embedded databases like **SQLite** (low overhead, suitable for desktop apps)
- Scalable stores like **Redis** or **MongoDB** (recommended for multi-user or long-term usage)
A proper memory layer allows bots to reference prior chats, adapt to evolving relationships, and avoid “resetting” between sessions — a core feature for emotional immersion.
- **🔀 Model Flexibility**
Platforms like **CrushOn.ai** allow users to switch between models such as **GPT‑4o**, **Claude**, and **Mistral** based on tone, speed, and behavior. Developers can simulate this locally by:
- Routing prompts through APIs like **OpenRouter**, **vLLM**, or **Ollama**
- Allowing model selection per character or ses…
Simulating an AI Girlfriend with Local LLM + NSFW + Memory Support
# 🤖 Simulating an AI Girlfriend with Local LLM + NSFW + Memory Support
This repo demonstrates how to simulate a **CrushOn.ai-style companion AI** using a local large language model (LLM), with support for:
- ✅ NSFW / uncensored dialog
- 💬 Persistent memory across sessions
- 🎭 Persona conditioning (e.g. "anime girlfriend", "tsundere", etc.)
- 🔄 Multi-turn conversational context
---
## 🧪 Pseudo-Code: Local LLM Setup Example
```python
from local_llm import LLMModel
from memory_store import MemoryDB
# 1️⃣ Initialize local LLM with NSFW and persona settings
bot = LLMModel(
model_name="gpt-4o-local",
nsfw=True, # Enable unfiltered conversations
persona="anime girlfriend", # Set character archetype
)
# 2️⃣ Load persistent memory from local DB
mem_db = MemoryDB(max_tokens=16000)
history = mem_db.load(user_id="user123", persona="anime girlfriend")
bot.load_context(history)
# 3️⃣ Begin live chat loop
while True:
user_msg = input("You: ")
mem_d…