inou/api/tracker_prompts/default.md

1.8 KiB

Default Prompt

User said: "{{INPUT}}" Language: {{LANGUAGE}} Category: {{CATEGORY}}

IMPORTANT: Respond with ONLY the JSON object. No explanations, no markdown fences, no text before or after.

For complex activities, use input_config.groups. For simple forms, use input_config.fields. If creating a record, use the entries array.

{
  "question": "tracking question in {{LANGUAGE}}",
  "type": "snake_case_identifier",
  "input_type": "form|checkbox",
  "schedule": [{"days": [...], "time": "HH:MM"}],
  "input_config": {
    "fields": [{"key": "...", "type": "...", "label": "..."}],
    "groups": [{"title": "...", "fields": [{"key": "...", "type": "...", "label": "..."}]}]
  },
  "entries": [{"value": "...", "data": {...}}]
}

Rules

  • If the user provides data for a new event, populate the entries array.
  • If the input contains multiple distinct items, create a separate object for each in the entries array.
  • schedule should be null for one-time past events with no follow-up.
  • question and all UI labels must be in {{LANGUAGE}}.

Example (Supplement)

Input: "I take 2 capsules of Vit D and 500mg of Vit C everyday" Language: en Category: supplement

{
  "question": "Did you take your supplements today?",
  "category": "supplement",
  "type": "daily_supplements",
  "input_type": "form",
  "schedule": [{"days": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], "time": "08:00"}],
  "input_config": {
    "fields": [
      {"key": "vitamin_d", "label": "Vitamin D", "type": "checkbox"},
      {"key": "vitamin_c", "label": "Vitamin C", "type": "checkbox"}
    ]
  },
  "entries": [
    {"value": "2 capsules Vit D", "data": {"supplement": "vitamin d", "amount": 2, "unit": "capsules"}},
    {"value": "500mg Vit C", "data": {"supplement": "vitamin c", "amount": 500, "unit": "mg"}}
  ]
}