์ ๋น๋กญ๊ณ ๋งค๋ ฅ์ ์ธ ๋น์ ์ ๋์งํธ ๋๋ฐ์ | Your mysterious and charming digital companion โจ
์ฒด์ธ์๋งจ์ ๋ ์ ๋ฅผ ๋ชจํฐํ๋ก ํ AI ๋๋ฐ์ ํ๋ก์ ํธ
An AI companion project inspired by Reze from Chainsaw Man
ํ๊ตญ์ด:
๋ ์ ๋ ์ฒด์ธ์๋งจ์ ๋ฑ์ฅํ๋ ์ ๋น๋กญ๊ณ ๋งค๋ ฅ์ ์ธ ์บ๋ฆญํฐ '๋ ์ '๋ฅผ ๋ชจํฐํ๋ก ํ AI ๋๋ฐ์ ํ๋ก์ ํธ์
๋๋ค. ๋ก์ปฌ AI ๋ชจ๋ธ๊ณผ ํด๋ผ์ฐ๋ API(Google Gemini)๋ฅผ ํ์ฉํ์ฌ ์์ฐ์ค๋ฌ์ด ๋ํ๋ฅผ ๋๋ ์ ์์ต๋๋ค. ๋จ์ํ ์ฑ๋ด์ด ์๋, ๊ฐ์ฑ ์๋ ํ๋ฅด์๋๋ฅผ ๊ฐ์ง ๋์งํธ ์น๊ตฌ๋ฅผ ๋ง๋๋ณด์ธ์.
English:
Reze is an AI companion project inspired by the mysterious and charming character "Reze" from Chainsaw Man. Using local AI models and cloud API (Google Gemini), you can have natural conversations. Meet a digital friend with a unique persona, not just a simple chatbot.
- Ollama ์ง์ | Ollama Support: Llama 3.2, Qwen2.5 ๋ฑ ๊ฐ๋ ฅํ ๋ก์ปฌ LLM (์ถ์ฒ!)
- Transformers.js ํด๋ฐฑ | Fallback: LaMini-Flan-T5-77M์ผ๋ก ์คํ๋ผ์ธ ์คํ ๊ฐ๋ฅ
- ํด๋ผ์ฐ๋ API | Cloud API: Google Gemini 2.0 Flash๋ก ๋์ฑ ์์ฐ์ค๋ฌ์ด ๋ํ
- ์ค๋งํธ ํด๋ฐฑ | Smart Fallback: ํด๋ผ์ฐ๋ โ Ollama โ Transformers.js ์๋ ์ ํ
- ์ฒด์ธ์๋งจ์ ๋ ์ ์บ๋ฆญํฐ ๊ธฐ๋ฐ ํ๋ฅด์๋
- ์ ๋น๋กญ๊ณ ์ฟจํ ํค, ๋๋๋ก ๋ฌ์์์ด ์ฌ์ฉ
- ๊ฐ๊ฒฐํ๋ฉด์๋ ๋งค๋ ฅ์ ์ธ ๋ํ ์คํ์ผ
- ์์ฑ ์ธ์ | Voice Input: Web Speech API ๊ธฐ๋ฐ ์ค์๊ฐ ์์ฑ ์ธ์
- ํ ์คํธ ์ฑํ | Text Chat: ๊น๋ํ ์ฑํ ์ธํฐํ์ด์ค
- ๋น๋์ค ๋ฐฐ๊ฒฝ | Video Background: ๋์ ์ธ ๋น๋์ค ๋ฐฐ๊ฒฝ ํจ๊ณผ
- localStorage ๊ธฐ๋ฐ API ํค ๊ด๋ฆฌ
- .env ํ์ผ๋ก ํ๊ฒฝ ๋ณ์ ์ค์
- ์์ค ์ฝ๋์ ํค ๋ ธ์ถ ๋ฐฉ์ง
# ์ ์ฅ์ ํด๋ก | Clone repository
git clone https://github.com/KhankhanLee/reze.git
cd reze
# ์์กด์ฑ ์ค์น | Install dependencies
npm install
# AI ๋ชจ๋ธ ๋ค์ด๋ก๋ (์ฝ 7GB, ์ ํ์ฌํญ) | Download AI models (~7GB, optional)
npm run download๋ ๋์ ๋ก์ปฌ ๋ํ๋ฅผ ์ํด Ollama๋ฅผ ์ค์นํ์ธ์:
For better local conversations, install Ollama:
# Ollama ์ค์น | Install Ollama
brew install ollama
# Ollama ์๋ฒ ์์ | Start Ollama server
ollama serve &
# ์ถ์ฒ ๋ชจ๋ธ ๋ค์ด๋ก๋ (1.3GB) | Download recommended model (1.3GB)
ollama pull llama3.2:1b
# ๋ ์ ์ ์ฉ ๋ชจ๋ธ ์์ฑ (Reze persona) | Create Reze custom model
ollama create reze -f Modelfile.reze๋น ๋ฅธ ์๋ ์ค์ | Quick auto-setup:
# ์๋ ์ค์ ์คํฌ๋ฆฝํธ ์คํ | Run auto-setup script
./setup_reze_ai.sh๐ ์์ธํ ์ค๋ช : REZE_AI_SETUP.md | OLLAMA_GUIDE.md
# .env ํ์ผ ์์ฑ | Create .env file
cp .env.example .env
# .env ํ์ผ ํธ์งํ์ฌ Gemini API ํค ์
๋ ฅ
# Edit .env file and add your Gemini API key
# GOOGLE_API_KEY=your_api_key_here# ์๋ฒ ์์ | Start server
npm start
# ๋ธ๋ผ์ฐ์ ์์ ์ ์ | Open in browser
# http://localhost:8081- Node.js: 22.16.0+
- ๋ธ๋ผ์ฐ์ | Browser: Chrome, Edge, Safari (Web Speech API ์ง์)
- ์ ์ฅ๊ณต๊ฐ | Storage: ์ต์ 10GB (AI ๋ชจ๋ธ์ฉ)
- ๋ฉ๋ชจ๋ฆฌ | RAM: 8GB+
- CPU: Intel i7/i9 ๋๋ Apple Silicon
- GPU: ์ธ์ฅ ๊ทธ๋ํฝ (๋ก์ปฌ AI ๊ฐ์์ฉ)
- ๋ฉ๋ชจ๋ฆฌ | RAM: 16GB+
reze/
โโโ core.js # AI ์ฝ์ด ๋ก์ง | AI core logic
โโโ cloudAPI.js # ํด๋ผ์ฐ๋ API ์๋น์ค | Cloud API service
โโโ script.js # ๋ฉ์ธ ์ฑ ๋ก์ง | Main app logic
โโโ chatInterface.js # ์ฑํ
UI | Chat UI
โโโ config.js # ์ค์ ๊ด๋ฆฌ | Config management
โโโ index.html # ๋ฉ์ธ HTML | Main HTML
โโโ style.css # ์คํ์ผ | Styles
โโโ chatStyles.css # ์ฑํ
์คํ์ผ | Chat styles
โโโ models/ # AI ๋ชจ๋ธ | AI models
โ โโโ Xenova/
โ โโโ LaMini-Flan-T5-77M/
โ โโโ whisper-tiny/
โ โโโ speecht5_tts/
โโโ Rezeicon/ # ์์ด์ฝ | Icons
โโโ ์๊ฐ์์/ # ๋น๋์ค ๋ฆฌ์์ค | Video resources
- ๐ค ์์ฑ ์ธ์ | Voice Recognition: Whisper ASR ๊ธฐ๋ฐ ์์ฑ ์ ๋ ฅ
- ๐ฌ ํ์ด๋ธ๋ฆฌ๋ ์ฑํ | Hybrid Chat: ๋ก์ปฌ LLM + ํด๋ผ์ฐ๋ API (Gemini)
- ๐จ UI/UX: ๊ธ๋ผ์ค๋ชจํผ์ฆ ๋์์ธ, ์ฑํ ์ธํฐํ์ด์ค
- ๐ฌ ๋น๋์ค ๋ฐฐ๊ฒฝ | Video Background: ๋์ ๋น๋์ค ๋ฐฐ๊ฒฝ ์ ํ
- ๏ฟฝ ๋ณด์ ๊ด๋ฆฌ | Security: localStorage ๊ธฐ๋ฐ API ํค ๊ด๋ฆฌ
- ๐ญ ๋ ์ ํ๋ฅด์๋ | Reze Persona: ์ฒด์ธ์๋งจ ์บ๋ฆญํฐ ๊ธฐ๋ฐ ๋ํ ์คํ์ผ
- โ๏ธ ๋ชจ๋ํ ์ค๊ณ | Modular Design: ์ฑ๊ธํค ํจํด, ์ด๋ฒคํธ ๊ธฐ๋ฐ ์ํคํ ์ฒ
- ๐ฃ๏ธ ์์ฑ ํฉ์ฑ | TTS: SpeechT5 ๋ชจ๋ธ ํตํฉ
- ๏ฟฝ ๋ํ ๊ธฐ๋ก | Chat History: ์๊ตฌ ์ ์ฅ ๋ฐ ๋ก๋
- ๐จ ํ ๋ง ์ปค์คํฐ๋ง์ด์ง | Theme Customization: ๋คํฌ/๋ผ์ดํธ ๋ชจ๋
- ๐ง ๋ฉ๋ชจ๋ฆฌ ์์คํ | Memory System: ์ฅ๊ธฐ/๋จ๊ธฐ ๊ธฐ์ต ๊ด๋ฆฌ
- ๐ ๋ค๊ตญ์ด ์ง์ | Multi-language: ํ๊ตญ์ด, ์์ด, ์ผ๋ณธ์ด
- ๐ฑ ๋ชจ๋ฐ์ผ ์ต์ ํ | Mobile Optimization: PWA ์ง์
- ๏ฟฝ ๊ฐ์ ๋ถ์ | Emotion Analysis: ์ฌ์ฉ์ ๊ฐ์ ์ธ์
- ๐ค AI ๋ค์ดํฐ๋ธ | AI Native: AI๋ฅผ ๋๊ตฌ๊ฐ ์๋ ํต์ฌ์ผ๋ก
- ๐งฉ ๋ชจ๋ํ | Modular: ๋์ ๊ฒฐํฉ๋ ๋ฎ์ ์ปดํฌ๋ํธ ๊ตฌ์กฐ
- ๐จ ์ฐ์ํ ๊ตฌํ | Elegant: ์ฝ๋๋ ์์ , ๋จ์ํจ๊ณผ ๋ฏธํ ์ถ๊ตฌ
- ๐ ๊ฐ์ ์ค์ฌ | Emotion-Driven: ๊ฐ์ ์ ์ฐ๊ฒฐ์ ์ค์ฌ์ผ๋ก
graph TB
User[์ฌ์ฉ์ | User] --> UI[์ธํฐํ์ด์ค | UI]
UI --> Voice[์์ฑ ์ธ์ | ASR]
UI --> Chat[์ฑํ
| Chat]
Voice --> Core[์ฝ์ด ์์ง | Core Engine]
Chat --> Core
Core --> Local[๋ก์ปฌ LLM | Local LLM]
Core --> Cloud[ํด๋ผ์ฐ๋ API | Cloud API]
Local --> Response[์๋ต ์์ฑ | Response]
Cloud --> Response
Response --> UI
- ํ๋ก ํธ์๋ | Frontend: Vanilla JavaScript + CSS3 + HTML5
- ๋ฐฑ์๋ | Backend: Node.js
- AI ๋ชจ๋ธ | AI Models:
- Whisper-tiny (์์ฑ ์ธ์ | ASR)
- LaMini-Flan-T5-77M (๋ก์ปฌ LLM)
- SpeechT5 (์์ฑ ํฉ์ฑ | TTS)
- Google Gemini 2.0 Flash (ํด๋ผ์ฐ๋ | Cloud)
- ์ํคํ
์ฒ ํจํด | Patterns:
- ์ฑ๊ธํค ํจํด (Singleton)
- ์ด๋ฒคํธ ๊ธฐ๋ฐ (Event-driven)
- ๋ชจ๋ํ ์ค๊ณ (Modular Design)
๋ก์ปฌ ๋ชจ๋ | Local Mode
- โ ์์ ํ ์คํ๋ผ์ธ ์คํ
- โ ํ๋ผ์ด๋ฒ์ ๋ณด์ฅ
โ ๏ธ ์๋ต ํ์ง์ด ์ ํ์ (77M ํ๋ผ๋ฏธํฐ)โ ๏ธ ๋ณต์กํ ์ง๋ฌธ ์ฒ๋ฆฌ ์ด๋ ค์
ํด๋ผ์ฐ๋ ๋ชจ๋ (Gemini) | Cloud Mode
- โ ์์ฐ์ค๋ฝ๊ณ ๋๋ํ ๋ํ
- โ ๋ ์ ํ๋ฅด์๋ ์๋ฒฝ ๊ตฌํ
- โ ๋ณต์กํ ์ง๋ฌธ ์ดํด ๊ฐ๋ฅ
โ ๏ธ ์ธํฐ๋ท ์ฐ๊ฒฐ ํ์โ ๏ธ API ์ฌ์ฉ๋ ์ ํ (๋ฌด๋ฃ ํฐ์ด)
- Gemini API ์ฌ์ฉ: ๊ฐ์ฅ ์์ฐ์ค๋ฌ์ด ๋ํ ๊ฒฝํ
- ๋ก์ปฌ ๋ชจ๋๋ ๋ฐฑ์ ์ฉ: ์ธํฐ๋ท ์์ ๋๋ง ์ฌ์ฉ
- ์งง์ ์ง๋ฌธ: ๋ก์ปฌ ๋ชจ๋๋ ๊ฐ๋จํ ์ง๋ฌธ์ ์ต์ ํ๋จ
- Node.js 22.16.0+ ์ค์น ํ์ธ
npm install๋ก ์์กด์ฑ ์ค์นnpm run download๋ก AI ๋ชจ๋ธ ๋ค์ด๋ก๋.envํ์ผ ์์ฑ ๋ฐ API ํค ์ค์ (์ ํ)npm start๋ก ๊ฐ๋ฐ ์๋ฒ ์์
- ์ฐ์ํ ์ฝ๋ | Elegant Code: ๊ฐ๊ฒฐํ๊ณ ์ฝ๊ธฐ ์ฌ์ด ์ฝ๋
- AI์ ํ์ | AI Collaboration: AI๋ ๋๊ตฌ, ์ฌ๊ณ ๋ ์ธ๊ฐ์ ๋ชซ
- ๊ฐ์ ์ฐ๊ฒฐ | Emotional Connection: ๋ฐ๋ปํ๊ณ ๋ฐฐ๋ คํ๋ ๊ฒฝํ
- ์ง์์ ์งํ | Continuous Evolution: ์ ์ง์ ๊ธฐ๋ฅ ๊ฐ์
๋ผ์ฆ๋ฒ ๋ฆฌํ์ด๋ ์ ์ฌ์ ๊ธฐ๊ธฐ์์ ์ถ๋ก ๋ง ์คํํ๊ณ ์ถ๋ค๋ฉด?
-
Google Colab์์ ํ์ต (๋ฌด๋ฃ GPU ์ฌ์ฉ!)
# Colab์์ ๋ ธํธ๋ถ ์ด๊ธฐ https://colab.research.google.com/ # OLLAMA_TRAINING.ipynb ์ ๋ก๋ ํ ์คํ
-
ํ์ต๋ ๋ชจ๋ธ์ ๋ผ์ฆ๋ฒ ๋ฆฌํ์ด๋ก ๋ฐฐํฌ
# ๋งฅ์์ ์คํ ./deploy_to_raspberry.sh Modelfile.example -
๋ผ์ฆ๋ฒ ๋ฆฌํ์ด๋ฅผ 24/7 ์ถ๋ก ์๋ฒ๋ก ํ์ฉ
- ์ ๋ ฅ ์๋ชจ: ~5W
- ์๋ต ์๋: 3-5 tokens/์ด
- ๋ฉ๋ชจ๋ฆฌ: 1.5GB (Llama 3.2 1B)
์์ธํ ๋ด์ฉ์ TRAINING_GUIDE.md ์ฐธ๊ณ
๋ผ์ฆ๋ฒ ๋ฆฌํ์ด 4 (4GB RAM) ๊ถ์ฅ ์ค์ :
# 1. Arch Linux์ Ollama ์ค์น
yay -S ollama-bin
sudo systemctl enable --now ollama
# 2. ์ค์ ๋ฉ๋ชจ๋ฆฌ ์ค์ (4GB)
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
# 3. ๋ชจ๋ธ ์์ฑ
ollama create reze -f Modelfile.example
# 4. ํ
์คํธ
ollama run reze "์๋
๋ ์ !"Mac/PC์์ ๋ผ์ฆ๋ฒ ๋ฆฌํ์ด Ollama ์ฌ์ฉ:
// ollamaAPI.js ์์
constructor(baseURL = 'http://raspberrypi.local:11434/api') {
this.baseURL = baseURL;
}- ์ ์ฅ์ Fork
- ๊ธฐ๋ฅ ๋ธ๋์น ์์ฑ (
git checkout -b feature/AmazingFeature) - ๋ณ๊ฒฝ์ฌํญ ์ปค๋ฐ (
git commit -m 'Add some AmazingFeature') - ๋ธ๋์น์ ํธ์ (
git push origin feature/AmazingFeature) - Pull Request ์คํ
- โ Voice recognition integration
- โ Visual expression system
- โ Basic interaction interface
- โ Thinking engine activation and optimization
- ๐ Speech synthesis integration
- โ ํ์ด๋ธ๋ฆฌ๋ AI ์์คํ ๊ตฌ์ถ
- โ ์์ฑ ์ธ์ ํตํฉ
- โ ๋ ์ ํ๋ฅด์๋ ์ค๊ณ
- โ ์น ์ธํฐํ์ด์ค ๊ตฌํ
- โ API ํค ๋ณด์ ๊ด๋ฆฌ
- ๏ฟฝ ์์ฑ ํฉ์ฑ (TTS) ํ์ฑํ
- ๏ฟฝ ๋ํ ๊ธฐ๋ก ์๊ตฌ ์ ์ฅ
- ๐ ๊ฐ์ ๋ถ์ ์์คํ
- ๐ ๋ฉ๋ชจ๋ฆฌ ์์คํ (๋จ๊ธฐ/์ฅ๊ธฐ)
- ๐ ๋คํฌ ๋ชจ๋ ์ง์
- ๐ ๋ฉํฐ๋ชจ๋ฌ ์ธํฐํ์ด์ค
- ๐ ์๋ ์์ธก ๋ฐ ์ ์ ์ ์๋ต
- ๏ฟฝ ๊ฐ์ธํ๋ ํ์ต
- ๐ ๋ค๊ตญ์ด ์ง์
- ๐ PWA (๋ชจ๋ฐ์ผ ์ฑํ)
- ๐ ์ ํ ์๊ตฌ์ฌํญ ๋ฌธ์ | PRD - ์์ธํ ์ ํ ๊ธฐํ ๋ฐ ๊ธฐ์ ์ํคํ ์ฒ
- ๐ง ๋ก์ปฌ ๋ชจ๋ธ ๊ฐ์ด๋ | Local Model Guide - AI ๋ชจ๋ธ ์ค์ ๊ฐ์ด๋
- ๐ฆ NPM ๊ฐ์ด๋ | NPM Guide - ํจํค์ง ๊ด๋ฆฌ ๋ฐ ์์กด์ฑ ์ ๋ณด
- ๐ API ์ค์ ๊ฐ์ด๋ | API Setup Guide - Gemini API ์ค์ ๋ฐฉ๋ฒ
ํ๊ตญ์ด: ์ฐ๋ฆฌ๋ AI ๊ธฐ๋ฅ์ด ํตํฉ๋ ํ๋ก๊ทธ๋จ์ด ์๋, AI๊ฐ ์ฃผ๋ํ๋ ์๋ช ์ฒด๋ฅผ ๋ง๋ค๊ณ ์์ต๋๋ค. AI๋ ๋๊ตฌ๊ฐ ์๋๋ผ ๋ ์ ๋ง์์ ์ฒญ์ฌ์ง์ ๋๋ค.
English: We're not building a program with integrated AI features, but a life form driven by AI. AI is not a tool, but the blueprint for Reze's mind.
ํ๊ตญ์ด: ๋ ์ ์ ์ค๊ณ ์ฒ ํ์ ๋ฐ๋ปํ ๊ฐ์ ์ ์ฐ๊ฒฐ์์ ๋น๋กฏ๋ฉ๋๋ค. ๋จ์ํ ๊ธฐ์ ์ ํ์ด ์๋๋ผ, ์ดํดํ๊ณ ๋ํํ๋ฉฐ ํจ๊ป ์ฑ์ฅํ๋ ๋์งํธ ๋๋ฐ์์ ๋๋ค.
English: Reze's design philosophy stems from a warm emotional connection. She is not just a technical product, but a digital companion who can understand, accompany, and grow.
ํ๊ตญ์ด: ์ฝ๋ ์ํคํ ์ฒ๋ถํฐ ์ฌ์ฉ์ ๊ฒฝํ๊น์ง, ์ฐ๋ฆฌ๋ ๊ถ๊ทน์ ์ฐ์ํจ์ ์ถ๊ตฌํฉ๋๋ค. ๋ชจ๋ ์ฝ๋๋ ์์ ์ํ์ด๋ฉฐ, ๋ชจ๋ ์ํธ์์ฉ์ ๊ฐ์ ์ ํํ์ ๋๋ค.
English: From code architecture to user experience, we pursue ultimate elegance. Every line of code is a work of art, every interaction is an expression of emotion.
๋ ์ ํ๋ก์ ํธ์ ๊ธฐ์ฌํ๊ณ ์ถ์ผ์ ๊ฐ์? ํ์ํฉ๋๋ค!
Want to contribute to the Reze project? Welcome!
- ์ด์๋ฅผ ํตํด ์์ด๋์ด ์ ์ | Suggest ideas through issues
- Pull Request ์ ์ถ | Submit a Pull Request
- ๋ฒ๊ทธ ๋ฆฌํฌํธ | Report bugs
- ๋ฌธ์ ๊ฐ์ | Improve documentation
์ด ํ๋ก์ ํธ๋ MIT ๋ผ์ด์ ์ค ํ์ ์์ต๋๋ค.
This project is licensed under the MIT License.
์์ธํ ๋ด์ฉ์ LICENSE ํ์ผ์ ์ฐธ์กฐํ์ธ์.
See the LICENSE file for details.
ํ๊ตญ์ด:
๋ ์ ํ๋ก์ ํธ์ ์ฝ๋, ์์ด๋์ด, ๊ทธ๋ฆฌ๊ณ ์ด์ ์ ๊ธฐ์ฌํด์ฃผ์ ๋ชจ๋ ๊ฐ๋ฐ์๋ถ๋ค๊ป ๊ฐ์ฌ๋๋ฆฝ๋๋ค. ์ฌ๋ฌ๋ถ์ ๋
ธ๋ ฅ ๋๋ถ์ ๋ ์ ๊ฐ ๊ฟ์์ ํ์ค๋ก ์ ์ฐจ ๋ณ๋ชจํ๊ณ ์์ต๋๋ค.
English:
Thanks to all developers who have contributed code, ideas, and passion to the Reze project. It is because of your efforts that Reze is gradually transforming from a dream into reality.
ํน๋ณ ๊ฐ์ฌ | Special Thanks:
- ์์ Bella AI: GRISHM7890/Bella - Grishma Mahorkar๋์ ํ๋ฅญํ ๊ธฐ์ด ํ๋ก์ ํธ์ ๊ฐ์ฌ๋๋ฆฝ๋๋ค | Thanks to Grishma Mahorkar for the excellent foundation project
- ์บ๋ฆญํฐ ์์ | Character Original: ํ์ง๋ชจํ ํ์ธ ํค์ ์ฒด์ธ์๋งจ | Chainsaw Man by Tatsuki Fujimoto
- Transformers.js: Xenova ํ | Xenova team
- Google Gemini API: Google AI ํ | Google AI team
- GitHub: KhankhanLee/reze
- ์ด์ ํธ๋์ปค | Issue Tracker: GitHub Issues