105 lines
3.2 KiB
Markdown
105 lines
3.2 KiB
Markdown
# Exercise Prompt
|
|
|
|
Extract exercise/activity details.
|
|
|
|
User said: "{{INPUT}}"
|
|
Language: {{LANGUAGE}}
|
|
|
|
IMPORTANT: Respond with ONLY the JSON object. No explanations, no markdown fences, no text before or after.
|
|
|
|
For complex activities with multiple parts, use the `input_config.groups` structure to group related fields.
|
|
|
|
```json
|
|
{
|
|
"question": "tracking question in {{LANGUAGE}}",
|
|
"type": "exercise_type",
|
|
"input_type": "form",
|
|
"schedule": [{"days": [...], "time": "HH:MM"}],
|
|
"input_config": {
|
|
"groups": [
|
|
{
|
|
"title": "Group Title",
|
|
"fields": [{"key": "...", "type": "...", "label": "..."}]
|
|
}
|
|
]
|
|
},
|
|
"entries": [{"value": "...", "data": {...}}]
|
|
}
|
|
```
|
|
|
|
## Schedule format
|
|
- `days`: array of "mon", "tue", "wed", "thu", "fri", "sat", "sun"
|
|
- `time`: 24h format "08:00", "12:00", "18:00" etc.
|
|
- Daily = all 7 days
|
|
|
|
## Standard fields
|
|
- `duration`: number (minutes)
|
|
- `distance`: number (km, miles)
|
|
- `intensity`: select [Light, Moderate, Vigorous]
|
|
|
|
## Rules
|
|
- If the activity has multiple distinct parts (e.g. left and right leg), create a `group` in `input_config` for each part.
|
|
- `entries` should be used for recording initial data. If multiple parts, create multiple entries.
|
|
|
|
## Examples
|
|
|
|
Input: "walked 30 minutes"
|
|
```json
|
|
{
|
|
"question": "Did you walk today?",
|
|
"type": "walk",
|
|
"input_type": "form",
|
|
"schedule": [{"days": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], "time": "08:00"}],
|
|
"input_config": {"fields": [{"key": "duration", "type": "number", "label": "Duration", "unit": "min"}]},
|
|
"entries": [{"value": "30 min walk", "data": {"duration": 30, "unit": "min"}}]
|
|
}
|
|
```
|
|
|
|
Input: "For my daughter, we have a leg trainer exercise we do twice a day. The right leg is for 20 minutes at 40 degrees and speed 4. The left leg is for 20 minutes at 30 degrees and speed 4."
|
|
```json
|
|
{
|
|
"question": "Did you do the leg trainer exercises today?",
|
|
"category": "exercise",
|
|
"type": "leg_trainer",
|
|
"input_type": "form",
|
|
"schedule": [
|
|
{"days": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], "time": "09:00"},
|
|
{"days": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], "time": "17:00"}
|
|
],
|
|
"input_config": {
|
|
"groups": [
|
|
{
|
|
"title": "Right Leg",
|
|
"fields": [
|
|
{ "key": "right_leg_duration", "type": "number", "label": "Duration (min)" },
|
|
{ "key": "right_leg_angle", "type": "number", "label": "Angle (°)" },
|
|
{ "key": "right_leg_speed", "type": "number", "label": "Speed" }
|
|
]
|
|
},
|
|
{
|
|
"title": "Left Leg",
|
|
"fields": [
|
|
{ "key": "left_leg_duration", "type": "number", "label": "Duration (min)" },
|
|
{ "key": "left_leg_angle", "type": "number", "label": "Angle (°)" },
|
|
{ "key": "left_leg_speed", "type": "number", "label": "Speed" }
|
|
]
|
|
},
|
|
{
|
|
"title": "Notes",
|
|
"fields": [
|
|
{ "key": "notes", "type": "text", "label": "Session Notes" }
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"entries": [
|
|
{
|
|
"value": "Leg trainer session",
|
|
"data": {
|
|
"right_leg": { "duration_min": 20, "degrees": 40, "speed": 4 },
|
|
"left_leg": { "duration_min": 20, "degrees": 30, "speed": 4 }
|
|
}
|
|
}
|
|
]
|
|
}
|
|
``` |