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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
---
|
| 9 |
+
# ๐ ๋ฉ์ดํ์คํ ๋ฆฌ NPC ์ฑ๊ฒฉ ๋ํ ์์ฑ๊ธฐ
|
| 10 |
+
### MapleStory NPC Personality Dialogue Generator
|
| 11 |
+
|
| 12 |
+
> **Big Five ์ฑ๊ฒฉ ๋ชจ๋ธ ๊ธฐ๋ฐ LLM NPC ๋ํ ์์ฑ ์์คํ
**
|
| 13 |
+
> A real-time NPC dialogue generation system powered by Gemini AI and the Big Five personality model.
|
| 14 |
+
|
| 15 |
+
[](https://maple-npc-generator.vercel.app/)
|
| 16 |
+
[](https://vercel.com)
|
| 17 |
+
[](https://ai.google.dev)
|
| 18 |
+
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
## ๐ฎ ํ๋ก์ ํธ ์๊ฐ
|
| 22 |
+
|
| 23 |
+
20๋
๊ฐ ๋ฅ์จ ์นดํธ๋ผ์ด๋ ๋ ๋ฒจ๋์์ธ์ ๋ด๋นํ๋ฉฐ ์ฒด๊ฐํ ๋ฌธ์ ๊ฐ ์์ต๋๋ค.
|
| 24 |
+
**"์๊ฐ์ ๊ณต๋ค์ฌ ๋ง๋ ์ฝํ
์ธ ๊ฐ ๋จ ๋ฉฐ์น ๋ง์ ๊ณ ๊ฐ๋๋ค."**
|
| 25 |
+
|
| 26 |
+
NPC ๋ํ๋ ๊ฒ์ ๋ชฐ์
๊ฐ์ ํต์ฌ์ด์ง๋ง, ์๋ฐฑ ๋ช
์ NPC์๊ฒ ์ผ์ผ์ด ๊ฐ์ฑ ์๋ ๋์ฌ๋ฅผ ์์ฑํ๋ ๊ฒ์ ๋ง๋ํ ๋ฆฌ์์ค๊ฐ ํ์ํฉ๋๋ค. ์ด ํ๋ก์ ํธ๋ ์ฌ๋ฆฌํ์ **Big Five ์ฑ๊ฒฉ ๋ชจ๋ธ**์ ๊ฒ์ NPC์ ์ ์ฉํ์ฌ, AI๊ฐ NPC์ ์ฑ๊ฒฉ์ ๋ง๋ ์์ฐ์ค๋ฌ์ด ๋ํ๋ฅผ ์ค์๊ฐ์ผ๋ก ์์ฑํ๋ ์์คํ
์
๋๋ค.
|
| 27 |
+
|
| 28 |
+
> *"์ด๋ก ์ ๋์ด์ ์ค์ฒด โ ๊ฒ์ ๊ฐ๋ฐ ํ์ฅ์ ๋ฌธ์ ๋ฅผ AI๋ก ์ง์ ํด๊ฒฐํฉ๋๋ค."*
|
| 29 |
+
|
| 30 |
+
---
|
| 31 |
+
|
| 32 |
+
## ๐ Live Demo
|
| 33 |
+
|
| 34 |
+
**๐ [https://maple-npc-generator.vercel.app/](https://maple-npc-generator.vercel.app/)**
|
| 35 |
+
|
| 36 |
+
์ฌ๋ผ์ด๋๋ก NPC์ Big Five ์ฑ๊ฒฉ ์์น๋ฅผ ์กฐ์ ํ๊ณ ,
|
| 37 |
+
์ค์๊ฐ์ผ๋ก ๋ฌ๋ผ์ง๋ ๋ํ ์คํ์ผ์ ์ง์ ์ฒดํํด๋ณด์ธ์.
|
| 38 |
+
|
| 39 |
+
---
|
| 40 |
+
|
| 41 |
+
## ๐ง Big Five ์ฑ๊ฒฉ ๋ชจ๋ธ (OCEAN)
|
| 42 |
+
|
| 43 |
+
์ฌ๋ฆฌํ์ ํ์ค ์ฑ๊ฒฉ ๋ชจ๋ธ์ NPC ๋ํ ์์ฑ์ ์ ์ฉํ์ต๋๋ค.
|
| 44 |
+
|
| 45 |
+
| ํน์ฑ | ์๋ฌธ | ๋ฎ์ ๋ | ๋์ ๋ |
|
| 46 |
+
|------|------|---------|---------|
|
| 47 |
+
| **๊ฐ๋ฐฉ์ฑ** | Openness | ์ ํต์ , ํ์ค์ | ์ฐฝ์์ , ํธ๊ธฐ์ฌ ๋ง์ |
|
| 48 |
+
| **์ฑ์ค์ฑ** | Conscientiousness | ์ฆํฅ์ , ์ ์ฐํจ | ์ฒด๊ณ์ , ์ฑ
์๊ฐ ๊ฐํจ |
|
| 49 |
+
| **์ธํฅ์ฑ** | Extraversion | ์กฐ์ฉํจ, ๋ด์ฑ์ | ํ๋ฐํจ, ์ฌ๊ต์ |
|
| 50 |
+
| **์นํ์ฑ** | Agreeableness | ์ง์ค์ , ๊ฒฝ์์ | ๊ณต๊ฐ์ , ํ๋ ฅ์ |
|
| 51 |
+
| **์ ๊ฒฝ์ฑ** | Neuroticism | ์์ ์ , ์นจ์ฐฉํจ | ๊ฐ์ ์ , ์๋ฏผํจ |
|
| 52 |
+
|
| 53 |
+
๊ฐ ์์น๋ LLM ํ๋กฌํํธ์ **personality ํ๋ผ๋ฏธํฐ**๋ก ๋ณํ๋์ด Gemini์ ์ ๋ฌ๋ฉ๋๋ค.
|
| 54 |
+
์ ๊ฒฝ์ฑ(Neuroticism) ์์น๋ ๋ชจ๋ธ์ `temperature` ๊ฐ์๋ ์ง์ ๋ฐ์๋ฉ๋๋ค.
|
| 55 |
+
|
| 56 |
+
```
|
| 57 |
+
temperature = 0.7 + (neuroticism / 200)
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
---
|
| 61 |
+
|
| 62 |
+
## ๐๏ธ ์์คํ
์ํคํ
์ฒ
|
| 63 |
+
|
| 64 |
+
```
|
| 65 |
+
[์ฌ์ฉ์ ๋ธ๋ผ์ฐ์ ]
|
| 66 |
+
โ
|
| 67 |
+
โ POST /api/chat (NPC ์ค์ + Big Five ์์น + ๋ํ ํ์คํ ๋ฆฌ)
|
| 68 |
+
โผ
|
| 69 |
+
[Vercel Edge Function] โ GEMINI_API_KEY (์๋ฒ์๋ง ์กด์ฌ, ์ธ๋ถ ๋
ธ์ถ ์์)
|
| 70 |
+
โ
|
| 71 |
+
โ Streaming SSE
|
| 72 |
+
โผ
|
| 73 |
+
[Gemini 3 Flash Preview]
|
| 74 |
+
โ
|
| 75 |
+
โ ์ค์๊ฐ ์คํธ๋ฆฌ๋ฐ ์๋ต
|
| 76 |
+
โผ
|
| 77 |
+
[์ฌ์ฉ์ ํ๋ฉด์ ํ์ดํ ํจ๊ณผ๋ก ์ถ๋ ฅ]
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
**API ํค ๋ณด์:** ํด๋ผ์ด์ธํธ ๋ฒ๋ค์ ํค๋ฅผ ํฌํจํ์ง ์๊ณ , Vercel ์๋ฒ์ฌ์ด๋ ํ๊ฒฝ๋ณ์๋ก๋ง ๊ด๋ฆฌํฉ๋๋ค.
|
| 81 |
+
|
| 82 |
+
---
|
| 83 |
+
|
| 84 |
+
## ๐ ๏ธ ๊ธฐ์ ์คํ
|
| 85 |
+
|
| 86 |
+
| ๋ถ๋ฅ | ๊ธฐ์ |
|
| 87 |
+
|------|------|
|
| 88 |
+
| **Frontend** | React 18, TypeScript, Vite, Tailwind CSS |
|
| 89 |
+
| **AI** | Google Gemini 3 Flash Preview (`gemini-3-flash-preview`) |
|
| 90 |
+
| **๋ฐฐํฌ** | Vercel (Edge Functions) |
|
| 91 |
+
| **์ ๋๋ฉ์ด์
** | Motion (Framer Motion) |
|
| 92 |
+
| **์์ด์ฝ** | Lucide React |
|
| 93 |
+
|
| 94 |
+
---
|
| 95 |
+
|
| 96 |
+
## ๐ฆ ์ค์น ๋ฐ ์คํ
|
| 97 |
+
|
| 98 |
+
### 1. ๋ ํฌ์งํ ๋ฆฌ ํด๋ก
|
| 99 |
+
```bash
|
| 100 |
+
git clone https://github.com/Taewan627/maple-npc-generator.git
|
| 101 |
+
cd maple-npc-generator
|
| 102 |
+
```
|
| 103 |
+
|
| 104 |
+
### 2. ํจํค์ง ์ค์น
|
| 105 |
+
```bash
|
| 106 |
+
npm install
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
### 3. ํ๊ฒฝ๋ณ์ ์ค์
|
| 110 |
+
```bash
|
| 111 |
+
cp .env.example .env
|
| 112 |
+
```
|
| 113 |
+
`.env` ํ์ผ์ ์ด๊ณ Gemini API ํค ์
๋ ฅ:
|
| 114 |
+
```
|
| 115 |
+
GEMINI_API_KEY=AIza...
|
| 116 |
+
```
|
| 117 |
+
> API ํค ๋ฐ๊ธ: [Google AI Studio](https://aistudio.google.com) โ Get API key
|
| 118 |
+
|
| 119 |
+
### 4. ๋ก์ปฌ ์คํ
|
| 120 |
+
```bash
|
| 121 |
+
npm run dev
|
| 122 |
+
```
|
| 123 |
+
`http://localhost:5173` ์ ์
|
| 124 |
+
|
| 125 |
+
---
|
| 126 |
+
|
| 127 |
+
## ๐ ํ๋ก์ ํธ ๊ตฌ์กฐ
|
| 128 |
+
|
| 129 |
+
```
|
| 130 |
+
โโโ api/
|
| 131 |
+
โ โโโ chat.ts # Vercel Edge Function (Gemini API ํธ์ถ, ํค ๋ณดํธ)
|
| 132 |
+
โโโ src/
|
| 133 |
+
โ โโโ App.tsx # ๋ฉ์ธ UI ์ปดํฌ๋ํธ
|
| 134 |
+
โ โโโ types.ts # Big Five ํ์
์ ์
|
| 135 |
+
โ โโโ services/
|
| 136 |
+
โ โ โโโ geminiService.ts # API Route ํธ์ถ ๋ฐ SSE ์คํธ๋ฆผ ํ์ฑ
|
| 137 |
+
โ โโโ data/
|
| 138 |
+
โ โโโ maple_knowledge.json # ๋ฉ์ดํ์คํ ๋ฆฌ ์ธ๊ณ๊ด ์ง์๋ฒ ์ด์ค
|
| 139 |
+
โโโ vercel.json # Vercel ๋ผ์ฐํ
์ค์
|
| 140 |
+
โโโ vite.config.ts # Vite ๋น๋ ์ค์
|
| 141 |
+
```
|
| 142 |
+
|
| 143 |
+
---
|
| 144 |
+
|
| 145 |
+
## ๐ฌ ๋
ผ๋ฌธ ์ฐ๊ตฌ ์ฐ๊ณ
|
| 146 |
+
|
| 147 |
+
์ด ํ๋ก์ ํธ๋ ๋ค์ ์ฐ๊ตฌ์ **์ค์ฆ ์์คํ
(Proof of Concept)** ์ผ๋ก ๊ฐ๋ฐ๋์์ต๋๋ค.
|
| 148 |
+
|
| 149 |
+
> **"LLM ๊ธฐ๋ฐ ๊ฒ์ NPC ํ๋ฅด์๋์ ์ฑ๊ฒฉ ์ฐจ๋ณ์ฑ ๋ฐ ์ผ๊ด์ฑ ๊ฒ์ฆ์ ์ํ ์ ๋์ ํ๋ ์์ํฌ ์ฐ๊ตฌ: Big Five ๋ชจ๋ธ์ ์ค์ฌ์ผ๋ก"**
|
| 150 |
+
> KCI ๋ฑ์ฌ์ง| ํ๊ตญ ๋์งํธ์ฝํ
์ธ ํํ
|
| 151 |
+
|
| 152 |
+
**์ฐ๊ตฌ ํต์ฌ ์ง๋ฌธ:**
|
| 153 |
+
- Big Five ์์น ๋ณํ๊ฐ LLM ์ถ๋ ฅ์ ์ฑ๊ฒฉ ์ฐจ๋ณ์ฑ์ ์ ์๋ฏธํ ์ํฅ์ ์ฃผ๋๊ฐ?
|
| 154 |
+
- ๋์ผ NPC์ ๋ํ ๋ฐ๋ณต ์์ฑ ์ ์ฑ๊ฒฉ ์ผ๊ด์ฑ์ด ์ ์ง๋๋๊ฐ?
|
| 155 |
+
- ๊ฒ์ ๊ฐ๋ฐ ํ์ดํ๋ผ์ธ์์ AI ๊ธฐ๋ฐ NPC ๋ํ ์์ฑ์ด ์ ์ ํจ์จ์ ๊ฐ์ ํ๋๊ฐ?
|
| 156 |
+
|
| 157 |
+
์ด ์์คํ
์ ์ ์ฐ๊ตฌ ๊ฐ์ค์ ๊ฒ์ฆํ๊ธฐ ์ํ **A/B ํ
์คํธ ๋ฐ ์ฌ์ฉ์ ์คํ ํ๋ซํผ**์ผ๋ก ํ์ฉ๋ฉ๋๋ค.
|
| 158 |
+
|
| 159 |
+
---
|
| 160 |
+
|
| 161 |
+
## ๐ค ๊ฐ๋ฐ์
|
| 162 |
+
|
| 163 |
+
**๊นํ์ (Taewan Kim)**
|
| 164 |
+
์๊ฐ๋ํ๊ต ๊ฐ์์ตํฉ ํ
ํฌ๋๋ก์ง ๋ฐ์ฌ๊ณผ์
|
| 165 |
+
|
| 166 |
+
- ๐ค HuggingFace: [huggingface.co/devmeta](https://huggingface.co/devmeta)
|
| 167 |
+
- ๐ GitHub: [github.com/Taewan627](https://github.com/Taewan627)
|
| 168 |
+
|
| 169 |
+
---
|
| 170 |
+
|
| 171 |
+
## ๐ License
|
| 172 |
+
|
| 173 |
+
MIT License
|
| 174 |
|
|
|