Instruction file imported from yoonucho/vibe_coding_w2-2 (
.cursor/rules/task4-plan.mdc). Copyright stays with the author.
TASK-004 ๊ฐ๋ฐ ๊ณํ: Streamlit ํ๋ก ํธ์๋ ๊ตฌํ
๊ตฌํ ํญ๋ชฉ
1. Streamlit ์ฑ๋ด UI ๊ตฌํ
- ์ฑ๋ด ์ธํฐํ์ด์ค ๊ตฌํ
- ๋ฉ์์ง ํ์ ๋ฐ ์ฌ์ฉ์ ์ ๋ ฅ ์ฒ๋ฆฌ
- FastAPI ๋ฐฑ์๋์ ์ฐ๋
- ์ํ ๊ฒ์ ๊ฒฐ๊ณผ ํ์
๊ธฐ์ ์คํ ๋ฐ ๋ผ์ด๋ธ๋ฌ๋ฆฌ
ํ๋ก ํธ์๋ ํ๋ ์์ํฌ
- Streamlit: Python ๊ธฐ๋ฐ ์น ์ ํ๋ฆฌ์ผ์ด์ ํ๋ ์์ํฌ
- ์ธ์ด: Python 3.11
ํต์ฌ ์ปดํฌ๋ํธ
- st.chat_message: ์ฑํ ๋ฉ์์ง ํ์ ์ปจํ ์ด๋
- st.chat_input: ์ฌ์ฉ์ ์ ๋ ฅ ์์ ฏ
- st.write: ๋ฉ์์ง ๋ด์ฉ ํ์
๋ฐฑ์๋ ์ฐ๋
- requests: HTTP ํด๋ผ์ด์ธํธ ๋ผ์ด๋ธ๋ฌ๋ฆฌ
- FastAPI ๋ฐฑ์๋:
/chat/์๋ํฌ์ธํธ ํธ์ถ
UI/UX ์์
- streamlit: ๊ธฐ๋ณธ UI ์ปดํฌ๋ํธ
- st.title: ์ ํ๋ฆฌ์ผ์ด์ ์ ๋ชฉ
- st.markdown: ๋งํฌ๋ค์ด ํ ์คํธ ๋ ๋๋ง
๊ฐ๋ฐ ๊ณํ
-
Streamlit ๊ธฐ๋ณธ ์ค์
- ์ ํ๋ฆฌ์ผ์ด์ ๊ตฌ์กฐ ์ค์
- ํ์ด์ง ์ ๋ชฉ ๋ฐ ๊ธฐ๋ณธ ๋ ์ด์์ ๊ตฌ์ฑ
-
์ฑํ UI ๊ตฌํ
- chat_message ์ปจํ ์ด๋ ๊ตฌํ
- ์ฌ์ฉ์/์ด์์คํดํธ ๋ฉ์์ง ๊ตฌ๋ถ ํ์
-
์ฌ์ฉ์ ์ ๋ ฅ ์ฒ๋ฆฌ
- chat_input ์์ ฏ ๊ตฌํ
- ์ ๋ ฅ ๊ฒ์ฆ ๋ฐ ์ฒ๋ฆฌ
-
๋ฐฑ์๋ API ์ฐ๋
- requests๋ฅผ ์ด์ฉํ HTTP ํต์
- FastAPI ์๋ํฌ์ธํธ ํธ์ถ
- ์๋ต ์ฒ๋ฆฌ ๋ฐ ์๋ฌ ํธ๋ค๋ง
-
์ํ ๊ฒ์ ๊ฒฐ๊ณผ ํ์
- Agent ์๋ต ํฌ๋งทํ
