NutriSense 만들기 — AI 기반 식단 동반자
NutriSense 만들기 — AI 기반 식단 동반자 (Build NutriSense - An AI-powered food diet companion)
Mistral의 에이전트 SDK로 만든 강력한 AI 기반 식단 동반자 앱이에요. 목표 설정, 음식 기록, 음식 추천, 일일 진행 상황, 그리고 일일 식단 목표에 기반한 레스토랑 추천을 사용자에게 제공해요.
출처: 문서
본문
기능 (Features)
- 🍽️ Diet Goal Setting (식단 목표 설정): 하루 동안 일일 식단 목표를 설정하고 업데이트해요.
- 🥗 Food Recommendations (음식 추천): 식단 목표에 기반한 맞춤형 식사 제안을 받아요.
- 📝 Food Logging (음식 기록): 음식을 섭취할 때 기록해서 목표 대비 섭취량을 추적해요.
- 📊 Daily Progress (일일 진행 상황): 진행 상황을 보고 하루 종일 음식 섭취에 대한 영양 분석을 받아요.
- 🍴 Restaurant Recommendations (레스토랑 추천): 선호도와 식이 관심사에 기반한 레스토랑을 발견해요.
아키텍처 (Architecture)
(아키텍처 다이어그램 참고)
예시 쿼리 (Example Queries)
# Diet Goal Setting
"Set my calorie goal to 2000 calories, 100g protein, 100g carbs, 100g fibre."
# Food Logging
"Log the food for breakfast - I had 2 eggs, 1 slice of bread, and 1 cup of coffee."
# Meal Recommendation
"Provide recommendations for dinner based on the goals."
# Restaurant Recommendation
"Recommend me some restaurants in paris that serve good grilled chicken."
# Daily Progress
"What is the progress so far for the day?. Provide Nutrition analysis."
사전 요구 사항 (Prerequisites)
- Python 3.10 이상
- API 키:
설치 (Installation)
- 리포지토리를 클론하세요:
git clone https://github.com/mistralai/cookbook.git
cd mistral/agents/agents_api/food_diet_companion
- 의존성을 설치하세요:
pip install -r requirements.txt
- 환경 변수를 설정하세요:
export MISTRAL_API_KEY=<your-mistral-api-key>
- 애플리케이션을 실행하세요:
chainlit run agent.py
사용법 (Usage)
- 브라우저를 열고
http://localhost:8000으로 이동하세요. - 자연어로 어시스턴트와 채팅을 시작하세요.