curl --request POST \
--url https://api.example.com/api/chat/{
"response": "<string>",
"used_tools": [
{}
]
}curl --request POST \
--url https://api.example.com/api/chat/{
"response": "<string>",
"used_tools": [
{}
]
}Authorization: Bearer <your_access_token>
Show Tool names
get_profile - Retrieved user profile informationget_plan - Accessed current meal plancreate_plan - Generated a new meal planswap_recipe - Recommended recipe substitutionscurl -X POST https://api.smarteat.ai/api/chat/ \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Content-Type: application/json" \
-d 'message=I want to create a meal plan for this week'
import requests
url = "https://api.smarteat.ai/api/chat/"
headers = {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
}
params = {
"message": "I want to create a meal plan for this week"
}
response = requests.post(url, headers=headers, params=params)
print(response.json())
const response = await fetch('https://api.smarteat.ai/api/chat/?message=I%20want%20to%20create%20a%20meal%20plan%20for%20this%20week', {
method: 'POST',
headers: {
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);
{
"response": "I'd be happy to help you create a meal plan for this week! Based on your profile, I see you're aiming to lose weight with a target of 1800 calories per day across 3 meals. I've generated a balanced 7-day meal plan that includes breakfast, lunch, and dinner options tailored to your preferences and dietary restrictions. Your new meal plan is now active and ready to view!",
"used_tools": [
"get_profile",
"create_plan"
]
}
{
"detail": "Invalid token payload"
}
{
"detail": "Error en el asistente: Connection timeout"
}