curl --request GET \
--url https://api.example.com/api/chat/history{
"history": [
{
"role": {},
"content": "<string>",
"timestamp": "<string>",
"original_recipe": {},
"suggested_recipe": {},
"accepted": true
}
]
}curl --request GET \
--url https://api.example.com/api/chat/history{
"history": [
{
"role": {},
"content": "<string>",
"timestamp": "<string>",
"original_recipe": {},
"suggested_recipe": {},
"accepted": true
}
]
}{user_id}-{date}. Each day creates a new conversation thread, and context is preserved within the same day’s interactions.
{user_id}-{current_date}curl -X POST https://api.smarteat.ai/api/chat/ \
-H "Authorization: Bearer <token>" \
-d 'message=Create a meal plan for me'
# Response: "I've created a 7-day meal plan..."
curl -X POST https://api.smarteat.ai/api/chat/ \
-H "Authorization: Bearer <token>" \
-d 'message=Can you swap the dinner for day 1?'
# Response: "I'll swap the dinner recipe from your meal plan..."
# (Assistant remembers the plan it just created)
Show Message object
user - Message from the userchef - Message from the AI assistant{
"history": [
{
"role": "user",
"content": "Create a meal plan for this week",
"timestamp": "2026-03-05T10:30:00Z"
},
{
"role": "chef",
"content": "I've created a 7-day meal plan for you with 3 meals per day...",
"timestamp": "2026-03-05T10:30:05Z"
},
{
"role": "user",
"content": "Can you swap the dinner for day 1?",
"timestamp": "2026-03-05T10:32:00Z"
},
{
"role": "chef",
"content": "I've found a similar recipe that matches your preferences...",
"timestamp": "2026-03-05T10:32:03Z",
"original_recipe": {
"id": 1,
"name": "Grilled Chicken Salad",
"calories": 450
},
"suggested_recipe": {
"id": 2,
"name": "Mediterranean Chicken Bowl",
"calories": 480
},
"accepted": true
}
]
}