refactor: reduce chatbot width to 70% and optimize vertical margins
Browse files- AGENTS.md +16 -0
- app.py +9 -9
- src/utils/ui_templates.py +65 -23
- tests/smoke_test_rag.py +17 -17
AGENTS.md
CHANGED
|
@@ -193,3 +193,19 @@ def test_4_core_scenarios():
|
|
| 193 |
3. **์ ์๊ถ ๊ฒ์ฌ(Copyright)**: ์์กด์ฑ ํจํค์ง๋ค์ ๋ผ์ด์ ์ค๋ฅผ ์ ์ ๋ถ์ํ์ฌ ๋ชจ๋ Apache 2.0, MIT, BSD ๋ฑ ํ์ฉ์ ๋ผ์ด์ ์ค์์ ํ์ธํ์ฌ ๋ฒ์ ์ํ 0% ๋ณด์ฅ. ๋ฃจํธ์ MIT `LICENSE` ํ์ผ์ ์ ์ ๋ฐฐํฌํ๊ณ , `delete_zero_rel_articles.py`, `plot_keywords.py` ๋ฑ ์ ๊ท ์ ํธ๋ฆฌํฐ ํ์ผ์ ํ๊ธ ์ค๋ช
์ฃผ์ ๋ฐ ์ ์๊ถ ๋ช
์ ํค๋๋ฅผ ์๋ฒฝ ์ ์ฉํจ.
|
| 194 |
4. **Git ์
๋ก๋**: ๋ชจ๋ ์๊ฑด์ ๊ฐ์ถ ์ฝ๋๋ฅผ ์ต์ข
์คํ
์ด์งํ๊ณ ์์ด ์งง์ ์ปค๋ฐ ๋ฉ์์ง ๊ท์น ์ค์ ํ `origin/main`์ผ๋ก ์ต์ข
Push ์๋ฃ.
|
| 195 |
5. **UI ๋์์ธ ํผ๋๋ฐฑ ๋ฐ์**: ์ธ๋ถ๋ก ๋์ถ๋์ด ์ฑํ
์ฐฝ ์์ญ์ ์นจ๋ฒํ๋ ์ฐ์ธก ์ค๋ช
HTML์ ์ ๊ฑฐํ๊ณ ์ฑ๋ด ๋ด๋ถ์ placeholder ์์ญ์ผ๋ก ์๋ณตํ์์ผ๋ฉฐ, ๋์๋ณด๋์ ์ฑํ
์ฐฝ์ ๊ณจ๋ ํ๋ฉด ๋น์จ(3:7 split)์ ์๋ฒฝํ๊ฒ ๋ณต๊ตฌํจ.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
3. **์ ์๊ถ ๊ฒ์ฌ(Copyright)**: ์์กด์ฑ ํจํค์ง๋ค์ ๋ผ์ด์ ์ค๋ฅผ ์ ์ ๋ถ์ํ์ฌ ๋ชจ๋ Apache 2.0, MIT, BSD ๋ฑ ํ์ฉ์ ๋ผ์ด์ ์ค์์ ํ์ธํ์ฌ ๋ฒ์ ์ํ 0% ๋ณด์ฅ. ๋ฃจํธ์ MIT `LICENSE` ํ์ผ์ ์ ์ ๋ฐฐํฌํ๊ณ , `delete_zero_rel_articles.py`, `plot_keywords.py` ๋ฑ ์ ๊ท ์ ํธ๋ฆฌํฐ ํ์ผ์ ํ๊ธ ์ค๋ช
์ฃผ์ ๋ฐ ์ ์๊ถ ๋ช
์ ํค๋๋ฅผ ์๋ฒฝ ์ ์ฉํจ.
|
| 194 |
4. **Git ์
๋ก๋**: ๋ชจ๋ ์๊ฑด์ ๊ฐ์ถ ์ฝ๋๋ฅผ ์ต์ข
์คํ
์ด์งํ๊ณ ์์ด ์งง์ ์ปค๋ฐ ๋ฉ์์ง ๊ท์น ์ค์ ํ `origin/main`์ผ๋ก ์ต์ข
Push ์๋ฃ.
|
| 195 |
5. **UI ๋์์ธ ํผ๋๋ฐฑ ๋ฐ์**: ์ธ๋ถ๋ก ๋์ถ๋์ด ์ฑํ
์ฐฝ ์์ญ์ ์นจ๋ฒํ๋ ์ฐ์ธก ์ค๋ช
HTML์ ์ ๊ฑฐํ๊ณ ์ฑ๋ด ๋ด๋ถ์ placeholder ์์ญ์ผ๋ก ์๋ณตํ์์ผ๋ฉฐ, ๋์๋ณด๋์ ์ฑํ
์ฐฝ์ ๊ณจ๋ ํ๋ฉด ๋น์จ(3:7 split)์ ์๋ฒฝํ๊ฒ ๋ณต๊ตฌํจ.
|
| 196 |
+
|
| 197 |
+
- [x] **Gradio ๊ธฐ๋ณธ ์์ ์ง๋ฌธ 100% GraphRAG ๋์ ๋ณด์ฅ ๊ฐํธ (2026-05-20)**:
|
| 198 |
+
- **ํ์**: ๋ฉ์ธ ํ๋ฉด์ ๊ธฐ๋ณธ 4๊ฐ ์์ ์ง๋ฌธ ์ค ์ผ๋ถ(LLM ๊ฐ๋ฐ ๊ธฐ์
, ๊ธฐ์ฌ ์์ฝ ๋ฑ)๊ฐ ๋ค์ ์ผ๋ฐ์ ์ด๊ฑฐ๋ DB ์ ๋ณด์ ๋ชจํธํจ์ผ๋ก ์ธํด GraphRAG ๊ธฐ๋ฐ ๋ชจ๋๊ฐ ์๋ GPT-4o-mini ์ผ๋ฐ(general) ์ง์ ๋ชจ๋๋ก ์ฐํ๋๋ ํ์ ํ์ธ.
|
| 199 |
+
- **์กฐ์น**:
|
| 200 |
+
1. Neo4j AuraDB ์ค๋ฌผ ๊ธฐ์ฌ ๋ฐ ์ํฐํฐ ์ ์ฌ ๋ฐ์ดํฐ(์ผ์ฑ ๊ฐ์ฐ์ค 2, ์นด์นด์ค ์นด๋๋, AWS ํผ์ง์ปฌ AI, ๊ตฌ๊ธ I/O ์ ๋ฏธ๋์ด ๋ฑ)๋ฅผ ์ฒ ์ ํ ํ๋กํ์ผ๋งํ์ฌ 100% ๋ฆฌํธ๋ฆฌ๋ฒ๋ฅผ ํธ๋ฆฌ๊ฑฐํ ์ ์๋ ์ด๊ณ ํ์ง ์ง๋ฌธ 4๊ฐ๋ก ์์ ์ง๋ฌธ์ ์ ๊ฒฉ ๊ฐํธ.
|
| 201 |
+
2. `app.py`์ ํตํฉ ๊ฒ์ฆ ์คํฌ๋ฆฝํธ์ธ `tests/smoke_test_rag.py`์ ์ ์ฉ๋ ํ
์คํธ ์๋๋ฆฌ์ค ์ง๋ฌธ ํ
์คํธ ๋ฐ ๊ธฐ๋ ํค์๋๋ฅผ ์์ ํ ์ผ์นํ๋๋ก ๋๊ธฐํ ์์ ์๋ฃ.
|
| 202 |
+
- **๊ฒ์ฆ**: `ruff` ์ ์ ๋ฆฐํธ ๋ฐ `mypy` ํ์
๊ฒ์ฌ๋ฅผ ๋ฌด๊ฒฐ์ ํต๊ณผํ์์ผ๋ฉฐ, `tests/smoke_test_rag.py` ํตํฉ 4๋ ๊ณจ๋ ์๋๋ฆฌ์ค ์คํ ์ ์ ํญ๋ชฉ `โ
PASS` ๋ฐ **100% GraphRAG (graph mode) ๊ธฐ๋ฐ ์๋ต๊ณผ ์๋ณธ URL [์ถ์ฒ ๋งํฌ] ๋
ธ์ถ**์ ์๋ฒฝํ๊ฒ ๊ฒ์ฆ ๋ฐ ์
์ฆ ์๋ฃ.
|
| 203 |
+
|
| 204 |
+
- [x] **์ฑํ
์์ญ ๋๋น 70% ์ถ์ ๋ฐ ์ํ ๊ฐ๊ฒฉ(์ฌ๋ฐฑ) ์ต์ ํ ๊ฐ์ (2026-05-20)**:
|
| 205 |
+
- **ํ์**: ๋ฉ์ธ ํ๋ฉด ์ค๋ฅธ์ชฝ ์ปฌ๋ผ์์ ์ฑ๋ด ์ธํฐํ์ด์ค์ ๊ฐ๋ณ ์ปดํฌ๋ํธ(์๊ฐ ๋ณด๋, ์์ ์ง๋ฌธ ๋ฒํผ, ๋ฉ์์ง ๋ฒ๋ธ, ์
๋ ฅ์ฐฝ)๊ฐ ํ๋ฉด์ 100% ๊ฝ ์ฑ์ ๋ค์ ์๊ฐ์ ์ผ๋ก ํผ์ ธ ๋ณด์ด๊ณ ๊ฐ๋
์ฑ์ด ์ ํ๋๋ ๋ฌธ์ ๋ฐ์. ๋ํ ์๋จ GNB์ ์ฑ๋ด ์ฌ์ด์ ์์ง ์ฌ๋ฐฑ ๋ฐ ์ฑ๋ด ๋ด ์ปดํฌ๋ํธ ๊ฐ ๊ฐ๊ฒฉ์ด ๋๋ฌด ์ปค์ ๊ณต๊ฐ ๋ญ๋น ๋ฐ์.
|
| 206 |
+
- **์กฐ์น**:
|
| 207 |
+
1. **์ฐ์ธก Column ID ์ง์ **: `app.py`์์ ์ฐ์ธก ์ฑ๋ด ์ปดํฌ๋ํธ๋ฅผ ๋ด๋ Column์ `elem_id="chat-column"`์ ๊ณ ์ ํ๊ฒ ์ง์ .
|
| 208 |
+
2. **์ปจํ
์ด๋ ๊ธฐ๋ฐ 70% ๋๋น ํต์ **: `src/utils/ui_templates.py`์ `CUSTOM_CSS`์์ `#chat-column > div`๋ฅผ ์ง์ ํ์ฌ ์ฑ๋ด ์ต์ธ๊ณฝ ํ๋ ์ ์ ์ฒด๋ฅผ `70%` ๋๋น๋ก ์ ํํ๊ณ `margin: 0 auto`๋ก ์ค์ ์ ๋ ฌ์ ๊ฐ์ . ์ด์ ๋ง์ถฐ ๋ด๋ถ ์์ ์์๋ค(`.placeholder`, `.examples-container`, `.message-wrap`, `.input-container`)์ `width: 100%`๋ก ๋ถ๋ชจ ์ปจํ
์ด๋์ ๋ฑ ๋ค์ด๋ง๊ฒ ์ ๋ ฌํ์ฌ ๋ ์ด์์ ์ด๊ธ๋จ ์์ฒ ์ ๊ฑฐ.
|
| 209 |
+
3. **์์ง ์ฌ๋ฐฑ ๋ํญ ๊ธด๋ฐํ**: GNB ์๋์ ๋ฐํ
๋ง์ง์ `20px`์์ `6px`๋ก ์ค์ด๊ณ ํจ๋ฉ์ ์์ถ. ์ฑ๋ด ๋ด๋ถ์ ์ปดํฌ๋ํธ ๊ฐ ๊ฐ๊ฒฉ(`gap` ๋ฐ `margin`)๊ณผ ๊ฐ๋ณ ๋ณด๋์ ์์ชฝ ํจ๋ฉ(`padding`)์ ์ ์ฒด์ ์ผ๋ก ์ค์ฌ(์: ์๊ฐ๊ธ ํจ๋ฉ `10px 14px`, ๋ง์ง `4px auto 6px auto` ๋ฑ) ํ๋ฉด ๋ด์ ํ๋์ ์ ๋ค์ด์ค๋๋ก ์ต์ ํ.
|
| 210 |
+
4. **๋ฐ์ํ ๋ชจ๋ฐ์ผ ๋ฏธ๋์ด ์ฟผ๋ฆฌ ๊ฐฑ์ **: ๊ฐ๋ก 800px ์ดํ ๋ชจ๋ฐ์ผ ํ๋ฉด์์๋ ์๋์ผ๋ก 100% ๊ฝ ์ฐจ๋๋ก ๊ฐฑ์ ํ์ฌ ํ๋ฆฌ๋ฏธ์ UX๋ฅผ ์๋ฒฝํ๊ฒ ์ ์ง.
|
| 211 |
+
- **๊ฒ์ฆ**: `ruff`์ `mypy` ๊ฒ์ฌ๋ฅผ ๋ฌด์ค๋ฅ ํต๊ณผํจ. `python -c "import app"`์ผ๋ก Gradio ์น์ฑ ๋น๋ ๋ฌด๊ฒฐ์ฑ์ ์ต์ข
ํ๋ณดํจ.
|
app.py
CHANGED
|
@@ -334,10 +334,10 @@ interface_kwargs = {
|
|
| 334 |
submit_btn="์ ์ก",
|
| 335 |
),
|
| 336 |
"examples": [
|
| 337 |
-
"์ผ์ฑ์ ์์
|
| 338 |
-
"์นด์นด์ค๊ฐ ๊ฐ
|
| 339 |
-
"
|
| 340 |
-
"
|
| 341 |
],
|
| 342 |
"cache_examples": False,
|
| 343 |
}
|
|
@@ -349,7 +349,7 @@ launch_kwargs = {
|
|
| 349 |
}
|
| 350 |
|
| 351 |
# ๋ฒ์ ์ ๋ง์ถ ํ
๋ง ๋ฐ CSS ์ฃผ์
ํ์ดํ๋ผ์ธ (Gradio 6.x ํธํ์ฑ ๋ณด์ฅ)
|
| 352 |
-
blocks_kwargs = {}
|
| 353 |
if gradio_major < 5:
|
| 354 |
interface_kwargs["theme"] = theme_obj
|
| 355 |
blocks_kwargs["theme"] = theme_obj
|
|
@@ -366,7 +366,7 @@ else:
|
|
| 366 |
with gr.Blocks(**blocks_kwargs) as demo:
|
| 367 |
# 1. ์๋จ ๊ธ๋ก๋ฒ ๋ค๋น๊ฒ์ด์
๋ฐ (GNB)
|
| 368 |
gr.HTML("""
|
| 369 |
-
<div style="display: flex; justify-content: space-between; align-items: center; padding:
|
| 370 |
<div style="font-size: 20px; font-weight: 900; color: #0f172a; display: flex; align-items: center; gap: 12px;">
|
| 371 |
๐ FinGraph <span style="font-size: 14px; font-weight: 700; color: #475569;">GraphRAG Enhanced AI Terminal</span>
|
| 372 |
</div>
|
|
@@ -381,14 +381,14 @@ with gr.Blocks(**blocks_kwargs) as demo:
|
|
| 381 |
gr.HTML(stats_html)
|
| 382 |
|
| 383 |
# 3. ์ค๋ฅธ์ชฝ ์ปฌ๋ผ: ๋ฉ์ธ ์ฑ๋ด ์์ด๋ฆฌ์ด - 3:7 split์ ์ํด scale=7 ์ค์
|
| 384 |
-
with gr.Column(scale=7, min_width=500):
|
| 385 |
# ChatInterface without redundant titles/descriptions
|
| 386 |
-
chatbot_interface_kwargs = interface_kwargs.copy()
|
| 387 |
chatbot_interface_kwargs.pop("title", None)
|
| 388 |
chatbot_interface_kwargs.pop("description", None)
|
| 389 |
chatbot_interface_kwargs.pop("theme", None)
|
| 390 |
|
| 391 |
-
gr.ChatInterface(**chatbot_interface_kwargs)
|
| 392 |
|
| 393 |
if __name__ == "__main__":
|
| 394 |
demo.launch(**launch_kwargs)
|
|
|
|
| 334 |
submit_btn="์ ์ก",
|
| 335 |
),
|
| 336 |
"examples": [
|
| 337 |
+
"์ผ์ฑ์ ์์ ์์ฒด AI ๋ชจ๋ธ์ธ '์ผ์ฑ ๊ฐ์ฐ์ค 2'์ ํน์ง๊ณผ ์ฃผ์ ์ ์ฉ ๊ณํ์ ์๋ ค์ค",
|
| 338 |
+
"์นด์นด์ค๊ฐ ๊ณต๊ฐํ AI ๋ธ๋๋ '์นด๋๋(Kanana)'์ ์นด๋๋ ์ํฌ ๋ฑ ์๋น์ค ๋ผ์ธ์
์ ์ค๋ช
ํด์ค",
|
| 339 |
+
"AWS๊ฐ ๊ฐ์กฐํ๋ 'ํผ์ง์ปฌ AI'์ '์์ด์ ํฑ AI' ๊ธฐ์ ์ ํ๊ตญ ์์ฅ ์ง์ ๋ฐ ํ๋ ฅ ๋ฐฉ์์ ๋ฌด์์ธ๊ฐ์?",
|
| 340 |
+
"๊ตฌ๊ธ์ด I/O ํ์ฌ์์ ๋ฐํํ AI ๊ธฐ๋ฐ ๊ฒ์ ๋ณํ์ '์ ๋ฏธ๋์ด(Gemini)' ๊ธฐ์ ์ ์ ์ฉ ์ฌ๋ก๋ฅผ ์๋ ค์ค",
|
| 341 |
],
|
| 342 |
"cache_examples": False,
|
| 343 |
}
|
|
|
|
| 349 |
}
|
| 350 |
|
| 351 |
# ๋ฒ์ ์ ๋ง์ถ ํ
๋ง ๋ฐ CSS ์ฃผ์
ํ์ดํ๋ผ์ธ (Gradio 6.x ํธํ์ฑ ๋ณด์ฅ)
|
| 352 |
+
blocks_kwargs: Dict[str, Any] = {}
|
| 353 |
if gradio_major < 5:
|
| 354 |
interface_kwargs["theme"] = theme_obj
|
| 355 |
blocks_kwargs["theme"] = theme_obj
|
|
|
|
| 366 |
with gr.Blocks(**blocks_kwargs) as demo:
|
| 367 |
# 1. ์๋จ ๊ธ๋ก๋ฒ ๋ค๋น๊ฒ์ด์
๋ฐ (GNB)
|
| 368 |
gr.HTML("""
|
| 369 |
+
<div style="display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; border-bottom: 1px solid rgba(196, 195, 236, 0.45); background-color: rgba(255, 255, 255, 0.65); backdrop-filter: blur(12px); margin: -20px -20px 6px -20px;">
|
| 370 |
<div style="font-size: 20px; font-weight: 900; color: #0f172a; display: flex; align-items: center; gap: 12px;">
|
| 371 |
๐ FinGraph <span style="font-size: 14px; font-weight: 700; color: #475569;">GraphRAG Enhanced AI Terminal</span>
|
| 372 |
</div>
|
|
|
|
| 381 |
gr.HTML(stats_html)
|
| 382 |
|
| 383 |
# 3. ์ค๋ฅธ์ชฝ ์ปฌ๋ผ: ๋ฉ์ธ ์ฑ๋ด ์์ด๋ฆฌ์ด - 3:7 split์ ์ํด scale=7 ์ค์
|
| 384 |
+
with gr.Column(scale=7, min_width=500, elem_id="chat-column"):
|
| 385 |
# ChatInterface without redundant titles/descriptions
|
| 386 |
+
chatbot_interface_kwargs: Dict[str, Any] = interface_kwargs.copy()
|
| 387 |
chatbot_interface_kwargs.pop("title", None)
|
| 388 |
chatbot_interface_kwargs.pop("description", None)
|
| 389 |
chatbot_interface_kwargs.pop("theme", None)
|
| 390 |
|
| 391 |
+
gr.ChatInterface(**chatbot_interface_kwargs) # type: ignore
|
| 392 |
|
| 393 |
if __name__ == "__main__":
|
| 394 |
demo.launch(**launch_kwargs)
|
src/utils/ui_templates.py
CHANGED
|
@@ -231,13 +231,30 @@ div[data-testid="chatbot"], .chatbot-container, .chatbot {
|
|
| 231 |
border: none !important;
|
| 232 |
}
|
| 233 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 234 |
/* โโ ์ฑ๋ด ๋ด๋ถ Placeholder(์๊ฐ๊ธ ์์ญ) โโ */
|
| 235 |
.placeholder, [class*="placeholder"] {
|
| 236 |
padding: 0 !important;
|
| 237 |
overflow: auto !important;
|
| 238 |
margin: 0 auto !important;
|
| 239 |
width: 100% !important;
|
| 240 |
-
max-width:
|
| 241 |
}
|
| 242 |
|
| 243 |
/* โโ ์๊ฐ๊ธ(Prose) ์ฐ์ปด ๋ณด๋ (๋
๋ฆฝ์ ์ธ ํ๋ฆฌ๋ฏธ์ ๋ผ์ด๋ ์นด๋ ๊ตฌ์กฐ) โโ */
|
|
@@ -245,8 +262,8 @@ div[data-testid="chatbot"], .chatbot-container, .chatbot {
|
|
| 245 |
background: #f8fafc !important;
|
| 246 |
border: 1px solid #e2e8f0 !important;
|
| 247 |
border-radius: 12px !important;
|
| 248 |
-
padding:
|
| 249 |
-
max-width:
|
| 250 |
width: 100% !important;
|
| 251 |
margin: 0 auto !important;
|
| 252 |
display: block !important;
|
|
@@ -257,32 +274,33 @@ div[data-testid="chatbot"], .chatbot-container, .chatbot {
|
|
| 257 |
.placeholder h3, [class*="placeholder"] h3 {
|
| 258 |
color: #334155 !important;
|
| 259 |
font-weight: 800 !important;
|
| 260 |
-
font-size:
|
| 261 |
margin-top: 0 !important;
|
| 262 |
-
margin-bottom:
|
| 263 |
}
|
| 264 |
.placeholder .prose ul {
|
| 265 |
list-style-type: none !important;
|
| 266 |
padding-left: 0 !important;
|
| 267 |
-
margin-bottom:
|
| 268 |
}
|
| 269 |
.placeholder .prose li {
|
| 270 |
-
margin-bottom:
|
| 271 |
color: #475569 !important;
|
| 272 |
-
font-size:
|
| 273 |
-
line-height: 1.
|
| 274 |
}
|
| 275 |
.placeholder .prose p {
|
| 276 |
-
font-size:
|
| 277 |
-
line-height: 1.
|
|
|
|
| 278 |
}
|
| 279 |
.placeholder .prose p:last-child {
|
| 280 |
-
font-size:
|
| 281 |
font-weight: 700 !important;
|
| 282 |
color: #4c1d95 !important;
|
| 283 |
background: #f3e8ff !important;
|
| 284 |
-
padding:
|
| 285 |
-
border-radius:
|
| 286 |
display: inline-block !important;
|
| 287 |
margin-bottom: 0 !important;
|
| 288 |
}
|
|
@@ -291,14 +309,14 @@ div[data-testid="chatbot"], .chatbot-container, .chatbot {
|
|
| 291 |
[class*="examples"], .gr-samples-wrapper, .examples-container {
|
| 292 |
display: grid !important;
|
| 293 |
grid-template-columns: repeat(2, 1fr) !important;
|
| 294 |
-
gap:
|
| 295 |
width: 100% !important;
|
| 296 |
-
max-width:
|
| 297 |
-
margin:
|
| 298 |
background: #f8fafc !important;
|
| 299 |
border: 1px solid #e2e8f0 !important;
|
| 300 |
border-radius: 12px !important;
|
| 301 |
-
padding:
|
| 302 |
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
|
| 303 |
position: relative !important;
|
| 304 |
z-index: 1 !important;
|
|
@@ -307,9 +325,9 @@ div[data-testid="chatbot"], .chatbot-container, .chatbot {
|
|
| 307 |
/* ๊ฐ๋ณ ๋ฒํผ ๋์์ธ (์ฐ๋ณด๋ผ์ ํ
๋ง & ๊ฐ๋ ฅํ ์ค์ ์ ๋ ฌ) */
|
| 308 |
.examples-container button, div[data-testid="chatbot"] button.example, button.example, .example-btn {
|
| 309 |
border-radius: 8px !important;
|
| 310 |
-
padding:
|
| 311 |
text-align: center !important;
|
| 312 |
-
font-size:
|
| 313 |
font-weight: 600 !important;
|
| 314 |
color: #4c1d95 !important;
|
| 315 |
background: #f5f3ff !important;
|
|
@@ -320,7 +338,7 @@ div[data-testid="chatbot"], .chatbot-container, .chatbot {
|
|
| 320 |
display: flex !important;
|
| 321 |
align-items: center !important;
|
| 322 |
justify-content: center !important;
|
| 323 |
-
min-height:
|
| 324 |
width: 100% !important;
|
| 325 |
white-space: normal !important;
|
| 326 |
}
|
|
@@ -390,8 +408,13 @@ textarea:focus {
|
|
| 390 |
div:has(> button[class*="submit-btn"]),
|
| 391 |
div:has(> [data-testid="submit-button"]),
|
| 392 |
.input-container, [class*="input-container"] {
|
| 393 |
-
gap:
|
| 394 |
align-items: center !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 395 |
}
|
| 396 |
|
| 397 |
/* โโ ์ฑ๋ด ํญ/๋ผ๋ฒจ ์จ๊น โโ */
|
|
@@ -404,7 +427,13 @@ label.svelte-1ipelgc, span.svelte-1ipelgc {
|
|
| 404 |
display: none !important;
|
| 405 |
}
|
| 406 |
|
| 407 |
-
/* โโ ๋ฉ์์ง ๋ฒ๋ธ ๊ธฐ๋ณธ ํฌ๊ธฐ ์ถ์ (์ฌ์ฉ์/๋ด ๊ณตํต ์ธ๋ก ๋์ด ์ต์ ํ) โโ */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 408 |
.message,
|
| 409 |
.message-wrap .message,
|
| 410 |
[data-testid="user-message"],
|
|
@@ -540,6 +569,19 @@ div[data-testid="chatbot"] > div.scrollbar {
|
|
| 540 |
overflow-y: auto !important;
|
| 541 |
max-height: 600px !important;
|
| 542 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 543 |
"""
|
| 544 |
|
| 545 |
|
|
|
|
| 231 |
border: none !important;
|
| 232 |
}
|
| 233 |
|
| 234 |
+
/* โโ ์ฑ๋ด ์์ญ ๋๋น 70% ์ ์ด ๋ฐ ์ค์ ์ ๋ ฌ โโ */
|
| 235 |
+
#chat-column {
|
| 236 |
+
display: flex !important;
|
| 237 |
+
flex-direction: column !important;
|
| 238 |
+
align-items: center !important;
|
| 239 |
+
width: 100% !important;
|
| 240 |
+
}
|
| 241 |
+
#chat-column > div,
|
| 242 |
+
#chat-column > .form {
|
| 243 |
+
width: 70% !important;
|
| 244 |
+
max-width: 960px !important;
|
| 245 |
+
margin: 0 auto !important;
|
| 246 |
+
display: flex !important;
|
| 247 |
+
flex-direction: column !important;
|
| 248 |
+
gap: 6px !important; /* ์ปดํฌ๋ํธ ๊ฐ ์์๋ ๊ฐ๊ฒฉ ์ถ์ */
|
| 249 |
+
}
|
| 250 |
+
|
| 251 |
/* โโ ์ฑ๋ด ๋ด๋ถ Placeholder(์๊ฐ๊ธ ์์ญ) โโ */
|
| 252 |
.placeholder, [class*="placeholder"] {
|
| 253 |
padding: 0 !important;
|
| 254 |
overflow: auto !important;
|
| 255 |
margin: 0 auto !important;
|
| 256 |
width: 100% !important;
|
| 257 |
+
max-width: 100% !important;
|
| 258 |
}
|
| 259 |
|
| 260 |
/* โโ ์๊ฐ๊ธ(Prose) ์ฐ์ปด ๋ณด๋ (๋
๋ฆฝ์ ์ธ ํ๋ฆฌ๋ฏธ์ ๋ผ์ด๋ ์นด๋ ๊ตฌ์กฐ) โโ */
|
|
|
|
| 262 |
background: #f8fafc !important;
|
| 263 |
border: 1px solid #e2e8f0 !important;
|
| 264 |
border-radius: 12px !important;
|
| 265 |
+
padding: 10px 14px !important; /* ํจ๋ฉ ์ถ์ */
|
| 266 |
+
max-width: 100% !important;
|
| 267 |
width: 100% !important;
|
| 268 |
margin: 0 auto !important;
|
| 269 |
display: block !important;
|
|
|
|
| 274 |
.placeholder h3, [class*="placeholder"] h3 {
|
| 275 |
color: #334155 !important;
|
| 276 |
font-weight: 800 !important;
|
| 277 |
+
font-size: 15px !important; /* ํฐํธ ์ด์ง ์ถ์ */
|
| 278 |
margin-top: 0 !important;
|
| 279 |
+
margin-bottom: 6px !important;
|
| 280 |
}
|
| 281 |
.placeholder .prose ul {
|
| 282 |
list-style-type: none !important;
|
| 283 |
padding-left: 0 !important;
|
| 284 |
+
margin-bottom: 6px !important;
|
| 285 |
}
|
| 286 |
.placeholder .prose li {
|
| 287 |
+
margin-bottom: 2px !important; /* ๊ฐ๊ฒฉ ์ถ์ */
|
| 288 |
color: #475569 !important;
|
| 289 |
+
font-size: 13px !important;
|
| 290 |
+
line-height: 1.4 !important;
|
| 291 |
}
|
| 292 |
.placeholder .prose p {
|
| 293 |
+
font-size: 13px !important;
|
| 294 |
+
line-height: 1.4 !important;
|
| 295 |
+
margin-bottom: 4px !important;
|
| 296 |
}
|
| 297 |
.placeholder .prose p:last-child {
|
| 298 |
+
font-size: 12.5px !important;
|
| 299 |
font-weight: 700 !important;
|
| 300 |
color: #4c1d95 !important;
|
| 301 |
background: #f3e8ff !important;
|
| 302 |
+
padding: 4px 10px !important; /* ํจ๋ฉ ์ถ์ */
|
| 303 |
+
border-radius: 6px !important;
|
| 304 |
display: inline-block !important;
|
| 305 |
margin-bottom: 0 !important;
|
| 306 |
}
|
|
|
|
| 309 |
[class*="examples"], .gr-samples-wrapper, .examples-container {
|
| 310 |
display: grid !important;
|
| 311 |
grid-template-columns: repeat(2, 1fr) !important;
|
| 312 |
+
gap: 6px !important; /* ๊ฐญ ์ถ์ */
|
| 313 |
width: 100% !important;
|
| 314 |
+
max-width: 100% !important;
|
| 315 |
+
margin: 4px auto 6px auto !important; /* ๋ง์ง ์ถ์ */
|
| 316 |
background: #f8fafc !important;
|
| 317 |
border: 1px solid #e2e8f0 !important;
|
| 318 |
border-radius: 12px !important;
|
| 319 |
+
padding: 10px 14px !important; /* ํจ๋ฉ ์ถ์ */
|
| 320 |
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
|
| 321 |
position: relative !important;
|
| 322 |
z-index: 1 !important;
|
|
|
|
| 325 |
/* ๊ฐ๋ณ ๋ฒํผ ๋์์ธ (์ฐ๋ณด๋ผ์ ํ
๋ง & ๊ฐ๋ ฅํ ์ค์ ์ ๋ ฌ) */
|
| 326 |
.examples-container button, div[data-testid="chatbot"] button.example, button.example, .example-btn {
|
| 327 |
border-radius: 8px !important;
|
| 328 |
+
padding: 10px 12px !important;
|
| 329 |
text-align: center !important;
|
| 330 |
+
font-size: 13px !important;
|
| 331 |
font-weight: 600 !important;
|
| 332 |
color: #4c1d95 !important;
|
| 333 |
background: #f5f3ff !important;
|
|
|
|
| 338 |
display: flex !important;
|
| 339 |
align-items: center !important;
|
| 340 |
justify-content: center !important;
|
| 341 |
+
min-height: 52px !important;
|
| 342 |
width: 100% !important;
|
| 343 |
white-space: normal !important;
|
| 344 |
}
|
|
|
|
| 408 |
div:has(> button[class*="submit-btn"]),
|
| 409 |
div:has(> [data-testid="submit-button"]),
|
| 410 |
.input-container, [class*="input-container"] {
|
| 411 |
+
gap: 6px !important; /* ๊ฐญ ์ถ์ */
|
| 412 |
align-items: center !important;
|
| 413 |
+
max-width: 100% !important;
|
| 414 |
+
width: 100% !important;
|
| 415 |
+
margin-left: 0 !important;
|
| 416 |
+
margin-right: 0 !important;
|
| 417 |
+
margin-top: 4px !important; /* ์์๋ ๊ฐ๊ฒฉ ์ต์ ํ */
|
| 418 |
}
|
| 419 |
|
| 420 |
/* โโ ์ฑ๋ด ํญ/๋ผ๋ฒจ ์จ๊น โโ */
|
|
|
|
| 427 |
display: none !important;
|
| 428 |
}
|
| 429 |
|
| 430 |
+
/* โโ ๋ฉ์์ง ๋ฒ๋ธ ๊ธฐ๋ณธ ํฌ๊ธฐ ์ถ์ (์ฌ์ฉ์/๋ด ๊ณตํต ์ธ๋ก ๋์ด ์ต์ ํ & 100% ๋ถ๋ชจ ๋๋น ์ฑ์) โโ */
|
| 431 |
+
.message-wrap, .message-container, div[data-testid="chatbot"] .wrapper {
|
| 432 |
+
max-width: 100% !important;
|
| 433 |
+
width: 100% !important;
|
| 434 |
+
margin-left: 0 !important;
|
| 435 |
+
margin-right: 0 !important;
|
| 436 |
+
}
|
| 437 |
.message,
|
| 438 |
.message-wrap .message,
|
| 439 |
[data-testid="user-message"],
|
|
|
|
| 569 |
overflow-y: auto !important;
|
| 570 |
max-height: 600px !important;
|
| 571 |
}
|
| 572 |
+
|
| 573 |
+
/* โโ ๋ชจ๋ฐ์ผ ํ๋ฉด ๋์: 800px ์ดํ์์๋ 100% ๋๋น โโ */
|
| 574 |
+
@media (max-width: 800px) {
|
| 575 |
+
#chat-column > div,
|
| 576 |
+
#chat-column > .form {
|
| 577 |
+
width: 100% !important;
|
| 578 |
+
max-width: 100% !important;
|
| 579 |
+
}
|
| 580 |
+
[class*="examples"], .gr-samples-wrapper, .examples-container {
|
| 581 |
+
grid-template-columns: 1fr !important;
|
| 582 |
+
padding: 10px !important;
|
| 583 |
+
}
|
| 584 |
+
}
|
| 585 |
"""
|
| 586 |
|
| 587 |
|
tests/smoke_test_rag.py
CHANGED
|
@@ -188,39 +188,39 @@ if __name__ == "__main__":
|
|
| 188 |
|
| 189 |
results = []
|
| 190 |
|
| 191 |
-
# ์๋๋ฆฌ์ค 1: ์ผ์ฑ์ ์
|
| 192 |
results.append(run_scenario(
|
| 193 |
-
label="โ
|
| 194 |
-
query="์ผ์ฑ์ ์์
|
| 195 |
-
expected_keywords=["์ผ์ฑ
|
| 196 |
))
|
| 197 |
|
| 198 |
-
# ์๋๋ฆฌ์ค 2: ์นด์นด์ค AI
|
| 199 |
results.append(run_scenario(
|
| 200 |
-
label="โก
|
| 201 |
-
query="์นด์นด์ค๊ฐ ๊ฐ
|
| 202 |
-
expected_keywords=["์นด์นด์ค", "
|
| 203 |
))
|
| 204 |
|
| 205 |
-
# ์๋๋ฆฌ์ค 3:
|
| 206 |
results.append(run_scenario(
|
| 207 |
-
label="โข
|
| 208 |
-
query="
|
| 209 |
-
expected_keywords=["
|
| 210 |
))
|
| 211 |
|
| 212 |
-
# ์๋๋ฆฌ์ค 4:
|
| 213 |
results.append(run_scenario(
|
| 214 |
-
label="โฃ
|
| 215 |
-
query="
|
| 216 |
-
expected_keywords=["
|
| 217 |
))
|
| 218 |
|
| 219 |
# ์ต์ข
์์ฝ
|
| 220 |
print("=" * 60)
|
| 221 |
print("๐ ์ต์ข
์์ฝ")
|
| 222 |
print("=" * 60)
|
| 223 |
-
labels = ["โ ์ผ์ฑ
|
| 224 |
for label, passed in zip(labels, results):
|
| 225 |
print(f" {'โ
PASS' if passed else 'โ ๏ธ PARTIAL'} | {label}")
|
| 226 |
print()
|
|
|
|
| 188 |
|
| 189 |
results = []
|
| 190 |
|
| 191 |
+
# ์๋๋ฆฌ์ค 1: ์ผ์ฑ์ ์ ๊ฐ์ฐ์ค 2 AI ํธ๋ ๋
|
| 192 |
results.append(run_scenario(
|
| 193 |
+
label="โ ์ผ์ฑ์ ์ โ ์ผ์ฑ์ ์์ ์์ฒด AI ๋ชจ๋ธ์ธ '์ผ์ฑ ๊ฐ์ฐ์ค 2'์ ํน์ง๊ณผ ์ฃผ์ ์ ์ฉ ๊ณํ์ ์๋ ค์ค",
|
| 194 |
+
query="์ผ์ฑ์ ์์ ์์ฒด AI ๋ชจ๋ธ์ธ '์ผ์ฑ ๊ฐ์ฐ์ค 2'์ ํน์ง๊ณผ ์ฃผ์ ์ ์ฉ ๊ณํ์ ์๋ ค์ค",
|
| 195 |
+
expected_keywords=["์ผ์ฑ", "๊ฐ์ฐ์ค"],
|
| 196 |
))
|
| 197 |
|
| 198 |
+
# ์๋๋ฆฌ์ค 2: ์นด์นด์ค ์นด๋๋ AI ๋ธ๋๋
|
| 199 |
results.append(run_scenario(
|
| 200 |
+
label="โก ์นด์นด์ค โ ์นด์นด์ค๊ฐ ๊ณต๊ฐํ AI ๋ธ๋๋ '์นด๋๋(Kanana)'์ ์นด๋๋ ์ํฌ ๋ฑ ์๋น์ค ๋ผ์ธ์
์ ์ค๋ช
ํด์ค",
|
| 201 |
+
query="์นด์นด์ค๊ฐ ๊ณต๊ฐํ AI ๋ธ๋๋ '์นด๋๋(Kanana)'์ ์นด๋๋ ์ํฌ ๋ฑ ์๋น์ค ๋ผ์ธ์
์ ์ค๋ช
ํด์ค",
|
| 202 |
+
expected_keywords=["์นด์นด์ค", "์นด๋๋"],
|
| 203 |
))
|
| 204 |
|
| 205 |
+
# ์๋๋ฆฌ์ค 3: AWS ํผ์ง์ปฌ AI ๋ฐ ์์ด์ ํฑ AI
|
| 206 |
results.append(run_scenario(
|
| 207 |
+
label="โข AWS โ AWS๊ฐ ๊ฐ์กฐํ๋ 'ํผ์ง์ปฌ AI'์ '์์ด์ ํฑ AI' ๊ธฐ์ ์ ํ๊ตญ ์์ฅ ์ง์ ๋ฐ ํ๋ ฅ ๋ฐฉ์์ ๋ฌด์์ธ๊ฐ์?",
|
| 208 |
+
query="AWS๊ฐ ๊ฐ์กฐํ๋ 'ํผ์ง์ปฌ AI'์ '์์ด์ ํฑ AI' ๊ธฐ์ ์ ํ๊ตญ ์์ฅ ์ง์ ๋ฐ ํ๋ ฅ ๋ฐฉ์์ ๋ฌด์์ธ๊ฐ์?",
|
| 209 |
+
expected_keywords=["AWS", "ํผ์ง์ปฌ", "์์ด์ ํฑ"],
|
| 210 |
))
|
| 211 |
|
| 212 |
+
# ์๋๋ฆฌ์ค 4: ๊ตฌ๊ธ I/O ์ ๋ฏธ๋์ด ๊ธฐ์ ๋ณํ
|
| 213 |
results.append(run_scenario(
|
| 214 |
+
label="โฃ ๊ตฌ๊ธ โ ๊ตฌ๊ธ์ด I/O ํ์ฌ์์ ๋ฐํํ AI ๊ธฐ๋ฐ ๊ฒ์ ๋ณํ์ '์ ๋ฏธ๋์ด(Gemini)' ๊ธฐ์ ์ ์ ์ฉ ์ฌ๋ก๋ฅผ ์๋ ค์ค",
|
| 215 |
+
query="๊ตฌ๊ธ์ด I/O ํ์ฌ์์ ๋ฐํํ AI ๊ธฐ๋ฐ ๊ฒ์ ๋ณํ์ '์ ๋ฏธ๋์ด(Gemini)' ๊ธฐ์ ์ ์ ์ฉ ์ฌ๋ก๋ฅผ ์๋ ค์ค",
|
| 216 |
+
expected_keywords=["๊ตฌ๊ธ", "์ ๋ฏธ๋์ด"],
|
| 217 |
))
|
| 218 |
|
| 219 |
# ์ต์ข
์์ฝ
|
| 220 |
print("=" * 60)
|
| 221 |
print("๐ ์ต์ข
์์ฝ")
|
| 222 |
print("=" * 60)
|
| 223 |
+
labels = ["โ ์ผ์ฑ ๊ฐ์ฐ์ค 2", "โก ์นด์นด์ค ์นด๋๋", "โข AWS ํผ์ง์ปฌ AI", "โฃ ๊ตฌ๊ธ ์ ๋ฏธ๋์ด"]
|
| 224 |
for label, passed in zip(labels, results):
|
| 225 |
print(f" {'โ
PASS' if passed else 'โ ๏ธ PARTIAL'} | {label}")
|
| 226 |
print()
|