| name | ai_date_planner |
| description | Calculates empty slots in a couple's calendar and generates an optimized date course using OpenAI. |
Date Planner AI Skill (๋ฐ์ดํธ ์กฐ์จ ์คํฌ)
๋ชฉ์ : ์ปคํ ์ฌ์ฉ์์ ์ผ์ ๋ฌ๋ ฅ์ ์ค์บํ์ฌ ๋น ์ฌ๋กฏ์ ์ฐพ์๋ด๊ณ , ์์๋ฆฌ์คํธ ํ๊ทธ๋ฅผ ํ๋กฌํํธ๋ก ์ฎ์ด LLM์ ๋ฐ์ดํธ ์ฝ์ค ํ๋ ์ด์
์ ์์ฒญํ๋ ์คํฌ.
๋์ ์๋ฆฌ (Mechanism)
- DB ์กฐํ:
couple_id์ target_date๋ฅผ ํ๋ผ๋ฏธํฐ๋ก ๋ฐ์์ ํด๋น ๋ ์ง์ schedules ๋ ์ฝ๋๋ฅผ ๋ชจ๋ ์ฝ์ด์ต๋๋ค.
- ์ฌ๋กฏ ๊ณ์ฐ (Slot Calculation): ์ด๋ฏธ ์์ฝ๋ ์ผ์ ๋ค์ ์์-์ข
๋ฃ ์๊ฐ์ ๋ฐฐ์ด๋ก ๋ฌถ์ ๋ค, ๋จ์ ์ฌ์ ์๊ฐ์ "์ฌ์ฉ ๊ฐ๋ฅํ ์๊ฐ๋"๋ก ์ถ์ถํฉ๋๋ค.
- LLM ํ๋ ์ด์
:
wishlists์์ ๊ฐ์ฅ ๋ง์ด ์ธ๊ธ๋ ์นดํ
๊ณ ๋ฆฌ๋ฅผ ํ๋กฌํํธ ์ปจํ
์คํธ์ ๋ด์ GPT-4์ ๋์ ธ ๊ฐ์ฅ ์ ํฉํ ์ค๋ด/์ค์ธ ๋ฐ์ดํธ ์ฝ์ค JSON์ ๋ฐํ๋ฐ์ต๋๋ค.
์ฌ์ฉ๋ฒ ๊ฐ์ด๋ (API Call Example)
์ด ์คํฌ์ ํ๋ก ํธ์๋ ๋ฌ๋ ฅ ๋ทฐ(๋ชจ๋ฌ)์์ ์ฌ์ฉ์๊ฐ "AI ์ฝ์ค ์กฐ์จํ๊ธฐ โจ" ๋ฒํผ์ ๋๋ฅผ ๋ ํธ์ถ๋ฉ๋๋ค.
const { data, error } = await supabase.functions.invoke('ai-date-planner', {
body: { couple_id: 'uuid-1234', target_date: '2026-03-24' }
})
if (data) {
console.log('AI Recommendation:', data.recommendation)
}
์๋ฌ ์ฒ๋ฆฌ ์ ์ฝ (Constraints)
- OpenAI API ํธ์ถ ์ง์ฐ ์ ํ๋ก ํธ์๋์์ ์ต์ 3์ด ์ด์ Lottie Loading ์ ๋๋ฉ์ด์
์ ์ ์งํด์ผ ํฉ๋๋ค.
- ์ค์ผ์ค์ด ํ๋ฃจ ์ข
์ผ ๊ฝ ์ฐจ ์๋(All-day busy) ๊ฒฝ์ฐ, ํ๋ก ํธ์๋ ๋ชจ๋ฌ์ "์ด ๋ ์ง๋ ๋๋ฌด ๋ฐ๋น ์! ๋ค๋ฅธ ๋ ์ง๋ก ์กฐ์จํด ๋ณผ๊น์?" ๋ผ๋ ์์ธ ์ฒ๋ฆฌ๋ฅผ ๋ฐํํฉ๋๋ค.