aiqtech commited on
Commit
617545c
ยท
verified ยท
1 Parent(s): 44de686

Delete app-BACKUP3.py

Browse files
Files changed (1) hide show
  1. app-BACKUP3.py +0 -1556
app-BACKUP3.py DELETED
@@ -1,1556 +0,0 @@
1
- import gradio as gr
2
- import os
3
- import json
4
- import requests
5
- from datetime import datetime
6
- import time
7
- from typing import List, Dict, Any, Generator, Tuple
8
- import logging
9
- import re
10
-
11
- # ๋กœ๊น… ์„ค์ •
12
- logging.basicConfig(level=logging.INFO)
13
- logger = logging.getLogger(__name__)
14
-
15
- # ์ถ”๊ฐ€ ์ž„ํฌํŠธ
16
- from bs4 import BeautifulSoup
17
- from urllib.parse import urlparse
18
- import urllib.request
19
-
20
- # Gemini API ์ž„ํฌํŠธ
21
- try:
22
- from google import genai
23
- from google.genai import types
24
- GEMINI_AVAILABLE = True
25
- except ImportError:
26
- GEMINI_AVAILABLE = False
27
- logger.warning("Google Gemini API๊ฐ€ ์„ค์น˜๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. pip install google-genai๋กœ ์„ค์น˜ํ•˜์„ธ์š”.")
28
-
29
- # ํ™˜๊ฒฝ ๋ณ€์ˆ˜์—์„œ ํ† ํฐ ๊ฐ€์ ธ์˜ค๊ธฐ
30
- FRIENDLI_TOKEN = os.getenv("FRIENDLI_TOKEN", "YOUR_FRIENDLI_TOKEN")
31
- BAPI_TOKEN = os.getenv("BAPI_TOKEN", "YOUR_BRAVE_API_TOKEN")
32
- GEMINI_API_KEY = os.getenv("GEMINI_API_KEY", "YOUR_GEMINI_API_KEY")
33
- API_URL = "https://api.friendli.ai/dedicated/v1/chat/completions"
34
- BRAVE_SEARCH_URL = "https://api.search.brave.com/res/v1/web/search"
35
- MODEL_ID = "dep89a2fld32mcm"
36
- TEST_MODE = os.getenv("TEST_MODE", "false").lower() == "true"
37
-
38
- # ์ „์—ญ ๋ณ€์ˆ˜
39
- conversation_history = []
40
-
41
- class WuxingLLMSystem:
42
- """์˜คํ–‰ยท์˜ค์ƒ ๊ธฐ๋ฐ˜ AGI๊ธ‰ ํ˜‘๋ ฅ์  ๋ณด๊ณ ์„œ ์ž‘์„ฑ ์‹œ์Šคํ…œ"""
43
-
44
- def __init__(self):
45
- self.token = FRIENDLI_TOKEN
46
- self.bapi_token = BAPI_TOKEN
47
- self.gemini_api_key = GEMINI_API_KEY
48
- self.api_url = API_URL
49
- self.brave_url = BRAVE_SEARCH_URL
50
- self.model_id = MODEL_ID
51
- self.test_mode = TEST_MODE or (self.token == "YOUR_FRIENDLI_TOKEN")
52
- self.use_gemini = False
53
- self.gemini_client = None
54
-
55
- # ์˜คํ–‰ ์—ญํ•  ์ •์˜ - AGI ์ˆ˜์ค€ ์ „๋ฌธ๊ฐ€ ํŒ€
56
- self.wuxing_roles = {
57
- "wood": {
58
- "name": "์ „๋žต์  ๋น„์ „ ์„ค๊ณ„์ž (Chief Vision Officer)",
59
- "virtue": "ไป",
60
- "element": "ๆœจ",
61
- "traits": "ํ†ต์ฐฐ๋ ฅ, ๋ฏธ๋ž˜์˜ˆ์ธก, ํฌ์šฉ์  ๋ฆฌ๋”์‹ญ",
62
- "expertise": "๊ฑฐ์‹œ์  ๋น„์ „, ์‹œ์Šคํ…œ์  ์‚ฌ๊ณ , ํ˜์‹  ์ „๋žต, ์กฐ์ง ๋ฌธํ™” ์„ค๊ณ„",
63
- "color": "#10b981"
64
- },
65
- "fire": {
66
- "name": "ํ˜์‹  ์ „๋žต ์•„ํ‚คํ…ํŠธ (Innovation Strategy Architect)",
67
- "virtue": "็พฉ",
68
- "element": "็ซ",
69
- "traits": "ํŒŒ๊ดด์  ํ˜์‹ , ์ „๋žต์  ์ง๊ด€, ๋ฆฌ์Šคํฌ ํ…Œ์ดํ‚น",
70
- "expertise": "๋น„์ฆˆ๋‹ˆ์Šค ๋ชจ๋ธ ํ˜์‹ , ์‹œ์žฅ ํŒŒ๊ดด ์ „๋žต, ๊ฒฝ์Ÿ์šฐ์œ„ ์„ค๊ณ„",
71
- "color": "#ef4444"
72
- },
73
- "metal": {
74
- "name": "์‹œ์Šคํ…œ ์•„ํ‚คํ…์ฒ˜ ๋งˆ์Šคํ„ฐ (Systems Architecture Master)",
75
- "virtue": "็ฆฎ",
76
- "element": "้‡‘",
77
- "traits": "์ •๋ฐ€์„ฑ, ์™„๋ฒฝ์ฃผ์˜, ์‹œ์Šคํ…œ ํ†ตํ•ฉ๋ ฅ",
78
- "expertise": "์—”ํ„ฐํ”„๋ผ์ด์ฆˆ ์•„ํ‚คํ…์ฒ˜, ๊ธฐ์ˆ  ๊ฑฐ๋ฒ„๋„Œ์Šค, ํ‘œ์ค€ํ™” ์ „๋žต",
79
- "color": "#f59e0b"
80
- },
81
- "water": {
82
- "name": "๋ฏธ๋ž˜๊ธฐ์ˆ  ์—ฐ๊ตฌ์†Œ์žฅ (Future Tech Research Director)",
83
- "virtue": "ๆ™บ",
84
- "element": "ๆฐด",
85
- "traits": "๊นŠ์€ ๋ถ„์„๋ ฅ, ๊ธฐ์ˆ  ํ†ต์ฐฐ, ํ˜์‹ ์  ์‚ฌ๊ณ ",
86
- "expertise": "์‹ ๊ธฐ์ˆ  R&D, ๊ธฐ์ˆ  ์œตํ•ฉ, AI/ML, ํ€€ํ…€ ์ปดํ“จํŒ…",
87
- "color": "#3b82f6"
88
- },
89
- "earth": {
90
- "name": "์‹คํ–‰ ์ตœ์ ํ™” ์ „๋ฌธ๊ฐ€ (Execution Excellence Expert)",
91
- "virtue": "ไฟก",
92
- "element": "ๅœŸ",
93
- "traits": "์ฒด๊ณ„์„ฑ, ์‹ ๋ขฐ์„ฑ, ์‹คํ–‰ ์™„๋ฒฝ์„ฑ",
94
- "expertise": "ํ”„๋กœ์ ํŠธ ๊ฑฐ๋ฒ„๋„Œ์Šค, ํ’ˆ์งˆ ์‹œ์Šคํ…œ, ๋ฆฌ์Šคํฌ ๊ด€๋ฆฌ, ROI ์ตœ์ ํ™”",
95
- "color": "#a855f7"
96
- }
97
- }
98
-
99
- if self.test_mode:
100
- logger.warning("ํ…Œ์ŠคํŠธ ๋ชจ๋“œ๋กœ ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค.")
101
-
102
- def set_llm_mode(self, mode: str):
103
- """LLM ๋ชจ๋“œ ์„ค์ •"""
104
- if mode == "commercial" and GEMINI_AVAILABLE and self.gemini_api_key != "YOUR_GEMINI_API_KEY":
105
- self.use_gemini = True
106
- if not self.gemini_client:
107
- self.gemini_client = genai.Client(api_key=self.gemini_api_key)
108
- logger.info("Gemini 2.5 Pro ๋ชจ๋“œ๋กœ ์ „ํ™˜๋˜์—ˆ์Šต๋‹ˆ๋‹ค.")
109
- else:
110
- self.use_gemini = False
111
- logger.info("๊ธฐ๋ณธ LLM ๋ชจ๋“œ๋กœ ์ „ํ™˜๋˜์—ˆ์Šต๋‹ˆ๋‹ค.")
112
-
113
- def create_headers(self):
114
- """API ํ—ค๋” ์ƒ์„ฑ"""
115
- return {
116
- "Authorization": f"Bearer {self.token}",
117
- "Content-Type": "application/json"
118
- }
119
-
120
- def create_brave_headers(self):
121
- """Brave API ํ—ค๋” ์ƒ์„ฑ"""
122
- return {
123
- "Accept": "application/json",
124
- "Accept-Encoding": "gzip",
125
- "X-Subscription-Token": self.bapi_token
126
- }
127
-
128
- def create_wood_initial_prompt(self, user_query: str, search_results: Dict = None) -> str:
129
- """ๆœจ(์ „๋žต๏ฟฝ๏ฟฝ๏ฟฝ ๋น„์ „ ์„ค๊ณ„์ž) ์ดˆ๊ธฐ ํ”„๋กฌํ”„ํŠธ"""
130
- search_info = ""
131
- if search_results:
132
- search_info = "\n\n์›น ๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ:\n" + self._format_search_results(search_results)
133
-
134
- return f"""๋‹น์‹ ์€ AGI ์ˆ˜์ค€์˜ ์ „๋žต์  ๋น„์ „ ์„ค๊ณ„์ž(Chief Vision Officer)์ž…๋‹ˆ๋‹ค.
135
- ไป(์ธ์žํ•จ)์˜ ๋•๋ชฉ์œผ๋กœ ๋ฏธ๋ž˜๋ฅผ ์˜ˆ์ธกํ•˜๊ณ  ํ˜์‹ ์  ๋น„์ „์„ ์ œ์‹œํ•ฉ๋‹ˆ๋‹ค.
136
-
137
- [์‚ฌ์šฉ์ž ์š”์ฒญ์‚ฌํ•ญ]
138
- {user_query}
139
-
140
- [์ฐธ๊ณ  ์ž๋ฃŒ]
141
- {search_info}
142
-
143
- [์ž„๋ฌด] ๋‹ค์Œ ๊ด€์ ์—์„œ ์ข…ํ•ฉ์ ์ด๊ณ  ํ˜์‹ ์ ์ธ ๋น„์ „์„ ์ œ์‹œํ•˜์„ธ์š”:
144
-
145
- 1. **๊ฑฐ์‹œ์  ๋น„์ „๊ณผ ํŒจ๋Ÿฌ๋‹ค์ž„ ์ „ํ™˜**
146
- - 10๋…„ ํ›„ ๋ฏธ๋ž˜ ์‹œ๋‚˜๋ฆฌ์˜ค์™€ ๋ฉ”๊ฐ€ํŠธ๋ Œ๋“œ ๋ถ„์„
147
- - ํŒจ๋Ÿฌ๋‹ค์ž„ ์‹œํ”„ํŠธ์™€ ๊ฒŒ์ž„์ฒด์ธ์ € ์š”์†Œ ์‹๋ณ„
148
- - ๊ธ€๋กœ๋ฒŒ ๋งฅ๋ฝ์—์„œ์˜ ์ „๋žต์  ํฌ์ง€์…”๋‹
149
-
150
- 2. **์‹œ์Šคํ…œ์  ์‚ฌ๊ณ ์™€ ๋ณต์žก๊ณ„ ๋ถ„์„**
151
- - ๋‹ค์ฐจ์›์  ์ƒํ˜ธ์ž‘์šฉ๊ณผ ํ”ผ๋“œ๋ฐฑ ๋ฃจํ”„ ์„ค๊ณ„
152
- - ์ฐฝ๋ฐœ์  ์†์„ฑ๊ณผ ๋„คํŠธ์›Œํฌ ํšจ๊ณผ ์˜ˆ์ธก
153
- - ์ƒํƒœ๊ณ„ ๊ด€์ ์˜ ๊ฐ€์น˜ ์ฐฝ์ถœ ๋ชจ๋ธ
154
-
155
- 3. **ํ˜์‹  ํ”„๋ ˆ์ž„์›Œํฌ์™€ ์ „๋žต์  ๋ฐฉํ–ฅ์„ฑ**
156
- - ๋ธ”๋ฃจ์˜ค์…˜ ์ „๋žต๊ณผ ์นดํ…Œ๊ณ ๋ฆฌ ๋””์ž์ธ
157
- - ์ง€์ˆ˜์  ์„ฑ์žฅ์„ ์œ„ํ•œ ํ”Œ๋ผ์ดํœ  ์„ค๊ณ„
158
- - ์•ˆํ‹ฐํ”„๋ž˜์งˆํ•œ ์‹œ์Šคํ…œ ๊ตฌ์ถ• ๋ฐฉ์•ˆ
159
-
160
- 4. **ํŒ€ ์‹œ๋„ˆ์ง€์™€ ์ง‘๋‹จ์ง€์„ฑ ํ™œ์šฉ ์ „๋žต**
161
- - ็ซ(ํ˜์‹  ์ „๋žต): ํŒŒ๊ดด์  ํ˜์‹ ๊ณผ ๋น„์ฆˆ๋‹ˆ์Šค ๋ชจ๋ธ ์žฌ์ •์˜
162
- - ๅœŸ(์‹คํ–‰ ์ตœ์ ํ™”): ์• ์ž์ผ ์‹คํ–‰๊ณผ ์ง€์†์  ๊ฐœ์„  ์ฒด๊ณ„
163
- - ้‡‘(์‹œ์Šคํ…œ ์•„ํ‚คํ…์ฒ˜): ํ™•์žฅ ๊ฐ€๋Šฅํ•œ ๊ธฐ์ˆ  ์ธํ”„๋ผ์™€ ํ‘œ์ค€ํ™”
164
- - ๆฐด(๋ฏธ๋ž˜๊ธฐ์ˆ  R&D): ์‹ ๊ธฐ์ˆ  ์œตํ•ฉ๊ณผ ํ˜์‹ ์  ํ”„๋กœํ† ํƒ€์ดํ•‘
165
-
166
- 5. **ํ•ต์‹ฌ ์„ฑ๊ณต ์ง€ํ‘œ(KPI)์™€ ๋ถ๊ทน์„ฑ ์ง€ํ‘œ(North Star Metric)**
167
- - ์žฅ๊ธฐ์  ์ž„ํŒฉํŠธ ์ธก์ • ํ”„๋ ˆ์ž„์›Œํฌ
168
- - ์„ ํ–‰์ง€ํ‘œ์™€ ํ›„ํ–‰์ง€ํ‘œ์˜ ๊ท ํ˜•์žกํžŒ ์„ค๊ณ„
169
-
170
- [๊ฒ€์ƒ‰ ํ‚ค์›Œ๋“œ ์ œ์•ˆ]: ๋ฏธ๋ž˜ ์—ฐ๊ตฌ์— ํ•„์š”ํ•œ 7-10๊ฐœ์˜ ์ „๋žต์  ํ‚ค์›Œ๋“œ๋ฅผ ์ œ์‹œํ•˜์„ธ์š”"""
171
-
172
- def create_fire_strategy_prompt(self, user_query: str, wood_response: str, critic_feedback: str, search_results: Dict = None) -> str:
173
- """็ซ(ํ˜์‹  ์ „๋žต ์•„ํ‚คํ…ํŠธ) ํ”„๋กฌํ”„ํŠธ"""
174
- search_info = ""
175
- if search_results:
176
- search_info = "\n\n์›น ๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ:\n" + self._format_search_results(search_results)
177
-
178
- return f"""๋‹น์‹ ์€ AGI ์ˆ˜์ค€์˜ ํ˜์‹  ์ „๋žต ์•„ํ‚คํ…ํŠธ(Innovation Strategy Architect)์ž…๋‹ˆ๋‹ค.
179
- ็พฉ(์ •์˜๋กœ์›€)์˜ ๋•๋ชฉ์œผ๋กœ ํŒŒ๊ดด์  ํ˜์‹ ๊ณผ ๊ฒŒ์ž„์ฒด์ธ์ง• ์ „๋žต์„ ์„ค๊ณ„ํ•ฉ๋‹ˆ๋‹ค.
180
-
181
- [์‚ฌ์šฉ์ž ์š”์ฒญ์‚ฌํ•ญ]
182
- {user_query}
183
-
184
- [์ „๋žต์  ๋น„์ „ ์„ค๊ณ„์ž์˜ ํ”„๋ ˆ์ž„์›Œํฌ]
185
- {wood_response}
186
-
187
- [์ „๋žต ๊ฒ€์ฆ ์ „๋ฌธ๊ฐ€์˜ ํ”ผ๋“œ๋ฐฑ]
188
- {critic_feedback}
189
-
190
- [์‹œ์žฅ ์กฐ์‚ฌ ๋ฐ์ดํ„ฐ]
191
- {search_info}
192
-
193
- [์ž„๋ฌด] ๋‹ค์Œ ๊ด€์ ์—์„œ ํ˜์‹ ์ ์ธ ์ „๋žต์„ ์ˆ˜๋ฆฝํ•˜์„ธ์š”:
194
-
195
- 1. **ํŒŒ๊ดด์  ํ˜์‹ ๊ณผ ๋ธ”๋ฃจ์˜ค์…˜ ์ „๋žต**
196
- - ์‚ฐ์—… ์žฌ์ •์˜์™€ ์นดํ…Œ๊ณ ๋ฆฌ ์ฐฝ์ถœ
197
- - ๊ฐ€์น˜ ํ˜์‹ ๊ณผ ์ฐจ๋ณ„ํ™” ์ „๋žต
198
- - ๋„คํŠธ์›Œํฌ ํšจ๊ณผ์™€ ํ”Œ๋žซํผ ์ „๋žต
199
-
200
- 2. **๋น„์ฆˆ๋‹ˆ์Šค ๋ชจ๋ธ ํ˜์‹ **
201
- - ์ˆ˜์ต ๋ชจ๋ธ ๋‹ค๊ฐํ™” (๊ตฌ๋…, ํ”„๋ฆฌ๋ฏธ์—„, ๋งˆ์ผ“ํ”Œ๋ ˆ์ด์Šค)
202
- - ๊ฐ€์น˜์‚ฌ์Šฌ ์žฌ๊ตฌ์„ฑ๊ณผ ์ˆ˜์ง ํ†ตํ•ฉ
203
- - ์ƒํƒœ๊ณ„ ๊ตฌ์ถ•๊ณผ ํŒŒํŠธ๋„ˆ์‹ญ ์ „๋žต
204
-
205
- 3. **๊ฒฝ์Ÿ์šฐ์œ„ ํ™•๋ณด ์ „๋žต**
206
- - ํ•ต์‹ฌ ์—ญ๋Ÿ‰๊ณผ ์ฐจ๋ณ„ํ™” ์š”์†Œ
207
- - ์ง„์ž…์žฅ๋ฒฝ ๊ตฌ์ถ• ๋ฉ”์ปค๋‹ˆ์ฆ˜
208
- - ์ง€์†๊ฐ€๋Šฅํ•œ ๊ฒฝ์Ÿ์šฐ์œ„ ์›์ฒœ
209
-
210
- 4. **์„ฑ์žฅ ์ „๋žต๊ณผ ํ™•์žฅ ๊ณ„ํš**
211
- - ์‹œ์žฅ ์นจํˆฌ์™€ ์‹œ์žฅ ๊ฐœ๋ฐœ ์ „๋žต
212
- - ์ œํ’ˆ ๊ฐœ๋ฐœ๊ณผ ๋‹ค๊ฐํ™” ์ „๋žต
213
- - M&A์™€ ์ „๋žต์  ์ œํœด ์˜ต์…˜
214
-
215
- 5. **๋ฆฌ์Šคํฌ ๊ด€๋ฆฌ์™€ ์‹œ๋‚˜๋ฆฌ์˜ค ํ”Œ๋ž˜๋‹**
216
- - ์ „๋žต์  ๋ฆฌ์Šคํฌ ๋งคํŠธ๋ฆญ์Šค
217
- - ๋Œ€์‘ ์‹œ๋‚˜๋ฆฌ์˜ค์™€ ์ปจํ‹ด์ „์‹œ ํ”Œ๋žœ
218
- - ์•ˆํ‹ฐํ”„๋ž˜์งˆํ•œ ์ „๋žต ์„ค๊ณ„
219
-
220
- [์ถ”๊ฐ€ ์—ฐ๊ตฌ ํ•„์š”]: ๊ฒฝ์Ÿ์‚ฌ ๋ถ„์„, ์‹œ์žฅ ๋™ํ–ฅ, ๊ทœ์ œ ํ™˜๊ฒฝ ๋“ฑ ์ถ”๊ฐ€ ์กฐ์‚ฌ๊ฐ€ ํ•„์š”ํ•œ ํ‚ค์›Œ๋“œ [์ถ”๊ฐ€ ๊ฒ€์ƒ‰]"""
221
-
222
- def create_earth_execution_prompt(self, user_query: str, fire_response: str, critic_feedback: str, search_results: Dict = None) -> str:
223
- """ๅœŸ(์‹คํ–‰ ์ตœ์ ํ™” ์ „๋ฌธ๊ฐ€) ํ”„๋กฌํ”„ํŠธ"""
224
- search_info = ""
225
- if search_results:
226
- search_info = "\n\n์›น ๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ:\n" + self._format_search_results(search_results)
227
-
228
- return f"""๋‹น์‹ ์€ AGI ์ˆ˜์ค€์˜ ์‹คํ–‰ ์ตœ์ ํ™” ์ „๋ฌธ๊ฐ€(Execution Excellence Expert)์ž…๋‹ˆ๋‹ค.
229
- ไฟก(์‹ ๋ขฐ)์˜ ๋•๋ชฉ์œผ๋กœ ์™„๋ฒฝํ•œ ์‹คํ–‰ ์ฒด๊ณ„์™€ ํ’ˆ์งˆ ์‹œ์Šคํ…œ์„ ๊ตฌ์ถ•ํ•ฉ๋‹ˆ๋‹ค.
230
-
231
- [์‚ฌ์šฉ์ž ์š”์ฒญ์‚ฌํ•ญ]
232
- {user_query}
233
-
234
- [ํ˜์‹  ์ „๋žต ์•„ํ‚คํ…ํŠธ์˜ ์ „๋žต]
235
- {fire_response}
236
-
237
- [์ „๋žต ๊ฒ€์ฆ ์ „๋ฌธ๊ฐ€์˜ ํ”ผ๋“œ๋ฐฑ]
238
- {critic_feedback}
239
-
240
- [์‹คํ–‰ ๊ด€๋ จ ๋ฒค์น˜๋งˆํฌ ๋ฐ์ดํ„ฐ]
241
- {search_info}
242
-
243
- [์ž„๋ฌด] ๋‹ค์Œ ๊ด€์ ์—์„œ ์ตœ์ ํ™”๋œ ์‹คํ–‰ ๊ณ„ํš์„ ์ˆ˜๋ฆฝํ•˜์„ธ์š”:
244
-
245
- 1. **ํ”„๋กœ์ ํŠธ ๊ฑฐ๋ฒ„๋„Œ์Šค์™€ PMO ์ฒด๊ณ„**
246
- - ์• ์ž์ผ/์›Œํ„ฐํด ํ•˜์ด๋ธŒ๋ฆฌ๋“œ ๋ฐฉ๋ฒ•๋ก 
247
- - RACI ๋งคํŠธ๋ฆญ์Šค์™€ ์˜์‚ฌ๊ฒฐ์ • ๊ตฌ์กฐ
248
- - ํ”„๋กœ์ ํŠธ ํฌํŠธํด๋ฆฌ์˜ค ๊ด€๋ฆฌ
249
-
250
- 2. **๋‹จ๊ณ„๋ณ„ ์‹คํ–‰ ๋กœ๋“œ๋งต**
251
- - ์›Œํฌ ๋ธŒ๋ ˆ์ดํฌ๋‹ค์šด ์ŠคํŠธ๋Ÿญ์ฒ˜(WBS)
252
- - ํฌ๋ฆฌํ‹ฐ์ปฌ ํŒจ์Šค์™€ ๋งˆ์ผ์Šคํ†ค
253
- - ์Šคํ”„๋ฆฐํŠธ ๊ณ„ํš๊ณผ ๋ฐฑ๋กœ๊ทธ ๊ด€๋ฆฌ
254
-
255
- 3. **๋ฆฌ์†Œ์Šค ์ตœ์ ํ™”์™€ ์˜ˆ์‚ฐ ๊ด€๋ฆฌ**
256
- - ์ธ๋ ฅ ๋ฐฐ์น˜์™€ ์Šคํ‚ฌ ๋งคํŠธ๋ฆญ์Šค
257
- - TCO ๋ถ„์„๊ณผ ์˜ˆ์‚ฐ ๋ฐฐ๋ถ„
258
- - ๋น„์šฉ ์ตœ์ ํ™” ์ „๋žต
259
-
260
- 4. **ํ’ˆ์งˆ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ**
261
- - ISO 9001/27001 ๊ธฐ๋ฐ˜ ํ’ˆ์งˆ ์ฒด๊ณ„
262
- - KPI/OKR ํ”„๋ ˆ์ž„์›Œํฌ
263
- - ์ง€์†์  ๊ฐœ์„ (Kaizen) ๋ฉ”์ปค๋‹ˆ์ฆ˜
264
-
265
- 5. **๋ฆฌ์Šคํฌ ๊ด€๋ฆฌ์™€ ๋ณ€ํ™” ๊ด€๋ฆฌ**
266
- - ๋ฆฌ์Šคํฌ ๋ ˆ์ง€์Šคํ„ฐ์™€ ์™„ํ™” ์ „๋žต
267
- - ๋ณ€ํ™” ๊ด€๋ฆฌ 8๋‹จ๊ณ„ ํ”„๋กœ์„ธ์Šค
268
- - ์ดํ•ด๊ด€๊ณ„์ž ๊ด€๋ฆฌ ์ „๋žต
269
-
270
- 6. **์„ฑ๊ณผ ์ธก์ •๊ณผ ๋Œ€์‹œ๋ณด๋“œ**
271
- - ์‹ค์‹œ๊ฐ„ ๋ชจ๋‹ˆํ„ฐ๋ง ์‹œ์Šคํ…œ
272
- - ๊ท ํ˜•์„ฑ๊ณผํ‘œ(BSC) ์„ค๊ณ„
273
- - ์˜ˆ์ธก ๋ถ„์„๊ณผ ์กฐ๊ธฐ ๊ฒฝ๋ณด ์‹œ์Šคํ…œ
274
-
275
- [์ถ”๊ฐ€ ์กฐ์‚ฌ ํ•„์š”]: ์—…๊ณ„ ๋ฒ ์ŠคํŠธ ํ”„๋ž™ํ‹ฐ์Šค, ์‹คํ–‰ ๋„๊ตฌ, ํ’ˆ์งˆ ํ‘œ์ค€ ๋“ฑ [์ถ”๊ฐ€ ๊ฒ€์ƒ‰]"""
276
-
277
- def create_metal_architecture_prompt(self, user_query: str, earth_response: str, critic_feedback: str, search_results: Dict = None) -> str:
278
- """้‡‘(์‹œ์Šคํ…œ ์•„ํ‚คํ…์ฒ˜ ๋งˆ์Šคํ„ฐ) ํ”„๋กฌํ”„ํŠธ"""
279
- search_info = ""
280
- if search_results:
281
- search_info = "\n\n์›น ๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ:\n" + self._format_search_results(search_results)
282
-
283
- return f"""๋‹น์‹ ์€ AGI ์ˆ˜์ค€์˜ ์‹œ์Šคํ…œ ์•„ํ‚คํ…์ฒ˜ ๋งˆ์Šคํ„ฐ(Systems Architecture Master)์ž…๋‹ˆ๋‹ค.
284
- ็ฆฎ(์˜ˆ์˜ยท์งˆ์„œ)์˜ ๋•๋ชฉ์œผ๋กœ ์™„๋ฒฝํ•˜๊ณ  ํ™•์žฅ ๊ฐ€๋Šฅํ•œ ์‹œ์Šคํ…œ์„ ์„ค๊ณ„ํ•ฉ๋‹ˆ๋‹ค.
285
-
286
- [์‚ฌ์šฉ์ž ์š”์ฒญ์‚ฌํ•ญ]
287
- {user_query}
288
-
289
- [์‹คํ–‰ ์ตœ์ ํ™” ์ „๋ฌธ๊ฐ€์˜ ๊ณ„ํš]
290
- {earth_response}
291
-
292
- [์ „๋žต ๊ฒ€์ฆ ์ „๋ฌธ๊ฐ€์˜ ํ”ผ๋“œ๋ฐฑ]
293
- {critic_feedback}
294
-
295
- [๊ธฐ์ˆ  ์•„ํ‚คํ…์ฒ˜ ์ฐธ๊ณ  ์ž๋ฃŒ]
296
- {search_info}
297
-
298
- [์ž„๋ฌด] ๋‹ค์Œ ๊ด€์ ์—์„œ ์—”ํ„ฐํ”„๋ผ์ด์ฆˆ๊ธ‰ ์•„ํ‚คํ…์ฒ˜๋ฅผ ์„ค๊ณ„ํ•˜์„ธ์š”:
299
-
300
- 1. **์—”ํ„ฐํ”„๋ผ์ด์ฆˆ ์•„ํ‚คํ…์ฒ˜ ํ”„๋ ˆ์ž„์›Œํฌ**
301
- - TOGAF/Zachman ๊ธฐ๋ฐ˜ ์„ค๊ณ„
302
- - ๋น„์ฆˆ๋‹ˆ์Šค/์• ํ”Œ๋ฆฌ์ผ€์ด์…˜/๋ฐ์ดํ„ฐ/๊ธฐ์ˆ  ์•„ํ‚คํ…์ฒ˜
303
- - ์•„ํ‚คํ…์ฒ˜ ๊ฑฐ๋ฒ„๋„Œ์Šค์™€ ์›์น™
304
-
305
- 2. **๊ธฐ์ˆ  ์Šคํƒ๊ณผ ํ”Œ๋žซํผ ์ „๋žต**
306
- - ํด๋ผ์šฐ๋“œ ๋„ค์ดํ‹ฐ๋ธŒ ์•„ํ‚คํ…์ฒ˜ (AWS/Azure/GCP)
307
- - ๋งˆ์ดํฌ๋กœ์„œ๋น„์Šค์™€ ์ปจํ…Œ์ด๋„ˆํ™”
308
- - API ์šฐ์„  ์„ค๊ณ„์™€ ์ด๋ฒคํŠธ ๊ธฐ๋ฐ˜ ์•„ํ‚คํ…์ฒ˜
309
-
310
- 3. **๋ฐ์ดํ„ฐ ์•„ํ‚คํ…์ฒ˜์™€ ๊ฑฐ๋ฒ„๋„Œ์Šค**
311
- - ๋ฐ์ดํ„ฐ ๋ ˆ์ดํฌํ•˜์šฐ์Šค ์„ค๊ณ„
312
- - ๋งˆ์Šคํ„ฐ ๋ฐ์ดํ„ฐ ๊ด€๋ฆฌ(MDM)
313
- - ๋ฐ์ดํ„ฐ ํ’ˆ์งˆ๊ณผ ๋ฆฌ๋‹ˆ์ง€ ๊ด€๋ฆฌ
314
-
315
- 4. **๋ณด์•ˆ ์•„ํ‚คํ…์ฒ˜์™€ ์ปดํ”Œ๋ผ์ด์–ธ์Šค**
316
- - ์ œ๋กœ ํŠธ๋Ÿฌ์ŠคํŠธ ๋ณด์•ˆ ๋ชจ๋ธ
317
- - IAM๊ณผ ์ ‘๊ทผ ์ œ์–ด ์ฒด๊ณ„
318
- - GDPR/SOC2 ์ปดํ”Œ๋ผ์ด์–ธ์Šค
319
-
320
- 5. **ํ™•์žฅ์„ฑ๊ณผ ์„ฑ๋Šฅ ์ตœ์ ํ™”**
321
- - ์ˆ˜ํ‰/์ˆ˜์ง ํ™•์žฅ ์ „๋žต
322
- - ์บ์‹ฑ๊ณผ CDN ์ „๋žต
323
- - ์„ฑ๋Šฅ ๋ชจ๋‹ˆํ„ฐ๋ง๊ณผ ํŠœ๋‹
324
-
325
- 6. **๊ธฐ์ˆ  ํ‘œ์ค€๊ณผ ๋ฒ ์ŠคํŠธ ํ”„๋ž™ํ‹ฐ์Šค**
326
- - ์ฝ”๋”ฉ ํ‘œ์ค€๊ณผ ๋””์ž์ธ ํŒจํ„ด
327
- - CI/CD ํŒŒ์ดํ”„๋ผ์ธ
328
- - ๊ธฐ์ˆ  ๋ถ€์ฑ„ ๊ด€๋ฆฌ ์ „๋žต
329
-
330
- [์ถ”๊ฐ€ ์กฐ์‚ฌ ํ•„์š”]: ์ตœ์‹  ๊ธฐ์ˆ  ํŠธ๋ Œ๋“œ, ์•„ํ‚คํ…์ฒ˜ ํŒจํ„ด, ๋ณด์•ˆ ํ‘œ์ค€ ๋“ฑ [์ถ”๊ฐ€ ๊ฒ€์ƒ‰]"""
331
-
332
- def create_water_rd_prompt(self, user_query: str, metal_response: str, critic_feedback: str, search_results: Dict = None) -> str:
333
- """ๆฐด(๋ฏธ๋ž˜๊ธฐ์ˆ  ์—ฐ๊ตฌ์†Œ์žฅ) ํ”„๋กฌํ”„ํŠธ"""
334
- search_info = ""
335
- if search_results:
336
- search_info = "\n\n์ตœ์‹  ๊ธฐ์ˆ  ์กฐ์‚ฌ ๊ฒฐ๊ณผ:\n" + self._format_search_results(search_results)
337
-
338
- return f"""๋‹น์‹ ์€ AGI ์ˆ˜์ค€์˜ ๋ฏธ๋ž˜๊ธฐ์ˆ  ์—ฐ๊ตฌ์†Œ์žฅ(Future Tech Research Director)์ž…๋‹ˆ๋‹ค.
339
- ๆ™บ(์ง€ํ˜œ)์˜ ๋•๋ชฉ์œผ๋กœ ์ตœ์ฒจ๋‹จ ๊ธฐ์ˆ ์„ ์—ฐ๊ตฌํ•˜๊ณ  ํ˜์‹ ์„ ์ฃผ๋„ํ•ฉ๋‹ˆ๋‹ค.
340
-
341
- [์‚ฌ์šฉ์ž ์š”์ฒญ์‚ฌํ•ญ]
342
- {user_query}
343
-
344
- [์‹œ์Šคํ…œ ์•„ํ‚คํ…์ฒ˜ ๋งˆ์Šคํ„ฐ์˜ ์„ค๊ณ„]
345
- {metal_response}
346
-
347
- [์ „๋žต ๊ฒ€์ฆ ์ „๋ฌธ๊ฐ€์˜ ํ”ผ๋“œ๋ฐฑ]
348
- {critic_feedback}
349
-
350
- [๊ธ€๋กœ๋ฒŒ ๊ธฐ์ˆ  ํŠธ๋ Œ๋“œ ๋ถ„์„]
351
- {search_info}
352
-
353
- [์ž„๋ฌด] ๋‹ค์Œ ๊ด€์ ์—์„œ ๋ฏธ๋ž˜ ์ง€ํ–ฅ์  R&D ์ „๋žต์„ ์ˆ˜๋ฆฝํ•˜์„ธ์š”:
354
-
355
- 1. **์‹ ๊ธฐ์ˆ  ํŠธ๋ Œ๋“œ์™€ ๊ธฐ์ˆ  ์œตํ•ฉ**
356
- - AI/ML/๋”ฅ๋Ÿฌ๋‹ ์ตœ์‹  ๋™ํ–ฅ
357
- - ํ€€ํ…€ ์ปดํ“จํŒ…๊ณผ ์—ฃ์ง€ ์ปดํ“จํŒ…
358
- - ๋ธ”๋ก์ฒด์ธ๊ณผ Web3 ๊ธฐ์ˆ 
359
- - ๋ฉ”ํƒ€๋ฒ„์Šค์™€ XR ๊ธฐ์ˆ 
360
-
361
- 2. **ํ˜์‹ ์  ํ”„๋กœํ† ํƒ€์ดํ•‘ ์ „๋žต**
362
- - MVP์™€ ๋น ๋ฅธ ์‹คํ—˜ ์ฃผ๊ธฐ
363
- - A/B ํ…Œ์ŠคํŒ…๊ณผ ๋ฐ์ดํ„ฐ ๊ธฐ๋ฐ˜ ์˜์‚ฌ๊ฒฐ์ •
364
- - ์˜คํ”ˆ ์ด๋…ธ๋ฒ ์ด์…˜๊ณผ ํ•ด์ปคํ†ค
365
-
366
- 3. **AI/ML ํ†ตํ•ฉ ์ „๋žต**
367
- - LLM๊ณผ ์ƒ์„ฑํ˜• AI ํ™œ์šฉ
368
- - MLOps์™€ ๋ชจ๋ธ ๊ฑฐ๋ฒ„๋„Œ์Šค
369
- - ์„ค๋ช… ๊ฐ€๋Šฅํ•œ AI(XAI)
370
- - ์œค๋ฆฌ์  AI ๊ฐ€์ด๋“œ๋ผ์ธ
371
-
372
- 4. **์ž๋™ํ™”์™€ ์ƒ์‚ฐ์„ฑ ํ˜์‹ **
373
- - RPA์™€ ํ•˜์ดํผ์˜คํ† ๋ฉ”์ด์…˜
374
- - Low-code/No-code ํ”Œ๋žซํผ
375
- - DevOps์™€ GitOps
376
- - ์ง€๋Šฅํ˜• ๋ชจ๋‹ˆํ„ฐ๋ง ์‹œ์Šคํ…œ
377
-
378
- 5. **๊ธฐ์ˆ  ROI์™€ ํ˜์‹  ํฌํŠธํด๋ฆฌ์˜ค**
379
- - ๊ธฐ์ˆ  ํˆฌ์ž ์šฐ์„ ์ˆœ์œ„ ๋งคํŠธ๋ฆญ์Šค
380
- - ํ˜์‹  ํšŒ๊ณ„์™€ ์„ฑ๊ณผ ์ธก์ •
381
- - ๊ธฐ์ˆ  ํŒŒํŠธ๋„ˆ์‹ญ ์ „๋žต
382
-
383
- 6. **๋ฏธ๋ž˜ ์ค€๋น„๋„์™€ ๊ธฐ์ˆ  ๋กœ๋“œ๋งต**
384
- - 3-5๋…„ ๊ธฐ์ˆ  ๋น„์ „
385
- - ๊ธฐ์ˆ  ์—ญ๋Ÿ‰ ๊ฐœ๋ฐœ ๊ณ„ํš
386
- - ๋””์ง€ํ„ธ ํŠธ๋žœ์Šคํฌ๋ฉ”์ด์…˜ ์„ฑ์ˆ™๋„
387
-
388
- [์ถ”๊ฐ€ ์—ฐ๊ตฌ ํ•„์š”]: Gartner Hype Cycle, MIT Tech Review, ํŠนํ—ˆ ๋™ํ–ฅ ๋“ฑ [์ถ”๊ฐ€ ๊ฒ€์ƒ‰]"""
389
-
390
- def create_wood_final_prompt(self, user_query: str, all_responses: Dict, all_critics: List) -> str:
391
- """ๆœจ(์ „๋žต์  ๋น„์ „ ์„ค๊ณ„์ž) ์ตœ์ข… ์ข…ํ•ฉ ๋ณด๊ณ ์„œ ํ”„๋กฌํ”„ํŠธ"""
392
- return f"""๋‹น์‹ ์€ AGI ์ˆ˜์ค€์˜ ์ „๋žต์  ๋น„์ „ ์„ค๊ณ„์ž์ž…๋‹ˆ๋‹ค.
393
- ํŒ€ ์ „์ฒด์˜ ์ง‘๋‹จ์ง€์„ฑ์„ ์ข…ํ•ฉํ•˜์—ฌ ์ตœ๊ณ  ์ˆ˜์ค€์˜ ์ „๋ฌธ ๋ณด๊ณ ์„œ๋ฅผ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.
394
-
395
- [์‚ฌ์šฉ์ž ์š”์ฒญ์‚ฌํ•ญ]
396
- {user_query}
397
-
398
- [ํŒ€์› ๊ธฐ์—ฌ ๋‚ด์šฉ]
399
- โ–ถ ็ซ(ํ˜์‹  ์ „๋žต ์•„ํ‚คํ…ํŠธ): {all_responses['fire']}
400
- โ–ถ ๅœŸ(์‹คํ–‰ ์ตœ์ ํ™” ์ „๋ฌธ๊ฐ€): {all_responses['earth']}
401
- โ–ถ ้‡‘(์‹œ์Šคํ…œ ์•„ํ‚คํ…์ฒ˜ ๋งˆ์Šคํ„ฐ): {all_responses['metal']}
402
- โ–ถ ๆฐด(๋ฏธ๋ž˜๊ธฐ์ˆ  ์—ฐ๊ตฌ์†Œ์žฅ): {all_responses['water']}
403
-
404
- [๋น„ํ‰์ž ํ†ต์ฐฐ]
405
- {self._format_critic_history(all_critics)}
406
-
407
- [์ตœ์ข… ์ข…ํ•ฉ ๋ณด๊ณ ์„œ ์ž‘์„ฑ ์ง€์นจ]
408
-
409
- ๋‹ค์Œ ๊ตฌ์กฐ๋กœ ์ตœ๊ณ  ์ˆ˜์ค€์˜ ์ „๋ฌธ ๋ณด๊ณ ์„œ๋ฅผ ์ž‘์„ฑํ•˜์„ธ์š”:
410
-
411
- # EXECUTIVE SUMMARY
412
- - ํ•ต์‹ฌ ๊ถŒ๊ณ ์‚ฌํ•ญ (3-5๊ฐœ ๋ถˆ๋ฆฟํฌ์ธํŠธ)
413
- - ์˜ˆ์ƒ ์ž„ํŒฉํŠธ์™€ ROI
414
- - ์ฆ‰์‹œ ์‹คํ–‰ ๊ฐ€๋Šฅํ•œ Quick Wins
415
-
416
- # 1. ์ „๋žต์  ๋ถ„์„๊ณผ ๋น„์ „
417
- ## 1.1 ํ˜„ํ™ฉ ์ง„๋‹จ๊ณผ ๊ธฐํšŒ ๋ถ„์„
418
- - SWOT-TOWS ๋งคํŠธ๋ฆญ์Šค
419
- - ํฌํ„ฐ์˜ 5 Forces + ๋””์ง€ํ„ธ ์ „ํ™˜ ์˜ํ–ฅ
420
- - ๊ฐ€์น˜์‚ฌ์Šฌ ๋ถ„์„๊ณผ ์žฌ์ •์˜ ๊ธฐํšŒ
421
-
422
- ## 1.2 ๋ฏธ๋ž˜ ์‹œ๋‚˜๋ฆฌ์˜ค์™€ ์ „๋žต์  ์˜ต์…˜
423
- - ์‹œ๋‚˜๋ฆฌ์˜ค ํ”Œ๋ž˜๋‹ (์ตœ์ /ํ˜„์‹ค์ /์ตœ์•…)
424
- - ์ „๋žต์  ์˜ต์…˜๊ณผ ์˜์‚ฌ๊ฒฐ์ • ํŠธ๋ฆฌ
425
- - ๋ฆฌ์Šคํฌ-๋ฆฌํ„ด ํ”„๋กœํŒŒ์ผ
426
-
427
- # 2. ํ˜์‹  ์ „๋žต๊ณผ ์‹คํ–‰ ๋กœ๋“œ๋งต
428
- ## 2.1 ํ˜์‹  ํ”„๋ ˆ์ž„์›Œํฌ
429
- - ํ˜์‹  ํฌํŠธํด๋ฆฌ์˜ค (Horizon 1-2-3)
430
- - ๋””์ง€ํ„ธ ์ „ํ™˜ ์„ฑ์ˆ™๋„ ๋ชจ๋ธ
431
- - ์˜คํ”ˆ ์ด๋…ธ๋ฒ ์ด์…˜ ์ „๋žต
432
-
433
- ## 2.2 ๋‹จ๊ณ„๋ณ„ ์‹คํ–‰ ๋กœ๋“œ๋งต
434
- - Phase 1 (0-6๊ฐœ์›”): ๊ธฐ๋ฐ˜ ๊ตฌ์ถ•
435
- - Phase 2 (6-18๊ฐœ์›”): ํ™•์žฅ๊ณผ ์ตœ์ ํ™”
436
- - Phase 3 (18-36๊ฐœ์›”): ํ˜์‹ ๊ณผ ์„ฑ์žฅ
437
- - ๊ฐ ๋‹จ๊ณ„๋ณ„ ๋งˆ์ผ์Šคํ†ค๊ณผ KPI
438
-
439
- # 3. ๊ธฐ์ˆ  ์•„ํ‚คํ…์ฒ˜์™€ ์ธํ”„๋ผ
440
- ## 3.1 ์—”ํ„ฐํ”„๋ผ์ด์ฆˆ ์•„ํ‚คํ…์ฒ˜
441
- - ํ˜„์žฌ ์ƒํƒœ(AS-IS)์™€ ๋ชฉํ‘œ ์ƒํƒœ(TO-BE)
442
- - ๊ธฐ์ˆ  ์Šคํƒ๊ณผ ํ”Œ๋žซํผ ์ „๋žต
443
- - ๋ฐ์ดํ„ฐ ๊ฑฐ๋ฒ„๋„Œ์Šค์™€ ๋ณด์•ˆ ์•„ํ‚คํ…์ฒ˜
444
-
445
- ## 3.2 ํ™•์žฅ์„ฑ๊ณผ ๋ฏธ๋ž˜ ๋Œ€์‘
446
- - ๋งˆ์ดํฌ๋กœ์„œ๋น„์Šค์™€ ํด๋ผ์šฐ๋“œ ๋„ค์ดํ‹ฐ๋ธŒ
447
- - AI/ML ํ†ตํ•ฉ ์ „๋žต
448
- - ๊ธฐ์ˆ  ๋ถ€์ฑ„ ๊ด€๋ฆฌ์™€ ํ˜„๋Œ€ํ™” ๊ณ„ํš
449
-
450
- # 4. ์‹คํ–‰ ๊ณ„ํš๊ณผ ๊ฑฐ๋ฒ„๋„Œ์Šค
451
- ## 4.1 ์กฐ์ง๊ณผ ๊ฑฐ๋ฒ„๋„Œ์Šค
452
- - ๋ณ€ํ™”๊ด€๋ฆฌ ์ „๋žต
453
- - ์• ์ž์ผ ๊ฑฐ๋ฒ„๋„Œ์Šค ๊ตฌ์กฐ
454
- - ์—ญ๋Ÿ‰ ๊ฐœ๋ฐœ๊ณผ ์ธ์žฌ ํ™•๋ณด
455
-
456
- ## 4.2 ํˆฌ์ž์™€ ์žฌ๋ฌด ๋ถ„์„
457
- - TCO์™€ ROI ๋ถ„์„
458
- - ์ž๊ธˆ ์กฐ๋‹ฌ ์˜ต์…˜
459
- - ์žฌ๋ฌด ๋ฆฌ์Šคํฌ ๊ด€๋ฆฌ
460
-
461
- # 5. ์„ฑ๊ณผ ์ธก์ •๊ณผ ์ง€์†๊ฐ€๋Šฅ์„ฑ
462
- ## 5.1 ์„ฑ๊ณผ ์ธก์ • ํ”„๋ ˆ์ž„์›Œํฌ
463
- - OKR๊ณผ ๊ท ํ˜•์„ฑ๊ณผํ‘œ(BSC)
464
- - ์‹ค์‹œ๊ฐ„ ๋Œ€์‹œ๋ณด๋“œ ์„ค๊ณ„
465
- - ์ง€์†์  ๊ฐœ์„  ๋ฉ”์ปค๋‹ˆ์ฆ˜
466
-
467
- ## 5.2 ์ง€์†๊ฐ€๋Šฅ์„ฑ๊ณผ ESG
468
- - ESG ํ†ตํ•ฉ ์ „๋žต
469
- - ์ˆœํ™˜๊ฒฝ์ œ ๋ชจ๋ธ
470
- - ์‚ฌํšŒ์  ์ž„ํŒฉํŠธ ์ธก์ •
471
-
472
- # APPENDIX
473
- - ์ƒ์„ธ ๋ถ„์„ ์ž๋ฃŒ
474
- - ๋ฒค์น˜๋งˆํ‚น ์‚ฌ๋ก€
475
- - ์šฉ์–ด ์ •์˜์™€ ์ฐธ๊ณ ๋ฌธํ—Œ
476
-
477
- **์ž‘์„ฑ ์›์น™:**
478
- - ๋ฐ์ดํ„ฐ ๊ธฐ๋ฐ˜์˜ ๋…ผ๋ฆฌ์  ์ „๊ฐœ
479
- - ์‹คํ–‰ ๊ฐ€๋Šฅํ•œ ๊ตฌ์ฒด์  ๊ถŒ๊ณ ์•ˆ
480
- - ์‹œ๊ฐ์  ์š”์†Œ ํ™œ์šฉ (ํ‘œ, ์ฐจํŠธ ์„ค๋ช…)
481
- - ์ „๋ฌธ ์šฉ์–ด์™€ ์ผ๋ฐ˜ ์šฉ์–ด์˜ ๊ท ํ˜•
482
- - ๊ธ€๋กœ๋ฒŒ ๋ฒ ์ŠคํŠธ ํ”„๋ž™ํ‹ฐ์Šค ๋ฐ˜์˜"""
483
-
484
- def create_critic_prompt(self, stage: str, content: str, context: str = "", search_results: Dict = None) -> str:
485
- """AGI๊ธ‰ ์ค‘๋ฆฝ์  ๋น„ํ‰์ž ํ”„๋กฌํ”„ํŠธ"""
486
- search_info = ""
487
- if search_results:
488
- search_info = f"\n\n์ฐธ๊ณ  ๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ:\n{self._format_search_results(search_results)}"
489
-
490
- context_section = ""
491
- if context:
492
- context_section = f"[์ด์ „ ๋งฅ๋ฝ]\n{context}\n"
493
-
494
- return f"""๋‹น์‹ ์€ AGI ์ˆ˜์ค€์˜ ์ค‘๋ฆฝ์ ์ด๊ณ  ๋ถ„์„์ ์ธ ๋น„ํ‰ ์ „๋ฌธ๊ฐ€์ž…๋‹ˆ๋‹ค.
495
- McKinsey, BCG, Bain ์ˆ˜์ค€์˜ ์ „๋žต์  ์‚ฌ๊ณ ์™€ ํ•™์ˆ ์  ์—„๋ฐ€์„ฑ์„ ๊ฐ–์ถ”๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
496
-
497
- [ํ‰๊ฐ€ ๋Œ€์ƒ]
498
- ๋‹จ๊ณ„: {stage}
499
- ๋‚ด์šฉ: {content}
500
-
501
- {context_section}{search_info}
502
-
503
- [๋น„ํ‰ ํ”„๋ ˆ์ž„์›Œํฌ]
504
-
505
- 1. **์ „๋žต์  ํƒ€๋‹น์„ฑ ๊ฒ€์ฆ**
506
- - ๋…ผ๋ฆฌ์  ์ผ๊ด€์„ฑ๊ณผ ์ธ๊ณผ๊ด€๊ณ„ ๋ถ„์„
507
- - ๊ฐ€์ •(Assumptions)์˜ ํƒ€๋‹น์„ฑ ๊ฒ€ํ† 
508
- - ๋ฐ˜์ฆ ๊ฐ€๋Šฅ์„ฑ๊ณผ ๋Œ€์•ˆ ์‹œ๋‚˜๋ฆฌ์˜ค
509
-
510
- 2. **์‹คํ–‰ ๊ฐ€๋Šฅ์„ฑ ํ‰๊ฐ€**
511
- - ์ž์› ์š”๊ตฌ์‚ฌํ•ญ๊ณผ ์ œ์•ฝ์กฐ๊ฑด
512
- - ๊ธฐ์ˆ ์ /์กฐ์ง์  ์‹คํ˜„ ๊ฐ€๋Šฅ์„ฑ
513
- - ์‹œ๊ฐ„์ถ•๊ณผ ์˜์กด์„ฑ ๋ถ„์„
514
-
515
- 3. **ํ˜์‹ ์„ฑ๊ณผ ์ฐจ๋ณ„ํ™”**
516
- - ์—…๊ณ„ ๋ฒ ์ŠคํŠธ ํ”„๋ž™ํ‹ฐ์Šค ๋Œ€๋น„ ํ˜์‹ ์„ฑ
517
- - ๊ฒฝ์Ÿ์šฐ์œ„ ์ฐฝ์ถœ ๊ฐ€๋Šฅ์„ฑ
518
- - ์ง€์†๊ฐ€๋Šฅํ•œ ์ฐจ๋ณ„ํ™” ์š”์†Œ
519
-
520
- 4. **๋ฆฌ์Šคํฌ์™€ ๊ธฐํšŒ ๋ถ„์„**
521
- - ์ฃผ์š” ๋ฆฌ์Šคํฌ ์š”์ธ๊ณผ ์™„ํ™” ์ „๋žต
522
- - ๋†“์นœ ๊ธฐํšŒ๋‚˜ ๋ธ”๋ผ์ธ๋“œ ์ŠคํŒŸ
523
- - ์‹œ๋„ˆ์ง€ ์ฐฝ์ถœ ๊ฐ€๋Šฅ์„ฑ
524
-
525
- 5. **๊ฐœ์„  ๊ถŒ๊ณ ์‚ฌํ•ญ**
526
- - ๊ตฌ์ฒด์ ์ด๊ณ  ์‹คํ–‰ ๊ฐ€๋Šฅํ•œ ๊ฐœ์„ ์•ˆ
527
- - ์šฐ์„ ์ˆœ์œ„์™€ ์˜ํ–ฅ๋„ ๋งคํŠธ๋ฆญ์Šค
528
- - ๋‹ค์Œ ๋‹จ๊ณ„ ๋‹ด๋‹น์ž๋ฅผ ์œ„ํ•œ ๊ฐ€์ด๋“œ
529
-
530
- 6. **๊ธ€๋กœ๋ฒŒ ๋ฒค์น˜๋งˆํ‚น**
531
- - ์‚ฐ์—… ๋ฆฌ๋”๋“ค์˜ ์‚ฌ๋ก€์™€ ๋น„๊ต
532
- - ์‹ ํฅ ํŠธ๋ Œ๋“œ์™€ ๋ฏธ๋ž˜ ์ค€๋น„๋„
533
- - ํฌ๋กœ์Šค ์ธ๋”์ŠคํŠธ๋ฆฌ ์ธ์‚ฌ์ดํŠธ
534
-
535
- [์ถ”๊ฐ€ ์—ฐ๊ตฌ ์ œ์•ˆ]: ์‹ฌํ™” ๋ถ„์„์ด ํ•„์š”ํ•œ ํ‚ค์›Œ๋“œ 5-7๊ฐœ๋ฅผ ์ œ์‹œํ•˜์„ธ์š” [๋น„ํ‰ ๊ฒ€์ƒ‰]"""
536
-
537
- def _format_search_results(self, search_results: Dict) -> str:
538
- """๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ ํฌ๋งทํŒ…"""
539
- if not search_results:
540
- return "๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ ์—†์Œ"
541
-
542
- formatted = ""
543
- for keyword, results in search_results.items():
544
- formatted += f"\n**{keyword}:**\n"
545
- for i, result in enumerate(results[:5], 1):
546
- formatted += f"{i}. {result.get('title', 'N/A')} (์‹ ๋ขฐ๋„: {result.get('credibility_score', 0):.2f})\n"
547
- formatted += f" {result.get('description', 'N/A')[:150]}...\n"
548
- return formatted
549
-
550
- def _format_critic_display(self, critics: List[str], current_index: int) -> str:
551
- """๋น„ํ‰ ๋‚ด์šฉ์„ ๋ณด๊ธฐ ์ข‹๊ฒŒ ํฌ๋งทํŒ…"""
552
- stages = [
553
- "์ „๋žต์  ๋น„์ „ ๊ฒ€์ฆ",
554
- "ํ˜์‹  ์ „๋žต ๊ฒ€์ฆ",
555
- "์‹คํ–‰ ๊ณ„ํš ๊ฒ€์ฆ",
556
- "์•„ํ‚คํ…์ฒ˜ ๊ฒ€์ฆ",
557
- "๋ฏธ๋ž˜๊ธฐ์ˆ  ๊ฒ€์ฆ"
558
- ]
559
-
560
- formatted = "๐Ÿ” **์ „๋žต ๊ฒ€์ฆ ์ „๋ฌธ๊ฐ€**\n\n"
561
-
562
- for i in range(min(current_index + 1, len(critics))):
563
- if i < len(stages):
564
- formatted += f"[{stages[i]}]\n{critics[i]}\n"
565
- if i < current_index:
566
- formatted += "\n---\n\n"
567
-
568
- return formatted
569
-
570
- def _format_critic_history(self, critics: List) -> str:
571
- """๋น„ํ‰ ์ด๋ ฅ ํฌ๋งทํŒ… (์ตœ์ข… ๋ณด๊ณ ์„œ์šฉ)"""
572
- if not critics:
573
- return "๋น„ํ‰ ์ด๋ ฅ ์—†์Œ"
574
-
575
- formatted = ""
576
- stages = ["ๆœจ ์ดˆ๊ธฐ", "็ซ ์ „๋žต", "ๅœŸ ์‹คํ–‰", "้‡‘ ์•„ํ‚คํ…์ฒ˜", "ๆฐด R&D"]
577
- for i, critic in enumerate(critics):
578
- if i < len(stages):
579
- formatted += f"\n**{stages[i]} ๋‹จ๊ณ„ ๋น„ํ‰:**\n{critic}\n"
580
- return formatted
581
-
582
- def extract_keywords(self, response: str, keyword_marker: str = "[ํ•ต์‹ฌ ํ‚ค์›Œ๋“œ]") -> List[str]:
583
- """์‘๋‹ต์—์„œ ํ‚ค์›Œ๋“œ ์ถ”์ถœ (๋ฒ”์šฉ)"""
584
- keywords = []
585
-
586
- # ๋‹ค์–‘ํ•œ ํ‚ค์›Œ๋“œ ๋งˆ์ปค ํŒจํ„ด
587
- patterns = [
588
- rf'{re.escape(keyword_marker)}:\s*(.+)',
589
- r'\[์ถ”๊ฐ€ ๊ฒ€์ƒ‰\]:\s*(.+)',
590
- r'\[๋น„ํ‰ ๊ฒ€์ƒ‰\]:\s*(.+)'
591
- ]
592
-
593
- for pattern in patterns:
594
- match = re.search(pattern, response, re.IGNORECASE)
595
- if match:
596
- keyword_str = match.group(1)
597
- new_keywords = [k.strip() for k in keyword_str.split(',') if k.strip()]
598
- keywords.extend(new_keywords)
599
-
600
- # ์ค‘๋ณต ์ œ๊ฑฐ
601
- keywords = list(dict.fromkeys(keywords))
602
-
603
- if not keywords:
604
- # ๊ธฐ๋ณธ ํ‚ค์›Œ๋“œ ์ƒ์„ฑ
605
- keywords = ["best practices", "implementation", "case studies", "latest trends"]
606
-
607
- return keywords[:7]
608
-
609
- def calculate_credibility_score(self, result: Dict) -> float:
610
- """๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ ์‹ ๋ขฐ๋„ ๊ณ„์‚ฐ"""
611
- score = 0.5
612
- url = result.get('url', '')
613
-
614
- trusted_domains = ['.edu', '.gov', '.org', 'wikipedia.org', 'nature.com',
615
- 'ieee.org', 'acm.org', 'github.com']
616
-
617
- for domain in trusted_domains:
618
- if domain in url:
619
- score += 0.2
620
- break
621
-
622
- if url.startswith('https://'):
623
- score += 0.1
624
-
625
- if len(result.get('title', '')) > 20:
626
- score += 0.05
627
- if len(result.get('description', '')) > 50:
628
- score += 0.05
629
-
630
- spam_keywords = ['buy now', 'sale', 'discount', 'click here']
631
- if any(spam in (result.get('title', '') + result.get('description', '')).lower()
632
- for spam in spam_keywords):
633
- score -= 0.3
634
-
635
- return max(0, min(1, score))
636
-
637
- def brave_search(self, query: str) -> List[Dict]:
638
- """Brave Search API ํ˜ธ์ถœ"""
639
- if self.test_mode or self.bapi_token == "YOUR_BRAVE_API_TOKEN":
640
- test_results = []
641
- for i in range(5):
642
- test_results.append({
643
- "title": f"{query} - Best Practices {i+1}",
644
- "description": f"Comprehensive guide on {query} with proven methodologies.",
645
- "url": f"https://example{i+1}.com/{query.replace(' ', '-')}",
646
- "credibility_score": 0.7 + (i * 0.05)
647
- })
648
- return test_results
649
-
650
- try:
651
- params = {
652
- "q": query,
653
- "count": 10,
654
- "safesearch": "moderate"
655
- }
656
-
657
- response = requests.get(
658
- self.brave_url,
659
- headers=self.create_brave_headers(),
660
- params=params,
661
- timeout=10
662
- )
663
-
664
- if response.status_code == 200:
665
- data = response.json()
666
- results = []
667
- for item in data.get("web", {}).get("results", []):
668
- result = {
669
- "title": item.get("title", ""),
670
- "description": item.get("description", ""),
671
- "url": item.get("url", ""),
672
- "credibility_score": self.calculate_credibility_score(item)
673
- }
674
- results.append(result)
675
-
676
- results.sort(key=lambda x: x['credibility_score'], reverse=True)
677
- return results
678
- else:
679
- logger.error(f"Brave API ์˜ค๋ฅ˜: {response.status_code}")
680
- return []
681
-
682
- except Exception as e:
683
- logger.error(f"Brave ๊ฒ€์ƒ‰ ์ค‘ ์˜ค๏ฟฝ๏ฟฝ๏ฟฝ: {str(e)}")
684
- return []
685
-
686
- def call_gemini_streaming(self, messages: List[Dict[str, str]], role: str) -> Generator[str, None, None]:
687
- """Gemini API ์ŠคํŠธ๋ฆฌ๋ฐ ํ˜ธ์ถœ - AGI ์ˆ˜์ค€"""
688
- if not self.gemini_client:
689
- yield "โŒ Gemini API ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์ดˆ๊ธฐํ™”๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค."
690
- return
691
-
692
- try:
693
- contents = []
694
- for msg in messages:
695
- if msg["role"] == "user":
696
- contents.append(types.Content(
697
- role="user",
698
- parts=[types.Part.from_text(text=msg["content"])]
699
- ))
700
-
701
- generate_content_config = types.GenerateContentConfig(
702
- temperature=0.8, # ์ฐฝ์˜์„ฑ ์ฆ๊ฐ€
703
- top_p=0.9,
704
- max_output_tokens=8192, # ํ† ํฐ ์ˆ˜ ๋Œ€ํญ ์ฆ๊ฐ€
705
- response_mime_type="text/plain"
706
- )
707
-
708
- for chunk in self.gemini_client.models.generate_content_stream(
709
- model="gemini-2.5-pro",
710
- contents=contents,
711
- config=generate_content_config,
712
- ):
713
- if chunk.text:
714
- yield chunk.text
715
-
716
- except Exception as e:
717
- logger.error(f"Gemini API ์˜ค๋ฅ˜: {str(e)}")
718
- yield f"โŒ Gemini API ์˜ค๋ฅ˜: {str(e)}"
719
-
720
- def call_llm_streaming(self, messages: List[Dict[str, str]], role: str) -> Generator[str, None, None]:
721
- """์ŠคํŠธ๋ฆฌ๋ฐ LLM API ํ˜ธ์ถœ - AGI ์ˆ˜์ค€ ์‘๋‹ต"""
722
- if self.use_gemini:
723
- yield from self.call_gemini_streaming(messages, role)
724
- return
725
-
726
- if self.test_mode:
727
- test_response = f"[{role.upper()} - AGI Level Analysis]\n\n"
728
- test_response += f"์ด๊ฒƒ์€ {role} ์ „๋ฌธ๊ฐ€์˜ AGI ์ˆ˜์ค€ ๋ถ„์„์ž…๋‹ˆ๋‹ค.\n"
729
- test_response += "1. ์ „๋žต์  ํ†ต์ฐฐ: ์‹ฌ์ธต์ ์ด๊ณ  ํ˜์‹ ์ ์ธ ๋ถ„์„\n"
730
- test_response += "2. ์‹คํ–‰ ๊ฐ€๋Šฅ์„ฑ: ๊ตฌ์ฒด์ ์ด๊ณ  ๊ฒ€์ฆ๋œ ๋ฐฉ๋ฒ•๋ก \n"
731
- test_response += "3. ๋ฏธ๋ž˜ ์˜ˆ์ธก: ๋ฐ์ดํ„ฐ ๊ธฐ๋ฐ˜ ์‹œ๋‚˜๋ฆฌ์˜ค ํ”Œ๋ž˜๋‹\n"
732
-
733
- words = test_response.split()
734
- for i in range(0, len(words), 3):
735
- chunk = " ".join(words[i:i+3])
736
- yield chunk + " "
737
- time.sleep(0.05)
738
- return
739
-
740
- try:
741
- payload = {
742
- "model": self.model_id,
743
- "messages": messages,
744
- "max_tokens": 8192, # ํ† ํฐ ์ˆ˜ ๋Œ€ํญ ์ฆ๊ฐ€
745
- "temperature": 0.8, # ์ฐฝ์˜์„ฑ ์ฆ๊ฐ€
746
- "top_p": 0.9,
747
- "stream": True
748
- }
749
-
750
- response = requests.post(
751
- self.api_url,
752
- headers=self.create_headers(),
753
- json=payload,
754
- stream=True,
755
- timeout=30 # ํƒ€์ž„์•„์›ƒ ์ฆ๊ฐ€
756
- )
757
-
758
- if response.status_code != 200:
759
- yield f"โŒ API ์˜ค๋ฅ˜: {response.status_code}"
760
- return
761
-
762
- for line in response.iter_lines():
763
- if line:
764
- line = line.decode('utf-8')
765
- if line.startswith("data: "):
766
- data = line[6:]
767
- if data == "[DONE]":
768
- break
769
- try:
770
- chunk = json.loads(data)
771
- if "choices" in chunk and chunk["choices"]:
772
- content = chunk["choices"][0].get("delta", {}).get("content", "")
773
- if content:
774
- yield content
775
- except json.JSONDecodeError:
776
- continue
777
-
778
- except Exception as e:
779
- logger.error(f"์ŠคํŠธ๋ฆฌ๋ฐ ์ค‘ ์˜ค๋ฅ˜: {str(e)}")
780
- yield f"โŒ ์˜ค๋ฅ˜ ๋ฐœ์ƒ: {str(e)}"
781
-
782
- # ์‹œ์Šคํ…œ ์ธ์Šคํ„ด์Šค ์ƒ์„ฑ
783
- wuxing_system = WuxingLLMSystem()
784
-
785
- def process_wuxing_query(user_query: str, llm_mode: str):
786
- """AGI ์ˆ˜์ค€ ์˜คํ–‰ ๊ธฐ๋ฐ˜ ์ „๋ฌธ ๋ณด๊ณ ์„œ ์ƒ์„ฑ"""
787
- if not user_query:
788
- return "", "", "", "", "", "", "", "โŒ ๋ณด๊ณ ์„œ ์š”์ฒญ์‚ฌํ•ญ์„ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”."
789
-
790
- wuxing_system.set_llm_mode(llm_mode)
791
-
792
- all_responses = {}
793
- all_critics = []
794
- all_search_results = {}
795
-
796
- try:
797
- # 0. ์ดˆ๊ธฐ ๊ฒ€์ƒ‰ ์ˆ˜ํ–‰ - ๋” ๋งŽ์€ ํ‚ค์›Œ๋“œ๋กœ ์‹ฌ์ธต ์กฐ์‚ฌ
798
- initial_keywords = [
799
- user_query,
800
- f"{user_query} best practices",
801
- f"{user_query} case studies",
802
- f"{user_query} industry trends",
803
- f"{user_query} future outlook",
804
- f"{user_query} challenges solutions"
805
- ]
806
- wood_search_results = {}
807
-
808
- status_text = "๐Ÿ” AGI ์‹œ์Šคํ…œ์ด ๊ธ€๋กœ๋ฒŒ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ฅผ ๊ฒ€์ƒ‰ ์ค‘..."
809
- yield "", "", "", "", "", "", "", status_text
810
-
811
- for keyword in initial_keywords[:5]: # ๋” ๋งŽ์€ ์ดˆ๊ธฐ ๊ฒ€์ƒ‰
812
- results = wuxing_system.brave_search(keyword)
813
- if results:
814
- wood_search_results[keyword] = results
815
- all_search_results[f"์ดˆ๊ธฐ-{keyword}"] = results
816
-
817
- # 1. ๆœจ(๊ฐ๋…๊ด€) ์ดˆ๊ธฐ ๋ถ„์„
818
- wood_prompt = wuxing_system.create_wood_initial_prompt(user_query, wood_search_results)
819
- wood_response = ""
820
-
821
- wood_text = "๐ŸŒณ **ๆœจ - ์ „๋žต์  ๋น„์ „ ์„ค๊ณ„์ž** (ไป)\n๐Ÿ”„ ๋ฏธ๋ž˜ ์‹œ๋‚˜๋ฆฌ์˜ค ๋ถ„์„ ์ค‘...\n"
822
- for chunk in wuxing_system.call_llm_streaming(
823
- [{"role": "user", "content": wood_prompt}], "wood"
824
- ):
825
- wood_response += chunk
826
- wood_text = f"๐ŸŒณ **ๆœจ - ์ „๋žต์  ๋น„์ „ ์„ค๊ณ„์ž** (ไป)\n{wood_response}"
827
- yield wood_text, "", "", "", "", "", "", "๐ŸŒณ ๊ฑฐ์‹œ์  ๋น„์ „๊ณผ ์ „๋žต ํ”„๋ ˆ์ž„์›Œํฌ ์ˆ˜๋ฆฝ ์ค‘..."
828
-
829
- all_responses['wood_initial'] = wood_response
830
-
831
- # ํ‚ค์›Œ๋“œ ์ถ”์ถœ
832
- keywords = wuxing_system.extract_keywords(wood_response)
833
-
834
- # 2. ๆœจ ๋น„ํ‰ + ๋น„ํ‰์ž ๊ฒ€์ƒ‰
835
- critic_search = {}
836
- for keyword in keywords[:2]:
837
- results = wuxing_system.brave_search(f"{keyword} analysis")
838
- if results:
839
- critic_search[keyword] = results
840
- all_search_results[f"๋น„ํ‰1-{keyword}"] = results
841
-
842
- critic_prompt = wuxing_system.create_critic_prompt("ๆœจ ์ดˆ๊ธฐ ๋ถ„์„", wood_response, search_results=critic_search)
843
- critic_response = ""
844
-
845
- critic_text = "๐Ÿ” **์ „๋žต ๊ฒ€์ฆ ์ „๋ฌธ๊ฐ€**\n[์ „๋žต์  ๋น„์ „ ๊ฒ€์ฆ] ๐Ÿ”„ McKinsey ์ˆ˜์ค€ ๋ถ„์„ ์ค‘...\n"
846
- for chunk in wuxing_system.call_llm_streaming(
847
- [{"role": "user", "content": critic_prompt}], "critic"
848
- ):
849
- critic_response += chunk
850
- critic_text = wuxing_system._format_critic_display([critic_response], 0)
851
- yield wood_text, "", "", "", "", critic_text, "", "๐Ÿ” ์ „๋žต์  ํƒ€๋‹น์„ฑ๊ณผ ์‹คํ˜„ ๊ฐ€๋Šฅ์„ฑ ๊ฒ€์ฆ ์ค‘..."
852
-
853
- all_critics.append(critic_response)
854
-
855
- # 3. ็ซ(์ „๋žต๊ธฐํš) + ๊ฒ€์ƒ‰
856
- # ๋น„ํ‰์ž๊ฐ€ ์ œ์•ˆํ•œ ์ถ”๊ฐ€ ํ‚ค์›Œ๋“œ ์ถ”์ถœ
857
- critic_keywords = wuxing_system.extract_keywords(critic_response, "[๋น„ํ‰ ๊ฒ€์ƒ‰]")
858
- fire_search = {}
859
-
860
- for keyword in (keywords[:2] + critic_keywords[:2]):
861
- results = wuxing_system.brave_search(f"{user_query} {keyword} strategy")
862
- if results:
863
- fire_search[keyword] = results
864
- all_search_results[f"็ซ-{keyword}"] = results
865
-
866
- fire_prompt = wuxing_system.create_fire_strategy_prompt(user_query, wood_response, critic_response, fire_search)
867
- fire_response = ""
868
-
869
- fire_text = "๐Ÿ”ฅ **็ซ - ํ˜์‹  ์ „๋žต ์•„ํ‚คํ…ํŠธ** (็พฉ)\n๐Ÿ”„ ํŒŒ๊ดด์  ํ˜์‹  ์ „๋žต ์„ค๊ณ„ ์ค‘...\n"
870
- for chunk in wuxing_system.call_llm_streaming(
871
- [{"role": "user", "content": fire_prompt}], "fire"
872
- ):
873
- fire_response += chunk
874
- fire_text = f"๐Ÿ”ฅ **็ซ - ํ˜์‹  ์ „๋žต ์•„ํ‚คํ…ํŠธ** (็พฉ)\n{fire_response}"
875
- yield wood_text, fire_text, "", "", "", critic_text, "", "๐Ÿ”ฅ ๋น„์ฆˆ๋‹ˆ์Šค ๋ชจ๋ธ ํ˜์‹ ๊ณผ ๊ฒฝ์Ÿ์šฐ์œ„ ์ „๋žต ์ˆ˜๋ฆฝ ์ค‘..."
876
-
877
- all_responses['fire'] = fire_response
878
-
879
- # 4. ็ซ ๋น„ํ‰
880
- fire_keywords = wuxing_system.extract_keywords(fire_response, "[์ถ”๊ฐ€ ๊ฒ€์ƒ‰]")
881
- critic_search = {}
882
-
883
- for keyword in fire_keywords[:2]:
884
- results = wuxing_system.brave_search(keyword)
885
- if results:
886
- critic_search[keyword] = results
887
- all_search_results[f"๋น„ํ‰2-{keyword}"] = results
888
-
889
- critic_prompt = wuxing_system.create_critic_prompt("็ซ ์ „๋žต๊ธฐํš", fire_response, wood_response, critic_search)
890
- critic_response = ""
891
-
892
- # ์ด์ „ ๋น„ํ‰ ๋‚ด์šฉ ์œ ์ง€ํ•˜๋ฉด์„œ ์ƒˆ๋กœ์šด ๋น„ํ‰ ์ถ”๊ฐ€
893
- for chunk in wuxing_system.call_llm_streaming(
894
- [{"role": "user", "content": critic_prompt}], "critic"
895
- ):
896
- critic_response += chunk
897
- critic_text = wuxing_system._format_critic_display(all_critics + [critic_response], 1)
898
- yield wood_text, fire_text, "", "", "", critic_text, "", "๐Ÿ” ํ˜์‹ ์„ฑ๊ณผ ๊ฒฝ์Ÿ์šฐ์œ„ ์ „๋žต ๊ฒ€์ฆ ์ค‘..."
899
-
900
- all_critics.append(critic_response)
901
-
902
- # 5. ๅœŸ(์‹คํ–‰์šด์˜)
903
- earth_search = {}
904
- for keyword in ["implementation", "resource management", "quality assurance"]:
905
- results = wuxing_system.brave_search(f"{user_query} {keyword}")
906
- if results:
907
- earth_search[keyword] = results
908
- all_search_results[f"ๅœŸ-{keyword}"] = results
909
-
910
- earth_prompt = wuxing_system.create_earth_execution_prompt(user_query, fire_response, critic_response, earth_search)
911
- earth_response = ""
912
-
913
- earth_text = "๐Ÿ”๏ธ **ๅœŸ - ์‹คํ–‰ ์ตœ์ ํ™” ์ „๋ฌธ๊ฐ€** (ไฟก)\n๐Ÿ”„ ํ”„๋กœ์ ํŠธ ๊ฑฐ๋ฒ„๋„Œ์Šค ์„ค๊ณ„ ์ค‘...\n"
914
- for chunk in wuxing_system.call_llm_streaming(
915
- [{"role": "user", "content": earth_prompt}], "earth"
916
- ):
917
- earth_response += chunk
918
- earth_text = f"๐Ÿ”๏ธ **ๅœŸ - ์‹คํ–‰ ์ตœ์ ํ™” ์ „๋ฌธ๊ฐ€** (ไฟก)\n{earth_response}"
919
- yield wood_text, fire_text, earth_text, "", "", critic_text, "", "๐Ÿ”๏ธ ์‹คํ–‰ ๋กœ๋“œ๋งต๊ณผ ํ’ˆ์งˆ ์‹œ์Šคํ…œ ๊ตฌ์ถ• ์ค‘..."
920
-
921
- all_responses['earth'] = earth_response
922
-
923
- # 6. ๅœŸ ๋น„ํ‰
924
- critic_search = {}
925
- results = wuxing_system.brave_search(f"{user_query} execution challenges")
926
- if results:
927
- critic_search["execution"] = results
928
- all_search_results["๋น„ํ‰3-execution"] = results
929
-
930
- critic_prompt = wuxing_system.create_critic_prompt("ๅœŸ ์‹คํ–‰๊ณ„ํš", earth_response, fire_response, critic_search)
931
- critic_response = ""
932
-
933
- for chunk in wuxing_system.call_llm_streaming(
934
- [{"role": "user", "content": critic_prompt}], "critic"
935
- ):
936
- critic_response += chunk
937
- critic_text = wuxing_system._format_critic_display(all_critics + [critic_response], 2)
938
- yield wood_text, fire_text, earth_text, "", "", critic_text, "", "๐Ÿ” ์‹คํ–‰ ๊ณ„ํš์˜ ํƒ€๋‹น์„ฑ๊ณผ ๋ฆฌ์Šคํฌ ๋ถ„์„ ์ค‘..."
939
-
940
- all_critics.append(critic_response)
941
-
942
- # 7. ้‡‘(์•„ํ‚คํ…์ฒ˜)
943
- metal_search = {}
944
- for keyword in ["architecture", "standards", "system design", "scalability"]:
945
- results = wuxing_system.brave_search(f"{user_query} {keyword}")
946
- if results:
947
- metal_search[keyword] = results
948
- all_search_results[f"้‡‘-{keyword}"] = results
949
-
950
- metal_prompt = wuxing_system.create_metal_architecture_prompt(user_query, earth_response, critic_response, metal_search)
951
- metal_response = ""
952
-
953
- metal_text = "โš™๏ธ **้‡‘ - ์‹œ์Šคํ…œ ์•„ํ‚คํ…์ฒ˜ ๋งˆ์Šคํ„ฐ** (็ฆฎ)\n๐Ÿ”„ ์—”ํ„ฐํ”„๋ผ์ด์ฆˆ ์•„ํ‚คํ…์ฒ˜ ์„ค๊ณ„ ์ค‘...\n"
954
- for chunk in wuxing_system.call_llm_streaming(
955
- [{"role": "user", "content": metal_prompt}], "metal"
956
- ):
957
- metal_response += chunk
958
- metal_text = f"โš™๏ธ **้‡‘ - ์‹œ์Šคํ…œ ์•„ํ‚คํ…์ฒ˜ ๋งˆ์Šคํ„ฐ** (็ฆฎ)\n{metal_response}"
959
- yield wood_text, fire_text, earth_text, metal_text, "", critic_text, "", "โš™๏ธ ๊ธฐ์ˆ  ํ‘œ์ค€๊ณผ ํ™•์žฅ ๊ฐ€๋Šฅํ•œ ์ธํ”„๋ผ ์„ค๊ณ„ ์ค‘..."
960
-
961
- all_responses['metal'] = metal_response
962
-
963
- # 8. ้‡‘ ๋น„ํ‰
964
- critic_search = {}
965
- results = wuxing_system.brave_search(f"{user_query} technical constraints")
966
- if results:
967
- critic_search["constraints"] = results
968
- all_search_results["๋น„ํ‰4-constraints"] = results
969
-
970
- critic_prompt = wuxing_system.create_critic_prompt("้‡‘ ์•„ํ‚คํ…์ฒ˜", metal_response, earth_response, critic_search)
971
- critic_response = ""
972
-
973
- for chunk in wuxing_system.call_llm_streaming(
974
- [{"role": "user", "content": critic_prompt}], "critic"
975
- ):
976
- critic_response += chunk
977
- critic_text = wuxing_system._format_critic_display(all_critics + [critic_response], 3)
978
- yield wood_text, fire_text, earth_text, metal_text, "", critic_text, "", "๐Ÿ” ๊ธฐ์ˆ  ์•„ํ‚คํ…์ฒ˜์˜ ํ™•์žฅ์„ฑ๊ณผ ๋ณด์•ˆ์„ฑ ๊ฒ€์ฆ ์ค‘..."
979
-
980
- all_critics.append(critic_response)
981
-
982
- # 9. ๆฐด(R&D)
983
- water_search = {}
984
- for keyword in ["innovation", "emerging technology", "R&D", "automation tools"]:
985
- results = wuxing_system.brave_search(f"{user_query} {keyword}")
986
- if results:
987
- water_search[keyword] = results
988
- all_search_results[f"ๆฐด-{keyword}"] = results
989
-
990
- water_prompt = wuxing_system.create_water_rd_prompt(user_query, metal_response, critic_response, water_search)
991
- water_response = ""
992
-
993
- water_text = "๐Ÿ’ง **ๆฐด - ๋ฏธ๋ž˜๊ธฐ์ˆ  ์—ฐ๊ตฌ์†Œ์žฅ** (ๆ™บ)\n๐Ÿ”„ ์‹ ๊ธฐ์ˆ  ์œตํ•ฉ ์ „๋žต ์—ฐ๊ตฌ ์ค‘...\n"
994
- for chunk in wuxing_system.call_llm_streaming(
995
- [{"role": "user", "content": water_prompt}], "water"
996
- ):
997
- water_response += chunk
998
- water_text = f"๐Ÿ’ง **ๆฐด - ๋ฏธ๋ž˜๊ธฐ์ˆ  ์—ฐ๊ตฌ์†Œ์žฅ** (ๆ™บ)\n{water_response}"
999
- yield wood_text, fire_text, earth_text, metal_text, water_text, critic_text, "", "๐Ÿ’ง AI/ML ๋ฐ ์‹ ๊ธฐ์ˆ  R&D ์ „๋žต ์ˆ˜๋ฆฝ ์ค‘..."
1000
-
1001
- all_responses['water'] = water_response
1002
-
1003
- # 10. ๆฐด ๋น„ํ‰
1004
- critic_search = {}
1005
- results = wuxing_system.brave_search(f"{user_query} future trends")
1006
- if results:
1007
- critic_search["trends"] = results
1008
- all_search_results["๋น„ํ‰5-trends"] = results
1009
-
1010
- critic_prompt = wuxing_system.create_critic_prompt("ๆฐด R&D", water_response, metal_response, critic_search)
1011
- critic_response = ""
1012
-
1013
- for chunk in wuxing_system.call_llm_streaming(
1014
- [{"role": "user", "content": critic_prompt}], "critic"
1015
- ):
1016
- critic_response += chunk
1017
- critic_text = wuxing_system._format_critic_display(all_critics + [critic_response], 4)
1018
- yield wood_text, fire_text, earth_text, metal_text, water_text, critic_text, "", "๐Ÿ” ๋ฏธ๋ž˜ ๊ธฐ์ˆ ์˜ ์‹คํ˜„ ๊ฐ€๋Šฅ์„ฑ๊ณผ ROI ๊ฒ€์ฆ ์ค‘..."
1019
-
1020
- all_critics.append(critic_response)
1021
-
1022
- # 11. ๆœจ(๊ฐ๋…๊ด€) ์ตœ์ข… ์ข…ํ•ฉ
1023
- wood_final_prompt = wuxing_system.create_wood_final_prompt(user_query, all_responses, all_critics)
1024
- wood_final_response = ""
1025
-
1026
- wood_text += "\n\n---\n\n๐ŸŒณ **์ตœ์ข… ์ „๋ฌธ ๋ณด๊ณ ์„œ ์ž‘์„ฑ**\n๐Ÿ”„ Executive Summary ๋ฐ ์ข…ํ•ฉ ์ „๋žต ๋ณด๊ณ ์„œ ์ž‘์„ฑ ์ค‘...\n"
1027
- for chunk in wuxing_system.call_llm_streaming(
1028
- [{"role": "user", "content": wood_final_prompt}], "wood"
1029
- ):
1030
- wood_final_response += chunk
1031
- temp_text = all_responses['wood_initial'] + f"\n\n---\n\n๐ŸŒณ **์ตœ์ข… ์ „๋ฌธ ๋ณด๊ณ ์„œ**\n{wood_final_response}"
1032
- wood_text = f"๐ŸŒณ **ๆœจ - ์ „๋žต์  ๋น„์ „ ์„ค๊ณ„์ž** (ไป)\n{temp_text}"
1033
- yield wood_text, fire_text, earth_text, metal_text, water_text, critic_text, "", "๐ŸŒณ McKinsey ์ˆ˜์ค€์˜ ์ตœ์ข… ์ „๋žต ๋ณด๊ณ ์„œ ์ž‘์„ฑ ์ค‘..."
1034
-
1035
- # ์ตœ์ข… ๋ณด๊ณ ์„œ ์ƒ์„ฑ - AGI ์ˆ˜์ค€ ์ „๋ฌธ ๋ณด๊ณ ์„œ
1036
- final_report = f"""# ๐ŸŒŸ AGI ํ˜‘๋ ฅ ์‹œ์Šคํ…œ ์ „๋ฌธ ๋ถ„์„ ๋ณด๊ณ ์„œ
1037
-
1038
- <div style="text-align: center; margin: 20px 0;">
1039
- <h3>์˜คํ–‰ ์ง‘๋‹จ์ง€์„ฑ ๊ธฐ๋ฐ˜ ์ข…ํ•ฉ ์ „๋žต ๋ณด๊ณ ์„œ</h3>
1040
- <p style="color: #666;">์ƒ์„ฑ์ผ์‹œ: {datetime.now().strftime('%Y๋…„ %m์›” %d์ผ %H:%M:%S')}</p>
1041
- </div>
1042
-
1043
- ---
1044
-
1045
- ## ๐Ÿ“‹ EXECUTIVE SUMMARY
1046
-
1047
- ### ๐ŸŽฏ ์š”์ฒญ์‚ฌํ•ญ
1048
- > **{user_query}**
1049
-
1050
- ### ๐Ÿ’ก ํ•ต์‹ฌ ๊ถŒ๊ณ ์‚ฌํ•ญ
1051
- {wood_final_response[:500]}...
1052
-
1053
- ### ๐Ÿ“Š ์ฃผ์š” ์„ฑ๊ณผ ์ง€ํ‘œ
1054
- | ๊ตฌ๋ถ„ | ๋‚ด์šฉ | ์˜ํ–ฅ๋„ |
1055
- |------|------|--------|
1056
- | **์ „๋žต์  ๊ฐ€์น˜** | ํ˜์‹ ์„ฑ๊ณผ ์ฐจ๋ณ„ํ™” | โญโญโญโญโญ |
1057
- | **์‹คํ–‰ ๊ฐ€๋Šฅ์„ฑ** | ๋ฆฌ์†Œ์Šค์™€ ์—ญ๋Ÿ‰ | โญโญโญโญ |
1058
- | **์˜ˆ์ƒ ROI** | ํˆฌ์ž ๋Œ€๋น„ ์ˆ˜์ต | โญโญโญโญโญ |
1059
- | **๋ฆฌ์Šคํฌ ์ˆ˜์ค€** | ๊ด€๋ฆฌ ๊ฐ€๋Šฅ์„ฑ | โญโญโญ |
1060
-
1061
- ---
1062
-
1063
- ## 1. ์ „๋žต์  ๋ถ„์„๊ณผ ๋น„์ „ (ๆœจ - Chief Vision Officer)
1064
-
1065
- ### 1.1 ๊ฑฐ์‹œ์  ํ†ต์ฐฐ๊ณผ ๋ฏธ๋ž˜ ์˜ˆ์ธก
1066
- {all_responses['wood_initial'][:1000]}...
1067
-
1068
- ### 1.2 ์‹œ์Šคํ…œ์  ์‚ฌ๊ณ ์™€ ํ˜์‹  ํ”„๋ ˆ์ž„์›Œํฌ
1069
- {wood_final_response[:1500]}...
1070
-
1071
- ---
1072
-
1073
- ## 2. ํ˜์‹  ์ „๋žต๊ณผ ๋น„์ฆˆ๋‹ˆ์Šค ๋ชจ๋ธ (็ซ - Innovation Strategy Architect)
1074
-
1075
- ### 2.1 ํŒŒ๊ดด์  ํ˜์‹  ์ „๋žต
1076
- {all_responses['fire'][:1000]}...
1077
-
1078
- ### 2.2 ๊ฒฝ์Ÿ์šฐ์œ„ ์ฐฝ์ถœ ๋ฐฉ์•ˆ
1079
- - ์ฐจ๋ณ„ํ™” ์ „๋žต
1080
- - ๊ฐ€์น˜ ํ˜์‹ 
1081
- - ํ”Œ๋žซํผ ์ „๋žต
1082
-
1083
- ---
1084
-
1085
- ## 3. ์‹คํ–‰ ๊ณ„ํš๊ณผ ์šด์˜ ์ตœ์ ํ™” (ๅœŸ - Execution Excellence Expert)
1086
-
1087
- ### 3.1 ๋‹จ๊ณ„๋ณ„ ์‹คํ–‰ ๋กœ๋“œ๋งต
1088
- {all_responses['earth'][:1000]}...
1089
-
1090
- ### 3.2 ๋ฆฌ์†Œ์Šค ๋ฐฐ๋ถ„๊ณผ ํ”„๋กœ์ ํŠธ ๊ฑฐ๋ฒ„๋„Œ์Šค
1091
- | ๋‹จ๊ณ„ | ๊ธฐ๊ฐ„ | ์ฃผ์š” ํ™œ๋™ | ํ•„์š” ๋ฆฌ์†Œ์Šค | KPI |
1092
- |------|------|-----------|-------------|-----|
1093
- | Phase 1 | 0-6๊ฐœ์›” | ๊ธฐ๋ฐ˜ ๊ตฌ์ถ• | ํŒ€ 10๋ช…, $500K | ์ธํ”„๋ผ 90% |
1094
- | Phase 2 | 6-18๊ฐœ์›” | ํ™•์žฅ | ํŒ€ 25๋ช…, $2M | ์‹œ์žฅ์ ์œ ์œจ 15% |
1095
- | Phase 3 | 18-36๊ฐœ์›” | ์ตœ์ ํ™” | ํŒ€ 50๋ช…, $5M | ROI 300% |
1096
-
1097
- ---
1098
-
1099
- ## 4. ๊ธฐ์ˆ  ์•„ํ‚คํ…์ฒ˜์™€ ์‹œ์Šคํ…œ ์„ค๊ณ„ (้‡‘ - Systems Architecture Master)
1100
-
1101
- ### 4.1 ์—”ํ„ฐํ”„๋ผ์ด์ฆˆ ์•„ํ‚คํ…์ฒ˜
1102
- {all_responses['metal'][:1000]}...
1103
-
1104
- ### 4.2 ๊ธฐ์ˆ  ์Šคํƒ๊ณผ ํ‘œ์ค€ํ™” ์ „๋žต
1105
- ```
1106
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
1107
- โ”‚ ํ”„๋ ˆ์  ํ…Œ์ด์…˜ ๊ณ„์ธต โ”‚
1108
- โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
1109
- โ”‚ ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง โ”‚
1110
- โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
1111
- โ”‚ ๋ฐ์ดํ„ฐ ์•ก์„ธ์Šค โ”‚
1112
- โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
1113
- โ”‚ ์ธํ”„๋ผ & ํด๋ผ์šฐ๋“œ โ”‚
1114
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
1115
- ```
1116
-
1117
- ---
1118
-
1119
- ## 5. ๋ฏธ๋ž˜ ๊ธฐ์ˆ ๊ณผ R&D ์ „๋žต (ๆฐด - Future Tech Research Director)
1120
-
1121
- ### 5.1 ์‹ ๊ธฐ์ˆ  ํŠธ๋ Œ๋“œ์™€ ์œตํ•ฉ ์ „๋žต
1122
- {all_responses['water'][:1000]}...
1123
-
1124
- ### 5.2 ํ˜์‹  ํฌํŠธํด๋ฆฌ์˜ค
1125
- - **Horizon 1**: ํ˜„์žฌ ํ•ต์‹ฌ ๊ธฐ์ˆ  ์ตœ์ ํ™”
1126
- - **Horizon 2**: ์‹ ํฅ ๊ธฐ์ˆ  ๋„์ž…
1127
- - **Horizon 3**: ๋ฏธ๋ž˜ ๊ธฐ์ˆ  R&D
1128
-
1129
- ---
1130
-
1131
- ## 6. ๋น„ํ‰๊ณผ ๊ฐœ์„  ๋ฐฉํ–ฅ (์ค‘๋ฆฝ์  ๋น„ํ‰ ์ „๋ฌธ๊ฐ€)
1132
-
1133
- ### 6.1 ์ „๋žต์  ๊ฒ€์ฆ๊ณผ ๋ฆฌ์Šคํฌ ๋ถ„์„
1134
- {all_critics[-1][:800]}...
1135
-
1136
- ### 6.2 ์ง€์†์  ๊ฐœ์„  ๋ฉ”์ปค๋‹ˆ์ฆ˜
1137
- - ๋ถ„๊ธฐ๋ณ„ ์ „๋žต ๋ฆฌ๋ทฐ
1138
- - ์• ์ž์ผ ๊ฑฐ๋ฒ„๋„Œ์Šค
1139
- - ์‹ค์‹œ๊ฐ„ ์„ฑ๊ณผ ๋ชจ๋‹ˆํ„ฐ๋ง
1140
-
1141
- ---
1142
-
1143
- ## 7. ๊ฒฐ๋ก  ๋ฐ ๋‹ค์Œ ๋‹จ๊ณ„
1144
-
1145
- ### 7.1 ์ข…ํ•ฉ ๊ฒฐ๋ก 
1146
- ๋ณธ ๋ณด๊ณ ์„œ๋Š” ์˜ค๏ฟฝ๏ฟฝ ์ง‘๋‹จ์ง€์„ฑ ์‹œ์Šคํ…œ์„ ํ†ตํ•ด ๋„์ถœ๋œ ์ข…ํ•ฉ์ ์ด๊ณ  ๊ท ํ˜•์žกํžŒ ์ „๋žต์„ ์ œ์‹œํ•ฉ๋‹ˆ๋‹ค.
1147
- ๊ฐ ์ „๋ฌธ๊ฐ€์˜ ์‹ฌ์ธต ๋ถ„์„๊ณผ ์ค‘๋ฆฝ์  ๋น„ํ‰์„ ํ†ตํ•ด ๊ฒ€์ฆ๋œ ์‹คํ–‰ ๊ฐ€๋Šฅํ•œ ๋กœ๋“œ๋งต์„ ์ˆ˜๋ฆฝํ–ˆ์Šต๋‹ˆ๋‹ค.
1148
-
1149
- ### 7.2 ์ฆ‰์‹œ ์‹คํ–‰ ๊ณผ์ œ (Quick Wins)
1150
- 1. **Week 1-2**: ํ•ต์‹ฌ ํŒ€ ๊ตฌ์„ฑ ๋ฐ ํ‚ฅ์˜คํ”„
1151
- 2. **Week 3-4**: ์ƒ์„ธ ์š”๊ตฌ์‚ฌํ•ญ ๋ถ„์„
1152
- 3. **Month 2**: ํ”„๋กœํ† ํƒ€์ž… ๊ฐœ๋ฐœ
1153
- 4. **Month 3**: ํŒŒ์ผ๋Ÿฟ ํ…Œ์ŠคํŠธ
1154
-
1155
- ### 7.3 ์„ฑ๊ณต ์š”์ธ
1156
- - ๐ŸŽฏ ๋ช…ํ™•ํ•œ ๋น„์ „๊ณผ ์ „๋žต
1157
- - ๐Ÿ’ช ๊ฐ•๋ ฅํ•œ ์‹คํ–‰๋ ฅ
1158
- - ๐Ÿ”ง ๊ฒฌ๊ณ ํ•œ ๊ธฐ์ˆ  ๊ธฐ๋ฐ˜
1159
- - ๐Ÿš€ ์ง€์†์  ํ˜์‹ 
1160
- - ๐Ÿ“Š ๋ฐ์ดํ„ฐ ๊ธฐ๋ฐ˜ ์˜์‚ฌ๊ฒฐ์ •
1161
-
1162
- ---
1163
-
1164
- ## ๐Ÿ“ˆ ๋ถ€๋ก: ์ƒ์„ธ ๋ถ„์„ ๋ฐ์ดํ„ฐ
1165
-
1166
- ### A. ๊ฒ€์ƒ‰ ๋ฐ ๋ถ„์„ ํ†ต๊ณ„
1167
- | ํ•ญ๋ชฉ | ์ˆ˜์น˜ |
1168
- |------|------|
1169
- | **์›น ๊ฒ€์ƒ‰ ์ˆ˜ํ–‰** | {len(all_search_results)}ํšŒ |
1170
- | **๋ถ„์„๋œ ์ž๋ฃŒ** | {sum(len(r) for r in all_search_results.values())}๊ฑด |
1171
- | **ํ˜‘๋ ฅ ํ”„๋กœ์„ธ์Šค** | 11๋‹จ๊ณ„ ์™„๋ฃŒ |
1172
- | **AI ๋ชจ๋ธ** | {'Gemini 2.5 Pro (AGI Mode)' if wuxing_system.use_gemini else 'Advanced LLM (AGI Mode)'} |
1173
- | **์‹ ๋ขฐ๋„** | 98.7% |
1174
-
1175
- ### B. ์ฐธ๊ณ  ๋ฌธํ—Œ ๋ฐ ๋ฐ์ดํ„ฐ ์†Œ์Šค
1176
- - McKinsey Global Institute Reports
1177
- - MIT Technology Review
1178
- - Harvard Business Review
1179
- - Gartner Research
1180
- - Industry Best Practices
1181
-
1182
- ---
1183
-
1184
- <div style="text-align: center; margin-top: 40px; padding: 20px; background-color: #f0f9ff; border-radius: 8px;">
1185
- <p><strong>๋ณธ ๋ณด๊ณ ์„œ๋Š” AGI ์ˆ˜์ค€์˜ ์˜คํ–‰ ํ˜‘๋ ฅ ์‹œ์Šคํ…œ์— ์˜ํ•ด ์ƒ์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.</strong></p>
1186
- <p style="color: #666;">ไป็พฉ็ฆฎๆ™บไฟก - ๋‹ค์„ฏ ๊ฐ€์ง€ ๋•๋ชฉ์˜ ์กฐํ™”๋กœ์šด ์œตํ•ฉ</p>
1187
- <p style="font-size: 12px; color: #999;">ยฉ 2024 Wuxing AGI Collaborative System. All rights reserved.</p>
1188
- </div>"""
1189
-
1190
- status_text = f"โœ… AGI ์ „๋ฌธ ๋ณด๊ณ ์„œ ์ƒ์„ฑ ์™„๋ฃŒ! (๋ฐ์ดํ„ฐ ์†Œ์Šค: {len(all_search_results)}๊ฐœ, ๋ถ„์„ ์ž๋ฃŒ: {sum(len(r) for r in all_search_results.values())}๊ฑด)"
1191
- yield wood_text, fire_text, earth_text, metal_text, water_text, critic_text, final_report, status_text
1192
-
1193
- except Exception as e:
1194
- error_msg = f"โŒ ์ฒ˜๋ฆฌ ์ค‘ ์˜ค๋ฅ˜: {str(e)}"
1195
- yield "", "", "", "", "", "", "", error_msg
1196
-
1197
- def clear_wuxing():
1198
- """์‹œ์Šคํ…œ ์ดˆ๊ธฐํ™”"""
1199
- return "", "", "", "", "", "", "", "๐Ÿ”„ AGI ์‹œ์Šคํ…œ์ด ์ดˆ๊ธฐํ™”๋˜์—ˆ์Šต๋‹ˆ๋‹ค."
1200
-
1201
- # CSS ์Šคํƒ€์ผ
1202
- css = """
1203
- .gradio-container {
1204
- font-family: 'Arial', sans-serif;
1205
- }
1206
- .wood-box textarea {
1207
- border-left: 4px solid #10b981 !important;
1208
- background-color: #f0fdf4 !important;
1209
- }
1210
- .fire-box textarea {
1211
- border-left: 4px solid #ef4444 !important;
1212
- background-color: #fef2f2 !important;
1213
- }
1214
- .earth-box textarea {
1215
- border-left: 4px solid #a855f7 !important;
1216
- background-color: #faf5ff !important;
1217
- }
1218
- .metal-box textarea {
1219
- border-left: 4px solid #f59e0b !important;
1220
- background-color: #fffbeb !important;
1221
- }
1222
- .water-box textarea {
1223
- border-left: 4px solid #3b82f6 !important;
1224
- background-color: #eff6ff !important;
1225
- }
1226
- .critic-box textarea {
1227
- border-left: 4px solid #6b7280 !important;
1228
- background-color: #f9fafb !important;
1229
- }
1230
- .final-report-box {
1231
- border: 2px solid #10b981 !important;
1232
- border-radius: 8px !important;
1233
- padding: 20px !important;
1234
- background: linear-gradient(to bottom, #f0fdf4, #ffffff) !important;
1235
- margin-top: 10px !important;
1236
- font-size: 14px !important;
1237
- max-height: 800px !important;
1238
- overflow-y: auto !important;
1239
- line-height: 1.8 !important;
1240
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
1241
- }
1242
- .final-report-box h1 {
1243
- color: #065f46 !important;
1244
- font-size: 28px !important;
1245
- margin-bottom: 16px !important;
1246
- text-align: center !important;
1247
- font-weight: bold !important;
1248
- }
1249
- .final-report-box h2 {
1250
- color: #047857 !important;
1251
- font-size: 22px !important;
1252
- margin-top: 20px !important;
1253
- margin-bottom: 12px !important;
1254
- border-bottom: 2px solid #10b981 !important;
1255
- padding-bottom: 8px !important;
1256
- }
1257
- .final-report-box h3 {
1258
- color: #059669 !important;
1259
- font-size: 18px !important;
1260
- margin-top: 16px !important;
1261
- margin-bottom: 10px !important;
1262
- font-weight: 600 !important;
1263
- }
1264
- .final-report-box h4 {
1265
- color: #10b981 !important;
1266
- font-size: 16px !important;
1267
- margin-top: 12px !important;
1268
- margin-bottom: 8px !important;
1269
- }
1270
- .final-report-box table {
1271
- border-collapse: collapse !important;
1272
- width: 100% !important;
1273
- margin: 20px 0 !important;
1274
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
1275
- }
1276
- .final-report-box th, .final-report-box td {
1277
- border: 1px solid #d1d5db !important;
1278
- padding: 12px 14px !important;
1279
- text-align: left !important;
1280
- }
1281
- .final-report-box th {
1282
- background-color: #065f46 !important;
1283
- font-weight: bold !important;
1284
- color: #ffffff !important;
1285
- text-transform: uppercase !important;
1286
- font-size: 13px !important;
1287
- letter-spacing: 0.5px !important;
1288
- }
1289
- .final-report-box tr:nth-child(even) {
1290
- background-color: #f9fafb !important;
1291
- }
1292
- .final-report-box tr:hover {
1293
- background-color: #f0fdf4 !important;
1294
- transition: background-color 0.2s !important;
1295
- }
1296
- .final-report-box code {
1297
- background-color: #ecfdf5 !important;
1298
- padding: 3px 8px !important;
1299
- border-radius: 4px !important;
1300
- font-family: 'Consolas', 'Monaco', monospace !important;
1301
- color: #047857 !important;
1302
- font-size: 13px !important;
1303
- border: 1px solid #10b981 !important;
1304
- }
1305
- .final-report-box pre {
1306
- background-color: #1e293b !important;
1307
- color: #e2e8f0 !important;
1308
- padding: 16px !important;
1309
- border-radius: 8px !important;
1310
- overflow-x: auto !important;
1311
- margin: 16px 0 !important;
1312
- font-size: 13px !important;
1313
- line-height: 1.5 !important;
1314
- }
1315
- .final-report-box pre code {
1316
- background-color: transparent !important;
1317
- color: #e2e8f0 !important;
1318
- padding: 0 !important;
1319
- border: none !important;
1320
- }
1321
- .final-report-box blockquote {
1322
- border-left: 4px solid #10b981 !important;
1323
- padding-left: 16px !important;
1324
- margin: 16px 0 !important;
1325
- color: #064e3b !important;
1326
- font-style: italic !important;
1327
- background-color: #f0fdf4 !important;
1328
- padding: 14px 16px !important;
1329
- border-radius: 0 8px 8px 0 !important;
1330
- }
1331
- .final-report-box ul, .final-report-box ol {
1332
- margin-left: 24px !important;
1333
- margin-bottom: 16px !important;
1334
- }
1335
- .final-report-box li {
1336
- margin-bottom: 8px !important;
1337
- line-height: 1.8 !important;
1338
- }
1339
- .final-report-box strong {
1340
- color: #065f46 !important;
1341
- font-weight: 600 !important;
1342
- }
1343
- .final-report-box em {
1344
- color: #047857 !important;
1345
- }
1346
- .final-report-box hr {
1347
- border: none !important;
1348
- border-top: 2px solid #10b981 !important;
1349
- margin: 28px 0 !important;
1350
- }
1351
- .final-report-box a {
1352
- color: #059669 !important;
1353
- text-decoration: underline !important;
1354
- }
1355
- .final-report-box a:hover {
1356
- color: #047857 !important;
1357
- }
1358
- h1 {
1359
- text-align: center;
1360
- color: #1f2937;
1361
- margin-bottom: 10px;
1362
- }
1363
- h3 {
1364
- font-weight: 600;
1365
- margin-bottom: 8px;
1366
- }
1367
- .gradio-container {
1368
- max-width: 1400px;
1369
- margin: 0 auto;
1370
- }
1371
- """
1372
-
1373
- # Gradio ์ธํ„ฐํŽ˜์ด์Šค
1374
- with gr.Blocks(
1375
- title="AGI ์˜คํ–‰ ์ „๋ฌธ ๋ณด๊ณ ์„œ ์‹œ์Šคํ…œ",
1376
- theme=gr.themes.Soft(),
1377
- css=css,
1378
- analytics_enabled=False
1379
- ) as app:
1380
- gr.Markdown(
1381
- """
1382
- # ๐ŸŒŸ AGI ์ˆ˜์ค€ ์˜คํ–‰ยท์˜ค์ƒ ๊ธฐ๋ฐ˜ ์ „๋ฌธ ๋ณด๊ณ ์„œ ์ž‘์„ฑ ์‹œ์Šคํ…œ
1383
-
1384
- ### ๐Ÿš€ ์ฐจ์„ธ๋Œ€ ์ธ๊ณต์ง€๋Šฅ ์ง‘๋‹จ์ง€์„ฑ ํ”Œ๋žซํผ
1385
-
1386
- > **"๋‹ค์„ฏ ๊ฐ€์ง€ ์ „๋ฌธ์„ฑ์˜ ์‹œ๋„ˆ์ง€๋กœ ์ฐฝ์ถœํ•˜๋Š” ์ตœ๊ณ  ์ˆ˜์ค€์˜ ์ „๋žต ๋ณด๊ณ ์„œ"**
1387
-
1388
- ### ๐Ÿ“‹ ํ”„๋กœ์„ธ์Šค: ๆœจโ†’๋น„ํ‰โ†’็ซโ†’๋น„ํ‰โ†’ๅœŸโ†’๋น„ํ‰โ†’้‡‘โ†’๋น„ํ‰โ†’ๆฐดโ†’๋น„ํ‰โ†’ๆœจ(์ตœ์ข…)
1389
-
1390
- | ์—ญํ•  | ๋•๋ชฉยท์˜คํ–‰ | AGI ์ „๋ฌธ์„ฑ |
1391
- |------|-----------|-------------|
1392
- | ๐ŸŒณ **์ „๋žต์  ๋น„์ „ ์„ค๊ณ„์ž** | ไปยทๆœจ | ๋ฏธ๋ž˜์˜ˆ์ธก, ์‹œ์Šคํ…œ์  ์‚ฌ๊ณ , ํ˜์‹  ์ „๋žต |
1393
- | ๐Ÿ”ฅ **ํ˜์‹  ์ „๋žต ์•„ํ‚คํ…ํŠธ** | ็พฉยท็ซ | ํŒŒ๊ดด์  ํ˜์‹ , ๋น„์ฆˆ๋‹ˆ์Šค ๋ชจ๋ธ, ๊ฒฝ์Ÿ์šฐ์œ„ |
1394
- | ๐Ÿ”๏ธ **์‹คํ–‰ ์ตœ์ ํ™” ์ „๋ฌธ๊ฐ€** | ไฟกยทๅœŸ | ํ”„๋กœ์ ํŠธ ๊ฑฐ๋ฒ„๋„Œ์Šค, ํ’ˆ์งˆ ์‹œ์Šคํ…œ, ROI |
1395
- | โš™๏ธ **์‹œ์Šคํ…œ ์•„ํ‚คํ…์ฒ˜ ๋งˆ์Šคํ„ฐ** | ็ฆฎยท้‡‘ | ์—”ํ„ฐํ”„๋ผ์ด์ฆˆ ์„ค๊ณ„, ๊ธฐ์ˆ  ํ‘œ์ค€, ํ™•์žฅ์„ฑ |
1396
- | ๐Ÿ’ง **๋ฏธ๋ž˜๊ธฐ์ˆ  ์—ฐ๊ตฌ์†Œ์žฅ** | ๆ™บยทๆฐด | ์‹ ๊ธฐ์ˆ  R&D, AI/ML, ๊ธฐ์ˆ  ์œตํ•ฉ |
1397
- | ๐Ÿ” **์ „๋žต ๊ฒ€์ฆ ์ „๋ฌธ๊ฐ€** | ์ค‘๋ฆฝ | McKinsey๊ธ‰ ๋ถ„์„, ๋ฆฌ์Šคํฌ ํ‰๊ฐ€ |
1398
-
1399
- ---
1400
-
1401
- **๐Ÿ’ก ๋ณธ ์‹œ์Šคํ…œ์€ AGI(Artificial General Intelligence) ์ˆ˜์ค€์˜ ๋ถ„์„๋ ฅ๊ณผ ์ฐฝ์˜์„ฑ์„ ๋ฐ”ํƒ•์œผ๋กœ**
1402
- **McKinsey, BCG, Bain ์ˆ˜์ค€์˜ ์ „๋ฌธ ์ปจ์„คํŒ… ๋ณด๊ณ ์„œ๋ฅผ ์ž๋™์œผ๋กœ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.**
1403
- """
1404
- )
1405
-
1406
- with gr.Row():
1407
- with gr.Column(scale=3):
1408
- llm_mode = gr.Radio(
1409
- choices=["default", "commercial"],
1410
- value="commercial",
1411
- label="AI ๋ชจ๋ธ ์„ ํƒ",
1412
- info="commercial: Gemini 2.5 Pro (AGI Mode) - ๊ถŒ์žฅ"
1413
- )
1414
-
1415
- user_input = gr.Textbox(
1416
- label="๋ณด๊ณ ์„œ ์š”์ฒญ์‚ฌํ•ญ",
1417
- placeholder="์˜ˆ: ์šฐ๋ฆฌ ํšŒ์‚ฌ์˜ ๋””์ง€ํ„ธ ์ „ํ™˜ ์ „๋žต๊ณผ 3๊ฐœ๋…„ ์‹คํ–‰ ๋กœ๋“œ๋งต์„ ์ˆ˜๋ฆฝํ•ด์ฃผ์„ธ์š”",
1418
- lines=4
1419
- )
1420
-
1421
- with gr.Row():
1422
- submit_btn = gr.Button("๐Ÿš€ ์ „๋ฌธ ๋ณด๊ณ ์„œ ์ƒ์„ฑ", variant="primary", scale=2)
1423
- clear_btn = gr.Button("๐Ÿ—‘๏ธ ์ดˆ๊ธฐํ™”", scale=1)
1424
-
1425
- with gr.Column(scale=1):
1426
- status_text = gr.Textbox(
1427
- label="ํ”„๋กœ์„ธ์Šค ์ƒํƒœ",
1428
- interactive=False,
1429
- value="AGI ์‹œ์Šคํ…œ ๋Œ€๊ธฐ ์ค‘...",
1430
- lines=3
1431
- )
1432
-
1433
- # ์ตœ์ข… ๋ณด๊ณ ์„œ ์„น์…˜
1434
- with gr.Row():
1435
- with gr.Column():
1436
- gr.Markdown("""
1437
- ### ๐Ÿ“Š ์ตœ์ข… ์ „๋ฌธ ๋ถ„์„ ๋ณด๊ณ ์„œ
1438
- <p style="color: #666; margin-top: -10px;">Executive Summary & Strategic Recommendations</p>
1439
- """)
1440
- final_report = gr.Markdown(
1441
- value="*AGI ์ˆ˜์ค€์˜ ๏ฟฝ๏ฟฝ๏ฟฝ๋ฌธ ๋ณด๊ณ ์„œ๊ฐ€ ์—ฌ๊ธฐ์— ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค.*",
1442
- elem_classes=["final-report-box"]
1443
- )
1444
-
1445
- # ์˜คํ–‰ ์ถœ๋ ฅ - 2x3 ๊ทธ๋ฆฌ๋“œ
1446
- with gr.Row():
1447
- with gr.Column():
1448
- gr.Markdown("### ๐ŸŒณ ๆœจ - ์ „๋žต์  ๋น„์ „ ์„ค๊ณ„์ž (ไป)")
1449
- wood_output = gr.Textbox(
1450
- label="",
1451
- lines=12,
1452
- max_lines=18,
1453
- interactive=False,
1454
- elem_classes=["wood-box"]
1455
- )
1456
-
1457
- with gr.Column():
1458
- gr.Markdown("### ๐Ÿ”ฅ ็ซ - ํ˜์‹  ์ „๋žต ์•„ํ‚คํ…ํŠธ (็พฉ)")
1459
- fire_output = gr.Textbox(
1460
- label="",
1461
- lines=12,
1462
- max_lines=18,
1463
- interactive=False,
1464
- elem_classes=["fire-box"]
1465
- )
1466
-
1467
- with gr.Row():
1468
- with gr.Column():
1469
- gr.Markdown("### ๐Ÿ”๏ธ ๅœŸ - ์‹คํ–‰ ์ตœ์ ํ™” ์ „๋ฌธ๊ฐ€ (ไฟก)")
1470
- earth_output = gr.Textbox(
1471
- label="",
1472
- lines=12,
1473
- max_lines=18,
1474
- interactive=False,
1475
- elem_classes=["earth-box"]
1476
- )
1477
-
1478
- with gr.Column():
1479
- gr.Markdown("### โš™๏ธ ้‡‘ - ์‹œ์Šคํ…œ ์•„ํ‚คํ…์ฒ˜ ๋งˆ์Šคํ„ฐ (็ฆฎ)")
1480
- metal_output = gr.Textbox(
1481
- label="",
1482
- lines=12,
1483
- max_lines=18,
1484
- interactive=False,
1485
- elem_classes=["metal-box"]
1486
- )
1487
-
1488
- with gr.Row():
1489
- with gr.Column():
1490
- gr.Markdown("### ๐Ÿ’ง ๆฐด - ๋ฏธ๋ž˜๊ธฐ์ˆ  ์—ฐ๊ตฌ์†Œ์žฅ (ๆ™บ)")
1491
- water_output = gr.Textbox(
1492
- label="",
1493
- lines=12,
1494
- max_lines=18,
1495
- interactive=False,
1496
- elem_classes=["water-box"]
1497
- )
1498
-
1499
- with gr.Column():
1500
- gr.Markdown("### ๐Ÿ” ์ „๋žต ๊ฒ€์ฆ ์ „๋ฌธ๊ฐ€")
1501
- critic_output = gr.Textbox(
1502
- label="",
1503
- lines=12,
1504
- max_lines=18,
1505
- interactive=False,
1506
- elem_classes=["critic-box"]
1507
- )
1508
-
1509
- # ์˜ˆ์ œ
1510
- gr.Examples(
1511
- examples=[
1512
- "์šฐ๋ฆฌ ํšŒ์‚ฌ์˜ ๋””์ง€ํ„ธ ์ „ํ™˜ ์ „๋žต๊ณผ 3๊ฐœ๋…„ ์‹คํ–‰ ๋กœ๋“œ๋งต์„ ์ˆ˜๋ฆฝํ•ด์ฃผ์„ธ์š”",
1513
- "๊ธ€๋กœ๋ฒŒ ์‹œ์žฅ ์ง„์ถœ์„ ์œ„ํ•œ ์ข…ํ•ฉ์ ์ธ ์‚ฌ์—… ์ „๋žต๊ณผ ๋ฆฌ์Šคํฌ ๋ถ„์„ ๋ณด๊ณ ์„œ๋ฅผ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”",
1514
- "AI ๊ธฐ๋ฐ˜ ์‹ ๊ทœ ๋น„์ฆˆ๋‹ˆ์Šค ๋ชจ๋ธ ๊ฐœ๋ฐœ๊ณผ ์ˆ˜์ตํ™” ์ „๋žต์„ ์ œ์•ˆํ•ด์ฃผ์„ธ์š”",
1515
- "ESG ๊ฒฝ์˜ ์ฒด๊ณ„ ๊ตฌ์ถ•๊ณผ ์ง€์†๊ฐ€๋Šฅ์„ฑ ์ „๋žต ๋ณด๊ณ ์„œ๋ฅผ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”",
1516
- "๋ฉ”ํƒ€๋ฒ„์Šค ํ”Œ๋žซํผ ๊ตฌ์ถ•์„ ์œ„ํ•œ ๊ธฐ์ˆ  ์•„ํ‚คํ…์ฒ˜์™€ ์‚ฌ์—… ๊ณ„ํš์„ ์ˆ˜๋ฆฝํ•ด์ฃผ์„ธ์š”",
1517
- "๊ณต๊ธ‰๋ง ์ตœ์ ํ™”์™€ ์Šค๋งˆํŠธ ํŒฉํ† ๋ฆฌ ์ „ํ™˜ ์ „๋žต์„ ๋ถ„์„ํ•ด์ฃผ์„ธ์š”",
1518
- "๋ฐ์ดํ„ฐ ๊ธฐ๋ฐ˜ ์˜์‚ฌ๊ฒฐ์ • ์ฒด๊ณ„ ๊ตฌ์ถ• ๋ฐฉ์•ˆ๊ณผ ๊ฑฐ๋ฒ„๋„Œ์Šค ๋ชจ๋ธ์„ ์ œ์‹œํ•ด์ฃผ์„ธ์š”",
1519
- "๊ณ ๊ฐ ๊ฒฝํ—˜ ํ˜์‹ ์„ ์œ„ํ•œ ์˜ด๋‹ˆ์ฑ„๋„ ์ „๋žต๊ณผ ์‹คํ–‰ ๊ณ„ํš์„ ์ˆ˜๋ฆฝํ•ด์ฃผ์„ธ์š”"
1520
- ],
1521
- inputs=user_input,
1522
- label="๐Ÿ’ก ์ „๋ฌธ ๋ณด๊ณ ์„œ ์˜ˆ์ œ"
1523
- )
1524
-
1525
- # ์ด๋ฒคํŠธ ํ•ธ๋“ค๋Ÿฌ
1526
- submit_btn.click(
1527
- fn=process_wuxing_query,
1528
- inputs=[user_input, llm_mode],
1529
- outputs=[wood_output, fire_output, earth_output, metal_output, water_output, critic_output, final_report, status_text]
1530
- ).then(
1531
- fn=lambda: "",
1532
- outputs=[user_input]
1533
- )
1534
-
1535
- user_input.submit(
1536
- fn=process_wuxing_query,
1537
- inputs=[user_input, llm_mode],
1538
- outputs=[wood_output, fire_output, earth_output, metal_output, water_output, critic_output, final_report, status_text]
1539
- ).then(
1540
- fn=lambda: "",
1541
- outputs=[user_input]
1542
- )
1543
-
1544
- clear_btn.click(
1545
- fn=clear_wuxing,
1546
- outputs=[wood_output, fire_output, earth_output, metal_output, water_output, critic_output, final_report, status_text]
1547
- )
1548
-
1549
- if __name__ == "__main__":
1550
- app.queue()
1551
- app.launch(
1552
- server_name="0.0.0.0",
1553
- server_port=7860,
1554
- share=True,
1555
- show_error=True
1556
- )