Spaces:
Running
Running
File size: 5,637 Bytes
d47f63f 82221a0 d47f63f d51c8e9 6718fc8 d51c8e9 d47f63f | 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 171 172 173 174 175 | ---
title: Maple Npc Generator
emoji: ๐
colorFrom: gray
colorTo: blue
sdk: static
pinned: false
---
# ๐ ๋ฉ์ดํ์คํ ๋ฆฌ NPC ์ฑ๊ฒฉ ๋ํ ์์ฑ๊ธฐ
### MapleStory NPC Personality Dialogue Generator
> **Big Five ์ฑ๊ฒฉ ๋ชจ๋ธ ๊ธฐ๋ฐ LLM NPC ๋ํ ์์ฑ ์์คํ
**
> A real-time NPC dialogue generation system powered by Gemini AI and the Big Five personality model.
[](https://maple-npc-generator.vercel.app/)
[](https://vercel.com)
[](https://ai.google.dev)
---
## ๐ฎ ํ๋ก์ ํธ ์๊ฐ
20๋
๊ฐ ๊ฒ์์ฝํ
์ธ , ๋ ๋ฒจ๋์์ธ์ ๋ด๋นํ๋ฉฐ ์ฒด๊ฐํ ๋ฌธ์ ๊ฐ ์์ต๋๋ค.
**"์๊ฐ์ ๊ณต๋ค์ฌ ๋ง๋ ์ฝํ
์ธ ๊ฐ ๋จ ๋ฉฐ์น ๋ง์ ๊ณ ๊ฐ๋๋ค."**
NPC ๋ํ๋ ๊ฒ์ ๋ชฐ์
๊ฐ์ ํต์ฌ์ด์ง๋ง, ์๋ฐฑ ๋ช
์ NPC์๊ฒ ์ผ์ผ์ด ๊ฐ์ฑ ์๋ ๋์ฌ๋ฅผ ์์ฑํ๋ ๊ฒ์ ๋ง๋ํ ๋ฆฌ์์ค๊ฐ ํ์ํฉ๋๋ค. ์ด ํ๋ก์ ํธ๋ ์ฌ๋ฆฌํ์ **Big Five ์ฑ๊ฒฉ ๋ชจ๋ธ**์ ๊ฒ์ NPC์ ์ ์ฉํ์ฌ, AI๊ฐ NPC์ ์ฑ๊ฒฉ์ ๋ง๋ ์์ฐ์ค๋ฌ์ด ๋ํ๋ฅผ ์ค์๊ฐ์ผ๋ก ์์ฑํ๋ ์์คํ
์
๋๋ค.
> *"์ด๋ก ์ ๋์ด์ ์ค์ฒด โ ๊ฒ์ ๊ฐ๋ฐ ํ์ฅ์ ๋ฌธ์ ๋ฅผ AI๋ก ์ง์ ํด๊ฒฐํฉ๋๋ค."*
---
## ๐ Live Demo
**๐ [https://maple-npc-generator.vercel.app/](https://maple-npc-generator.vercel.app/)**
์ฌ๋ผ์ด๋๋ก NPC์ Big Five ์ฑ๊ฒฉ ์์น๋ฅผ ์กฐ์ ํ๊ณ ,
์ค์๊ฐ์ผ๋ก ๋ฌ๋ผ์ง๋ ๋ํ ์คํ์ผ์ ์ง์ ์ฒดํํด๋ณด์ธ์.
---
## ๐ง Big Five ์ฑ๊ฒฉ ๋ชจ๋ธ (OCEAN)
์ฌ๋ฆฌํ์ ํ์ค ์ฑ๊ฒฉ ๋ชจ๋ธ์ NPC ๋ํ ์์ฑ์ ์ ์ฉํ์ต๋๋ค.
| ํน์ฑ | ์๋ฌธ | ๋ฎ์ ๋ | ๋์ ๋ |
|------|------|---------|---------|
| **๊ฐ๋ฐฉ์ฑ** | Openness | ์ ํต์ , ํ์ค์ | ์ฐฝ์์ , ํธ๊ธฐ์ฌ ๋ง์ |
| **์ฑ์ค์ฑ** | Conscientiousness | ์ฆํฅ์ , ์ ์ฐํจ | ์ฒด๊ณ์ , ์ฑ
์๊ฐ ๊ฐํจ |
| **์ธํฅ์ฑ** | Extraversion | ์กฐ์ฉํจ, ๋ด์ฑ์ | ํ๋ฐํจ, ์ฌ๊ต์ |
| **์นํ์ฑ** | Agreeableness | ์ง์ค์ , ๊ฒฝ์์ | ๊ณต๊ฐ์ , ํ๋ ฅ์ |
| **์ ๊ฒฝ์ฑ** | Neuroticism | ์์ ์ , ์นจ์ฐฉํจ | ๊ฐ์ ์ , ์๋ฏผํจ |
๊ฐ ์์น๋ LLM ํ๋กฌํํธ์ **personality ํ๋ผ๋ฏธํฐ**๋ก ๋ณํ๋์ด Gemini์ ์ ๋ฌ๋ฉ๋๋ค.
์ ๊ฒฝ์ฑ(Neuroticism) ์์น๋ ๋ชจ๋ธ์ `temperature` ๊ฐ์๋ ์ง์ ๋ฐ์๋ฉ๋๋ค.
```
temperature = 0.7 + (neuroticism / 200)
```
---
## ๐๏ธ ์์คํ
์ํคํ
์ฒ
```
[์ฌ์ฉ์ ๋ธ๋ผ์ฐ์ ]
โ
โ POST /api/chat (NPC ์ค์ + Big Five ์์น + ๋ํ ํ์คํ ๋ฆฌ)
โผ
[Vercel Edge Function] โ GEMINI_API_KEY (์๋ฒ์๋ง ์กด์ฌ, ์ธ๋ถ ๋
ธ์ถ ์์)
โ
โ Streaming SSE
โผ
[Gemini 3 Flash Preview]
โ
โ ์ค์๊ฐ ์คํธ๋ฆฌ๋ฐ ์๋ต
โผ
[์ฌ์ฉ์ ํ๋ฉด์ ํ์ดํ ํจ๊ณผ๋ก ์ถ๋ ฅ]
```
**API ํค ๋ณด์:** ํด๋ผ์ด์ธํธ ๋ฒ๋ค์ ํค๋ฅผ ํฌํจํ์ง ์๊ณ , Vercel ์๋ฒ์ฌ์ด๋ ํ๊ฒฝ๋ณ์๋ก๋ง ๊ด๋ฆฌํฉ๋๋ค.
---
## ๐ ๏ธ ๊ธฐ์ ์คํ
| ๋ถ๋ฅ | ๊ธฐ์ |
|------|------|
| **Frontend** | React 18, TypeScript, Vite, Tailwind CSS |
| **AI** | Google Gemini 3 Flash Preview (`gemini-3-flash-preview`) |
| **๋ฐฐํฌ** | Vercel (Edge Functions) |
| **์ ๋๋ฉ์ด์
** | Motion (Framer Motion) |
| **์์ด์ฝ** | Lucide React |
---
## ๐ฆ ์ค์น ๋ฐ ์คํ
### 1. ๋ ํฌ์งํ ๋ฆฌ ํด๋ก
```bash
git clone https://github.com/Taewan627/maple-npc-generator.git
cd maple-npc-generator
```
### 2. ํจํค์ง ์ค์น
```bash
npm install
```
### 3. ํ๊ฒฝ๋ณ์ ์ค์
```bash
cp .env.example .env
```
`.env` ํ์ผ์ ์ด๊ณ Gemini API ํค ์
๋ ฅ:
```
GEMINI_API_KEY=AIza...
```
> API ํค ๋ฐ๊ธ: [Google AI Studio](https://aistudio.google.com) โ Get API key
### 4. ๋ก์ปฌ ์คํ
```bash
npm run dev
```
`http://localhost:5173` ์ ์
---
## ๐ ํ๋ก์ ํธ ๊ตฌ์กฐ
```
โโโ api/
โ โโโ chat.ts # Vercel Edge Function (Gemini API ํธ์ถ, ํค ๋ณดํธ)
โโโ src/
โ โโโ App.tsx # ๋ฉ์ธ UI ์ปดํฌ๋ํธ
โ โโโ types.ts # Big Five ํ์
์ ์
โ โโโ services/
โ โ โโโ geminiService.ts # API Route ํธ์ถ ๋ฐ SSE ์คํธ๋ฆผ ํ์ฑ
โ โโโ data/
โ โโโ maple_knowledge.json # ๋ฉ์ดํ์คํ ๋ฆฌ ์ธ๊ณ๊ด ์ง์๋ฒ ์ด์ค
โโโ vercel.json # Vercel ๋ผ์ฐํ
์ค์
โโโ vite.config.ts # Vite ๋น๋ ์ค์
```
---
## ๐ฌ ๋
ผ๋ฌธ ์ฐ๊ตฌ ์ฐ๊ณ
์ด ํ๋ก์ ํธ๋ ๋ค์ ์ฐ๊ตฌ์ **์ค์ฆ ์์คํ
(Proof of Concept)** ์ผ๋ก ๊ฐ๋ฐ๋์์ต๋๋ค.
> **"LLM ๊ธฐ๋ฐ ๊ฒ์ NPC ํ๋ฅด์๋์ ์ฑ๊ฒฉ ์ฐจ๋ณ์ฑ ๋ฐ ์ผ๊ด์ฑ ๊ฒ์ฆ์ ์ํ ์ ๋์ ํ๋ ์์ํฌ ์ฐ๊ตฌ: Big Five ๋ชจ๋ธ์ ์ค์ฌ์ผ๋ก"**
> KCI ๋ฑ์ฌ์ง| ํ๊ตญ ๋์งํธ์ฝํ
์ธ ํํ
**์ฐ๊ตฌ ํต์ฌ ์ง๋ฌธ:**
- Big Five ์์น ๋ณํ๊ฐ LLM ์ถ๋ ฅ์ ์ฑ๊ฒฉ ์ฐจ๋ณ์ฑ์ ์ ์๋ฏธํ ์ํฅ์ ์ฃผ๋๊ฐ?
- ๋์ผ NPC์ ๋ํ ๋ฐ๋ณต ์์ฑ ์ ์ฑ๊ฒฉ ์ผ๊ด์ฑ์ด ์ ์ง๋๋๊ฐ?
- ๊ฒ์ ๊ฐ๋ฐ ํ์ดํ๋ผ์ธ์์ AI ๊ธฐ๋ฐ NPC ๋ํ ์์ฑ์ด ์ ์ ํจ์จ์ ๊ฐ์ ํ๋๊ฐ?
์ด ์์คํ
์ ์ ์ฐ๊ตฌ ๊ฐ์ค์ ๊ฒ์ฆํ๊ธฐ ์ํ **A/B ํ
์คํธ ๋ฐ ์ฌ์ฉ์ ์คํ ํ๋ซํผ**์ผ๋ก ํ์ฉ๋ฉ๋๋ค.
---
## ๐ค ๊ฐ๋ฐ์
**๊นํ์ (Taewan Kim)**
์๊ฐ๋ํ๊ต ๊ฐ์์ตํฉ ํ
ํฌ๋๋ก์ง ๋ฐ์ฌ๊ณผ์
- ๐ค HuggingFace: [huggingface.co/devmeta](https://huggingface.co/devmeta)
- ๐ GitHub: [github.com/Taewan627](https://github.com/Taewan627)
---
## ๐ License
MIT License
|