From fc1ad3e5d8853620e089a6e2234ee5b00948011d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C6=B0u=20Quang=20V=C5=A9?= Date: Sun, 22 Mar 2026 21:12:50 +0700 Subject: [PATCH] Optimize default prompts to significantly reduce tokens usage. --- ac_mode_and_fan_control_full_llm.yaml | 8 +-- advanced_google_search_full_llm.yaml | 4 +- advanced_youtube_search_full_llm.yaml | 4 +- calendar_events_lookup_full_llm.yaml | 8 +-- camera_snapshot_full_llm.yaml | 2 +- control_music_full_llm.yaml | 34 +++++----- create_calendar_event_full_llm.yaml | 12 ++-- date_lookup_and_conversion_full_llm.yaml | 6 +- device_control_timer_full_llm.yaml | 6 +- device_location_lookup_full_llm.yaml | 2 +- device_ringing_full_llm.yaml | 2 +- devices_schedules_controller_full_llm.yaml | 10 +-- fan_oscillation_control_full_llm.yaml | 4 +- ...peed_and_oscillation_control_full_llm.yaml | 8 +-- fan_speed_control_full_llm.yaml | 6 +- file_content_analyzer_full_llm.yaml | 6 +- get_youtube_video_info_full_llm.yaml | 4 +- memory_tool_full_llm.yaml | 18 +++--- play_youtube_video_full_llm.yaml | 2 +- pyproject.toml | 3 +- send_to_telegram_full_llm.yaml | 15 +++-- send_to_zalo_bot_full_llm.yaml | 13 ++-- send_to_zalo_custom_bot_full_llm.yaml | 11 ++-- telegram_bot_webhook.yaml | 62 +++++++++---------- traffic_fine_lookup_full_llm.yaml | 4 +- weather_forecast_full_llm.yaml | 8 +-- zalo_bot_webhook.yaml | 12 ++-- zalo_custom_bot_webhook.yaml | 12 ++-- 28 files changed, 139 insertions(+), 147 deletions(-) diff --git a/ac_mode_and_fan_control_full_llm.yaml b/ac_mode_and_fan_control_full_llm.yaml index d3a80df..14a0f14 100644 --- a/ac_mode_and_fan_control_full_llm.yaml +++ b/ac_mode_and_fan_control_full_llm.yaml @@ -75,7 +75,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Provide AC names to control. Use semicolons (;) to separate multiple names. + Required: AC names to control. Separate multiple with semicolon (;). hvac_mode_prompt: name: HVAC Mode Prompt description: The prompt which will be used for the LLM can provide the AC mode. @@ -83,7 +83,7 @@ blueprint: text: multiline: true default: |- - Set AC mode (auto, cool, heat, dry, fan_only, off). Include ONLY if explicitly requested. Return error if unsupported; do not guess. + AC mode (`auto`, `cool`, `heat`, `dry`, `fan_only`, `off`). Only if requested. Error if unsupported; no guessing. temperature_prompt: name: Temperature Prompt description: The prompt which will be used for the LLM can provide the target temperature. @@ -91,7 +91,7 @@ blueprint: text: multiline: true default: |- - Target temperature as a number (e.g. 24). Convert F to C if needed. Omit units (C/F). Include ONLY for explicit requests. + Target temp as number (e.g. `24`). Convert F to C. No units. Only if requested. fan_mode_prompt: name: Fan Mode Prompt description: The prompt which will be used for the LLM can provide the fan speed/mode of the AC. @@ -99,7 +99,7 @@ blueprint: text: multiline: true default: |- - Set fan speed (auto, low/1, lowmid/2, mid/3, highmid/4, high/5). Map to the closest supported mode. Include ONLY if requested. Error if no match; do not guess. + Fan speed (`auto`, `low`/`1`, `lowmid`/`2`, `mid`/`3`, `highmid`/`4`, `high`/`5`). Map to closest. Only if requested. No guessing. mode: parallel max_exceeded: silent description: Controls mode, temperature, and fan speed for air conditioners. Supports auto, cool, heat, dry, and fan_only modes. diff --git a/advanced_google_search_full_llm.yaml b/advanced_google_search_full_llm.yaml index 79fee04..41fd0f6 100644 --- a/advanced_google_search_full_llm.yaml +++ b/advanced_google_search_full_llm.yaml @@ -56,7 +56,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Search query. Silence-correct misspellings if likely intended. Do not ask for clarification. + Required: Search query. Silence-correct misspellings. No clarification. language_prompt: name: Language Prompt description: The prompt which will be used for the LLM can provide the language for the query. @@ -64,7 +64,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Language tag (e.g. vi-VN, en-US). Must match user language. + Required: Language tag (e.g. `en-US`). Match user language. mode: parallel max_exceeded: silent description: Searches Google to retrieve real-time information, facts, or answers from the web. Use when local knowledge is insufficient. diff --git a/advanced_youtube_search_full_llm.yaml b/advanced_youtube_search_full_llm.yaml index f9f0b98..9e973d9 100644 --- a/advanced_youtube_search_full_llm.yaml +++ b/advanced_youtube_search_full_llm.yaml @@ -71,7 +71,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Search query. Silence-correct misspellings. For results, use ordinal numbers for selection; omit Media IDs. Confirm before proceeding if query is ambiguous. + Required: Search query. Silence-correct misspellings. Use ordinals for results, omit Media IDs. Confirm if ambiguous. page_token_prompt: name: Page Token Prompt description: The prompt which will be used for the LLM can provide the page token to get additional videos that could be obtained. @@ -79,7 +79,7 @@ blueprint: text: multiline: true default: |- - Optional. Use to fetch more videos if initial results are unsatisfactory. + Optional: Token to fetch more videos. mode: parallel max_exceeded: silent description: Searches YouTube for videos and returns a list of matching results with titles and descriptions. Use to find specific content or playlists. diff --git a/calendar_events_lookup_full_llm.yaml b/calendar_events_lookup_full_llm.yaml index 63bfbd9..890b9dc 100644 --- a/calendar_events_lookup_full_llm.yaml +++ b/calendar_events_lookup_full_llm.yaml @@ -51,7 +51,7 @@ blueprint: text: multiline: true default: |- - Mandatory. 'daily' for full days/long periods; 'hourly' for partial days/specific times. Response must only include day of week and start date. + Required: `daily` (full days) or `hourly` (partial). Output only day of week and start date. time_period_length_prompt: name: Time Period Length Prompt description: The prompt which will be used for the LLM can provide the length of the period. @@ -59,7 +59,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Length in days (if daily) or hours (if hourly). E.g. 1 (today), 7 (week), 6 (afternoon). + Required: Length in days/hours (e.g. 1, 7, 6). date_prompt: name: Date Prompt description: The prompt which will be used for the LLM can provide the start date for the events period. @@ -67,7 +67,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Start date (YYYY-MM-DD). Default to today if unspecified. For "night", use next day unless current time < 05:00:00. + Required: Start date (`YYYY-MM-DD`). Default today. `Night` = next day if >= `05:00:00`. time_prompt: name: Time Prompt description: The prompt which will be used for the LLM can provide the start time for the events period. @@ -75,7 +75,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Start time (HH:MM:SS). Full day = 00:00:00. Morning = 06:00:00, Afternoon = 12:00:00, Evening = 18:00:00, Night = 00:00:00. + Required: Start time (`HH:MM:SS`). Morning=`06:00:00`, Afternoon=`12:00:00`, Evening=`18:00:00`, Night/Full day=`00:00:00`. mode: parallel max_exceeded: silent description: Retrieves upcoming or past calendar events for a specific time period. Useful for checking schedules and appointments. diff --git a/camera_snapshot_full_llm.yaml b/camera_snapshot_full_llm.yaml index 4369ef4..3ea9611 100644 --- a/camera_snapshot_full_llm.yaml +++ b/camera_snapshot_full_llm.yaml @@ -100,7 +100,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Camera friendly name. If unclear, determine from context or suggest. For multiple cameras, use separate tool calls. Returns local image path. + Required: Camera friendly name. Multiple cameras = multiple calls. Returns local image path. mode: parallel max_exceeded: silent description: Captures and saves a camera snapshot. Returns the local file path for analysis or messaging tools. Useful for visual verification of a scene. diff --git a/control_music_full_llm.yaml b/control_music_full_llm.yaml index 0e31a96..dc37440 100644 --- a/control_music_full_llm.yaml +++ b/control_music_full_llm.yaml @@ -82,7 +82,7 @@ blueprint: multiline: true multiple: false default: |- - Mandatory. Values: track (single/list), album, artist, playlist, radio. Default to 'track' for genre/mood requests and list matching songs in media_id. + Required: track, album, artist, playlist, radio. Default: `track` for genre/mood/list. artist_prompt: name: Artist Prompt description: The prompt that the LLM will use to provide the artist. @@ -90,8 +90,8 @@ blueprint: text: multiline: true multiple: false - default: - Requested artist or track artist. Empty string if unknown or multiple artists requested. + default: |- + Requested artist(s). Empty if unknown/multiple. album_prompt: name: Album Prompt description: The prompt that the LLM will use to provide the album. @@ -99,8 +99,8 @@ blueprint: text: multiline: true multiple: false - default: - Requested album. Empty string if unknown or multiple albums requested. + default: |- + Requested album. Empty if unknown/multiple. media_id_prompt: name: Media ID Prompt description: The prompt that the LLM will use to provide the media_id. @@ -109,9 +109,7 @@ blueprint: multiline: true multiple: false default: |- - Mandatory. Specific name(s). - - Tracks/Albums: Provide names (semicolon separated). If ambiguous, use "Artist - Track". - - Artists/Playlists/Radio: Provide exact name. Remove "playlist" keyword (e.g., "Favorites"). + Required: Specific name(s). Tracks/Albums: semicolon separated. Artists/Playlists/Radio: exact name (omit `playlist` keyword). media_description_prompt: name: Media Description Prompt description: The prompt that the LLM will use to provide the media description. @@ -119,12 +117,8 @@ blueprint: text: multiline: true multiple: false - default: - The "media_description" key is used to describe the media which - will be played. This can be taken from the voice command query, but it - should be only the part which is relevant for the media. So if the voice - request is "Play the best Queen songs on the living room player" the value - for "media_description" should be "the best Queen songs" + default: |- + Required: Extracted media description from query (e.g. `the best Queen songs`). Omit area/player details. area_prompt: name: Area Prompt description: The prompt that the LLM will use to provide the area. @@ -132,8 +126,8 @@ blueprint: text: multiline: true multiple: false - default: - Requested area(s). Default to the area of the initiating device. Omit if player is specified unless both are explicitly named. + default: |- + Requested area(s). Default to initiating device area. Omit if player specified. media_player_prompt: name: Media Player Prompt description: The prompt that the LLM will use to provide the media player. @@ -141,8 +135,8 @@ blueprint: text: multiline: true multiple: false - default: - Target Music Assistant media_player entity_id(s). Use ONLY if specifically mentioned. + default: |- + Target Music Assistant `media_player` entity_id(s). ONLY if explicitly mentioned. shuffle_prompt: name: Shuffle Prompt description: The prompt that the LLM will use to determine whether to turn on shuffle or not. @@ -150,8 +144,8 @@ blueprint: text: multiline: true multiple: false - default: - Mandatory. Boolean. Set true ONLY if the user specifically mentions shuffling. Otherwise false. Do not guess. + default: |- + Required: `true` or `false`. `true` ONLY if shuffling explicitly requested. No guessing. addition_conditions_actions: name: Additional actions icon: mdi:wrench diff --git a/create_calendar_event_full_llm.yaml b/create_calendar_event_full_llm.yaml index 56fea6f..c9254d0 100644 --- a/create_calendar_event_full_llm.yaml +++ b/create_calendar_event_full_llm.yaml @@ -63,7 +63,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Subject or title of the event. + Required: Event subject/title. description_prompt: name: Description Prompt description: Detailed description of the event. @@ -71,7 +71,7 @@ blueprint: text: multiline: true default: |- - Optional. Full details of the event. + Optional: Event details. start_date_time_prompt: name: Start Time Prompt description: Start date and time for timed events. @@ -79,7 +79,7 @@ blueprint: text: multiline: true default: |- - Use ONLY for timed events (YYYY-MM-DD HH:MM:SS). Excludes start_date. + For timed events only (`YYYY-MM-DD HH:MM:SS`). No `start_date`. end_date_time_prompt: name: End Time Prompt description: End date and time for timed events. @@ -87,7 +87,7 @@ blueprint: text: multiline: true default: |- - Mandatory for timed events. Default: start + 2h. Excludes end_date. + Required for timed events. Default: start + 2h. No `end_date`. start_date_prompt: name: Start Date Prompt description: Start date for all-day events. @@ -95,7 +95,7 @@ blueprint: text: multiline: true default: |- - Use ONLY for all-day events (YYYY-MM-DD). Excludes start_date_time. + For all-day events only (`YYYY-MM-DD`). No `start_date_time`. end_date_prompt: name: End Date Prompt description: End date for all-day events. @@ -103,7 +103,7 @@ blueprint: text: multiline: true default: |- - Mandatory for all-day events. Default: start + 1 day. Excludes end_date_time. + Required for all-day events. Default: start + 1d. No `end_date_time`. mode: queued max: !input simultaneous max_exceeded: silent diff --git a/date_lookup_and_conversion_full_llm.yaml b/date_lookup_and_conversion_full_llm.yaml index 2f7f809..d76e2e9 100644 --- a/date_lookup_and_conversion_full_llm.yaml +++ b/date_lookup_and_conversion_full_llm.yaml @@ -48,7 +48,7 @@ blueprint: text: multiline: true default: |- - Mandatory. 's2l' (Solar to Lunar) or 'l2s' (Lunar to Solar). Response must include: day of week, both dates, and days remaining/elapsed. + Required: `s2l` (Solar->Lunar) or `l2s` (Lunar->Solar). Output day of week, both dates, days diff. date_prompt: name: Date Prompt description: The prompt which will be used for the LLM can provide the input date for the conversion. @@ -56,7 +56,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Date (YYYY-MM-DD). If year unspecified, use current year. Use today/tomorrow as needed. + Required: Date (`YYYY-MM-DD`). If no year, use current. leap_month_prompt: name: Leap Month Prompt description: The prompt which will be used for the LLM can provide the leap month for the conversion. @@ -64,7 +64,7 @@ blueprint: text: multiline: true default: |- - Optional for l2s. 'true' for leap month, 'false' for regular. Do not use for s2l. + Optional for `l2s`: `true`=leap month, `false`=regular. Skip for `s2l`. mode: parallel max_exceeded: silent description: Converts dates between Solar and Lunar calendars, looks up auspicious days, and determines the day of the week. diff --git a/device_control_timer_full_llm.yaml b/device_control_timer_full_llm.yaml index dee60dd..6bad979 100644 --- a/device_control_timer_full_llm.yaml +++ b/device_control_timer_full_llm.yaml @@ -87,7 +87,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Provide device names to control. Use semicolons (;) to separate multiple names. + Required: Device names. Semicolon-separated. control_prompt: name: Control Prompt description: The prompt which will be used for the LLM can provide the action. @@ -95,7 +95,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Action: 'true' (ON), 'false' (OFF). Do not guess. + Required: Action `true` (ON), `false` (OFF). No guessing. timer_prompt: name: Timer Prompt description: The prompt which will be used for the LLM can provide the delay of action. @@ -103,7 +103,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Delay as HH:MM:SS. Calculate from current time if a target time is specified. Relative to now. + Required: Delay as `HH:MM:SS`. Calculate from now if target specified. mode: parallel max_exceeded: silent description: Simple one-time timer for turning devices on or off after a delay. Use for basic "turn off in X minutes" requests. diff --git a/device_location_lookup_full_llm.yaml b/device_location_lookup_full_llm.yaml index 9e42023..08f28a6 100644 --- a/device_location_lookup_full_llm.yaml +++ b/device_location_lookup_full_llm.yaml @@ -81,7 +81,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Provide names of tracked devices (phones, tags, etc.). Use semicolons (;) if multiple. If none specified, provide all relevant tracked devices. Prompt to ring if supported. + Required: Tracked device names (semicolon-separated). Ring if supported. mode: parallel max_exceeded: silent description: Retrieves real-time device locations (phones, tags, etc.) within the home. Use to find missing devices or check room presence. diff --git a/device_ringing_full_llm.yaml b/device_ringing_full_llm.yaml index c926155..9fa01cf 100644 --- a/device_ringing_full_llm.yaml +++ b/device_ringing_full_llm.yaml @@ -41,7 +41,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Valid Ring ID (starts with `notify.mobile_app_`). Do not guess. + Required: Valid Ring ID (`notify.mobile_app_*`). No guessing. mode: parallel max_exceeded: silent description: Triggers a notification or sound on a mobile device to help locate it. Requires a valid Ring ID. diff --git a/devices_schedules_controller_full_llm.yaml b/devices_schedules_controller_full_llm.yaml index 222c8a5..e454864 100644 --- a/devices_schedules_controller_full_llm.yaml +++ b/devices_schedules_controller_full_llm.yaml @@ -108,35 +108,35 @@ blueprint: text: multiline: true default: |- - Mandatory. exactly one: start (queue), cancel (stop latest), cancel_all (stop every), extend (add duration), pause (freeze), resume (restart), list (report). Output bare keyword only. + Required: `start`, `cancel`, `cancel_all`, `extend`, `pause`, `resume`, `list`. Keyword only. entities_prompt: name: Entities prompt selector: text: multiline: true default: |- - Entities to control (name/ID/alias). Semicolon-separated. Required for start, cancel, extend, pause, resume. Optional for list, cancel_all. Remove duplicates. + Entities (name/ID/alias). Semicolon-separated. Required for start/cancel/extend/pause/resume. Deduplicate. action_prompt: name: Action prompt selector: text: multiline: true default: |- - Required for start. use snake_case: turn_on/off, set_brightness/fan_speed/temperature/humidity/hvac_mode/volume, activate (scene), run_script, open/close, stop_cover, set_position, media_play/pause/stop, start/return_vacuum, press (button), announce (TTS). + Required for `start`. Snake_case action (`turn_on`/`off`, `set_brightness`, etc). value_prompt: name: Value prompt selector: text: multiline: true default: |- - Required for start if action needs value: 0-100 (pct/vol), numeric (temp), hvac_mode (cool/heat/etc), color name, boolean (oscillation), or text (announce). Empty if not needed. + Required for `start` if action needs value. Empty if not. duration_prompt: name: Duration prompt selector: text: multiline: true default: |- - Required for start or extend. Formats: HH:MM:SS, MM:SS, or seconds (e.g., 00:10:00, 600). Empty if not needed. + Required for `start`/`extend`. Format: `HH:MM:SS`, `MM:SS`, or seconds. Empty if not. mode: parallel max_exceeded: silent description: Advanced controller for managing multiple device timers. Can start, cancel, pause, resume, or list scheduled actions for various entities. diff --git a/fan_oscillation_control_full_llm.yaml b/fan_oscillation_control_full_llm.yaml index f5ead27..e0ecf81 100644 --- a/fan_oscillation_control_full_llm.yaml +++ b/fan_oscillation_control_full_llm.yaml @@ -75,7 +75,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Provide fan names to control. Use semicolons (;) to separate multiple names. + Required: Fan names. Semicolon-separated. oscillating_prompt: name: Oscillating Prompt description: The prompt which will be used for the LLM can provide the oscillation state. @@ -83,7 +83,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Set oscillation: 'true' (ON), 'false' (OFF). Do not guess. + Required: Set oscillation `true` (ON), `false` (OFF). No guessing. mode: parallel max_exceeded: silent description: Simple fan oscillation control (on/off) for specified fan entities. diff --git a/fan_speed_and_oscillation_control_full_llm.yaml b/fan_speed_and_oscillation_control_full_llm.yaml index 4e12344..55229c2 100644 --- a/fan_speed_and_oscillation_control_full_llm.yaml +++ b/fan_speed_and_oscillation_control_full_llm.yaml @@ -92,7 +92,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Provide fan names to control. Use semicolons (;) to separate multiple names. + Required: Fan names. Semicolon-separated. oscillating_prompt: name: Oscillating Prompt description: The prompt which will be used for the LLM can provide the oscillation state. @@ -100,7 +100,7 @@ blueprint: text: multiline: true default: |- - Set oscillation: 'true' for ON, 'false' for OFF. Include ONLY if oscillation change is requested. + Oscillation `true` (ON), `false` (OFF). Only if requested. speed_adjustment_prompt: name: Speed Adjustment Prompt description: The prompt which will be used for the LLM can provide speed adjustment. @@ -108,7 +108,7 @@ blueprint: text: multiline: true default: |- - Adjust speed: 'true' to increase, 'false' to decrease. Include ONLY if percentage is NOT specified. Do not guess. + Adjust speed: `true` (increase), `false` (decrease). Only if no percentage. No guessing. percentage_prompt: name: Percentage Prompt description: The prompt which will be used for the LLM can provide the speed percentage. @@ -116,7 +116,7 @@ blueprint: text: multiline: true default: |- - Set speed 1-100%. Map levels: min=1, low=25, medium=50, high=75, max=100. Include ONLY if speed_adjustment is NOT specified. + Speed 1-100%. Map (`min`=1, `low`=25, `med`=50, `high`=75, `max`=100). Only if no `speed_adjustment`. mode: parallel max_exceeded: silent description: Comprehensive fan control for adjusting speed (percentage/relative) and oscillation state for specified fans. diff --git a/fan_speed_control_full_llm.yaml b/fan_speed_control_full_llm.yaml index bb328c2..f703860 100644 --- a/fan_speed_control_full_llm.yaml +++ b/fan_speed_control_full_llm.yaml @@ -89,7 +89,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Provide fan names to control. Use semicolons (;) to separate multiple names. + Required: Fan names. Semicolon-separated. speed_adjustment_prompt: name: Speed Adjustment Prompt description: The prompt which will be used for the LLM can provide speed adjustment. @@ -97,7 +97,7 @@ blueprint: text: multiline: true default: |- - Adjust speed: 'true' to increase, 'false' to decrease. Include ONLY if percentage is NOT specified. Do not guess. + Adjust speed: `true` (increase), `false` (decrease). Only if no percentage. No guessing. percentage_prompt: name: Percentage Prompt description: The prompt which will be used for the LLM can provide the speed percentage. @@ -105,7 +105,7 @@ blueprint: text: multiline: true default: |- - Set speed 1-100%. Map levels: min=1, low=25, medium=50, high=75, max=100. Include ONLY if speed_adjustment is NOT specified. + Speed 1-100%. Map (`min`=1, `low`=25, `med`=50, `high`=75, `max`=100). Only if no `speed_adjustment`. mode: parallel max_exceeded: silent description: Simple fan speed control (percentage/relative) for specified fans. Use for basic speed adjustments. diff --git a/file_content_analyzer_full_llm.yaml b/file_content_analyzer_full_llm.yaml index 1fbee24..e26c551 100644 --- a/file_content_analyzer_full_llm.yaml +++ b/file_content_analyzer_full_llm.yaml @@ -52,7 +52,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Specify exact data to extract from image/video/audio/doc. Returns plain text only. Do not invent details. + Required: Exact data to extract. Returns plain text. Do not invent. file_path_prompt: name: File Path Prompt description: The prompt which will be used for the LLM can provide the file path for the query. @@ -60,7 +60,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Relative path starting with `local/`. Must be precise. + Required: Relative path (`local/*`). Precise. mime_type_prompt: name: MIME Type Prompt description: The prompt which will be used for the LLM can provide the MIME type of file for the query. @@ -68,7 +68,7 @@ blueprint: text: multiline: true default: |- - Mandatory. File MIME type (e.g., image/jpeg, video/mp4, application/pdf). Must match file content. + Required: MIME type (e.g., `image/jpeg`). Must match content. mode: parallel max_exceeded: silent description: Processes and analyzes file content (images, video, audio, or text) to provide summaries, transcriptions, or visual recognition based on instructions. diff --git a/get_youtube_video_info_full_llm.yaml b/get_youtube_video_info_full_llm.yaml index f2be43a..f501197 100644 --- a/get_youtube_video_info_full_llm.yaml +++ b/get_youtube_video_info_full_llm.yaml @@ -89,7 +89,7 @@ blueprint: text: multiline: true default: |- - Mandatory. YouTube channel names. Semicolon-separated if multiple. Silence-correct mispronunciations. After results, ask to play; use ordinal numbers, omit Media IDs. + Required: Channel names (semicolon-separated). Silence-correct. After results, ask to play using ordinals, omit Media IDs. period_length_prompt: name: Period Length Prompt description: The prompt which will be used for the LLM can provide the length of the period for the query. @@ -97,7 +97,7 @@ blueprint: text: multiline: true default: |- - Optional. Days since published (1-30). Default: 3. Today=1, Week=7, Month=30. + Optional: Days since published (1-30). Default: 3. Today=1, Week=7, Month=30. mode: parallel max_exceeded: silent description: Fetches a list of the most recent video uploads from one or more specified YouTube channels within a set timeframe. diff --git a/memory_tool_full_llm.yaml b/memory_tool_full_llm.yaml index 3303a77..d145e7c 100644 --- a/memory_tool_full_llm.yaml +++ b/memory_tool_full_llm.yaml @@ -49,7 +49,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Choose one: set (save), get (retrieve), search (find), forget (delete). Output exactly: set|get|search|forget. + Required: `set`, `get`, `search`, `forget`. Output exact word. key_prompt: name: Key Prompt description: Instruction shown to the LLM for providing the key. @@ -57,7 +57,7 @@ blueprint: text: multiline: true default: |- - Required for set|get|forget. Concise key in user language. No translation/paraphrase. Output only the key. Use 'search' if unsure. + Required for `set`/`get`/`forget`. Concise key in user language. No translation. Use `search` if unsure. value_prompt: name: Value Prompt description: Instruction shown to the LLM for providing the value. @@ -65,7 +65,7 @@ blueprint: text: multiline: true default: |- - Required for set. Raw value only (text/JSON). No quotes/explanations. + Required for `set`. Raw value only. No quotes/explanations. scope_prompt: name: Scope Prompt description: Instruction shown to the LLM for choosing the scope. @@ -73,7 +73,7 @@ blueprint: text: multiline: true default: |- - Required for set. user|household|session. One token only. Default: user. + Required for `set`: `user`, `household`, `session`. Default: `user`. expiration_days_prompt: name: Expiration (days) Prompt description: Instruction shown to the LLM for providing expiration. @@ -81,7 +81,7 @@ blueprint: text: multiline: true default: |- - Required for set. Days before expiry (0 = forever). Default: 180. Range 0-3650. + Required for `set`: Days before expiry (0=forever). Default: 180. Range 0-3650. tags_prompt: name: Tags Prompt description: Instruction shown to the LLM for providing tags. @@ -89,7 +89,7 @@ blueprint: text: multiline: true default: |- - Required for set. Meaningful keywords in user language. Use phrase/key if no keywords. + Required for `set`: Keywords in user language. Use phrase/key if none. force_new_prompt: name: Force New Prompt description: Instruction shown to the LLM for deciding whether to override duplicate-tag protection. @@ -97,7 +97,7 @@ blueprint: text: multiline: true default: |- - Optional for set. true|false. Output 'true' ONLY if user confirms duplicate override. Default: false. + Optional for `set`: `true`/`false`. `true` ONLY if user confirms override. Default: false. query_prompt: name: Query Prompt description: Instruction shown to the LLM for providing the search query. @@ -105,7 +105,7 @@ blueprint: text: multiline: true default: |- - Required for search. Search term or keywords. No translation/paraphrase. Output only query text. + Required for `search`: Search term/keywords. No translation. search_limit_prompt: name: Search Limit Prompt description: Instruction shown to the LLM for providing the search limit. @@ -113,7 +113,7 @@ blueprint: text: multiline: true default: |- - Required for search. Integer 1-50. Default: 5. Integer only. + Required for `search`: Integer 1-50. Default: 5. fields: operation: name: Operation diff --git a/play_youtube_video_full_llm.yaml b/play_youtube_video_full_llm.yaml index ac83b45..0abc503 100644 --- a/play_youtube_video_full_llm.yaml +++ b/play_youtube_video_full_llm.yaml @@ -51,7 +51,7 @@ blueprint: text: multiline: true default: |- - Mandatory. YouTube video ID. Do not guess. + Required: YouTube video ID. No guessing. mode: parallel max_exceeded: silent description: Initiates playback of a specific YouTube video (by ID) on a supported media player device. diff --git a/pyproject.toml b/pyproject.toml index 48a6bea..80c4e6b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,12 +3,13 @@ name = "tutorials" version = "1.0.0" description = "Home Assistant Blueprints & Tutorials" readme = "README.md" +requires-python = ">=3.14.2" dependencies = [ "aiohttp", "beautifulsoup4", "curl-cffi", "google-api-python-client", - "homeassistant>=2026.2.0", + "homeassistant>=2026.3", "orjson", ] diff --git a/send_to_telegram_full_llm.yaml b/send_to_telegram_full_llm.yaml index 68d9333..7913fdb 100644 --- a/send_to_telegram_full_llm.yaml +++ b/send_to_telegram_full_llm.yaml @@ -76,7 +76,7 @@ blueprint: text: multiline: true default: |- - Mandatory. ≤10 words overview (person/object/location). If image, write caption. Plain text only. For multiple items, use separate tool calls. + Required: <=10 words overview/caption. Plain text. Multiple items = multiple calls. detail_prompt: name: Detail Prompt description: Prompt shown to the LLM to request optional supporting details for the message or image. @@ -84,7 +84,7 @@ blueprint: text: multiline: true default: |- - Optional. Full details. No links/markdown/emojis. Avoid repeating summary. Return plain text only. + Optional: Full details. No links/markdown/emojis/repeats. Plain text. content_type_prompt: name: Content Type Prompt description: Prompt shown to the LLM to decide if the tool should send information, a location, or an image. @@ -92,8 +92,7 @@ blueprint: text: multiline: true default: |- - Mandatory. exactly one: information, location, image. location=place/address/map. image=visual media (+ image_path). - When submitting multiple items, use separate tool calls for each. + Required: `information`, `location`, or `image`. Multiple items = multiple calls. location_prompt: name: Location Prompt description: Prompt shown to the LLM to request the location value when sending a place. @@ -101,7 +100,7 @@ blueprint: text: multiline: true default: |- - Optional for location. Address only. No commas/punctuation. Regular spaces. + Optional for `location`: Address only. No commas/punctuation. image_path_prompt: name: Image Path Prompt description: Prompt shown to the LLM to request the media path when sending an image. @@ -109,7 +108,7 @@ blueprint: text: multiline: true default: |- - Optional for image. Existing path (local/ or /media/). Do not guess if unknown. + Optional for `image`: Existing path (`local/`, `/media/`). No guessing. chat_id_override_prompt: name: Chat ID Override Prompt description: Prompt shown to the LLM to request an alternate chat when needed. @@ -117,7 +116,7 @@ blueprint: text: multiline: true default: |- - Optional. User-specified Telegram ID. Digits only (can be negative). No commentary. + Optional: User-specified Telegram ID. Digits only. message_thread_id_override_prompt: name: Message Thread ID Override Prompt description: Prompt shown to the LLM to request a different topic when needed. @@ -125,7 +124,7 @@ blueprint: text: multiline: true default: |- - Optional. User-specified numeric thread/topic ID. Digits only. + Optional: User-specified thread/topic ID. Digits only. mode: queued max: 30 max_exceeded: silent diff --git a/send_to_zalo_bot_full_llm.yaml b/send_to_zalo_bot_full_llm.yaml index c4e1a4d..86c8597 100644 --- a/send_to_zalo_bot_full_llm.yaml +++ b/send_to_zalo_bot_full_llm.yaml @@ -68,7 +68,7 @@ blueprint: text: multiline: true default: |- - Mandatory. ≤10 words overview (person/object/location). If image, write caption. Plain text only. For multiple items, use separate tool calls. + Required: <=10 words overview/caption. Plain text. Multiple items = multiple calls. detail_prompt: name: Detail Prompt description: The prompt which will be used for the LLM can provide the message detail. @@ -76,7 +76,7 @@ blueprint: text: multiline: true default: |- - Optional. Full details. No links/markdown/emojis. Plain text only. For multiple items, use separate tool calls. + Optional: Full details. No links/markdown/emojis. Multiple items = multiple calls. content_type_prompt: name: Content Type Prompt description: The prompt which will be used for the LLM can specify the type of content for the message. @@ -84,8 +84,7 @@ blueprint: text: multiline: true default: |- - Mandatory. exactly one: information, location, image. location=place/address/map. image=visual media (+ image_path). - When submitting multiple items, use separate tool calls for each. + Required: `information`, `location`, or `image`. Multiple items = multiple calls. location_prompt: name: Location Prompt description: The prompt which will be used for the LLM can provide the location for the place. @@ -93,7 +92,7 @@ blueprint: text: multiline: true default: |- - Optional for location. Address only. No commas/punctuation. Regular spaces. + Optional for `location`: Address only. No commas/punctuation. image_path_prompt: name: Image Path Prompt description: Prompt shown to the LLM to request the media path when sending an image. @@ -101,7 +100,7 @@ blueprint: text: multiline: true default: |- - Optional for image. Existing path (local/ or /media/). Do not guess if unknown. + Optional for `image`: Existing path (`local/`, `/media/`). No guessing. chat_id_override_prompt: name: Chat ID Override Prompt description: Prompt shown to the LLM to request an alternate chat when needed. @@ -109,7 +108,7 @@ blueprint: text: multiline: true default: |- - Optional. User-specified Zalo ID. No spaces/commentary. + Optional: User-specified Zalo ID. No spaces. mode: queued max: 30 max_exceeded: silent diff --git a/send_to_zalo_custom_bot_full_llm.yaml b/send_to_zalo_custom_bot_full_llm.yaml index 95d1560..c7596f7 100644 --- a/send_to_zalo_custom_bot_full_llm.yaml +++ b/send_to_zalo_custom_bot_full_llm.yaml @@ -73,7 +73,7 @@ blueprint: text: multiline: true default: |- - Mandatory. ≤10 words overview (person/object/location). If image, write caption. Plain text only. For multiple items, use separate tool calls. + Required: <=10 words overview/caption. Plain text. Multiple items = multiple calls. detail_prompt: name: Detail Prompt description: The prompt which will be used for the LLM can provide the message detail. @@ -81,7 +81,7 @@ blueprint: text: multiline: true default: |- - Optional. Full details. No links/markdown/emojis. Plain text only. For multiple items, use separate tool calls. + Optional: Full details. No links/markdown/emojis. Multiple items = multiple calls. content_type_prompt: name: Content Type Prompt description: The prompt which will be used for the LLM can specify the type of content for the message. @@ -89,8 +89,7 @@ blueprint: text: multiline: true default: |- - Mandatory. exactly one: information, location, image. location=place/address/map. image=visual media (+ image_path). - When submitting multiple items, use separate tool calls for each. + Required: `information`, `location`, or `image`. Multiple items = multiple calls. location_prompt: name: Location Prompt description: The prompt which will be used for the LLM can provide the location for the place. @@ -98,7 +97,7 @@ blueprint: text: multiline: true default: |- - Optional for location. Address only. No commas/punctuation. Regular spaces. + Optional for `location`: Address only. No commas/punctuation. image_path_prompt: name: Image Path Prompt description: Prompt shown to the LLM to request the media path when sending an image. @@ -106,7 +105,7 @@ blueprint: text: multiline: true default: |- - Optional for image. Existing path (local/ or /media/). Do not guess if unknown. + Optional for `image`: Existing path (`local/`, `/media/`). No guessing. mode: queued max: 30 max_exceeded: silent diff --git a/telegram_bot_webhook.yaml b/telegram_bot_webhook.yaml index ed94c31..f83712e 100644 --- a/telegram_bot_webhook.yaml +++ b/telegram_bot_webhook.yaml @@ -148,7 +148,7 @@ actions: - variables: agent_input: system: |- - Always respond in the user language: {{ language | trim }}. + Always respond in language: {{ language | trim }}. prompt: |- {% if trigger.json.message.reply_to_message is defined %} {% if trigger.json.message.reply_to_message.text is defined %} {{ @@ -171,11 +171,11 @@ actions: - variables: agent_input: system: |- - Mandatory: Always use the *File Content Analyzer* to analyze file content. - If the prompt text is empty, treat any instruction or question found within the file (via transcription/OCR) as the user's request and execute it directly. - Return a concise summary ONLY when no specific instruction exists in the file. - NEVER ask the user for confirmation. - Always respond in the user language: {{ language | trim }}. + Required: Always use `File Content Analyzer`. + If prompt text empty, execute any instruction found inside file directly. + Return summary ONLY if no instruction exists. + NEVER ask for confirmation. + Always respond in language: {{ language | trim }}. prompt: |- {% if trigger.json.message.reply_to_message is defined %} {% if trigger.json.message.reply_to_message.text is defined %} {{ @@ -202,11 +202,11 @@ actions: - variables: agent_input: system: |- - Mandatory: Always use the *File Content Analyzer* to analyze file content. - If the prompt text is empty, treat any instruction or question found within the file (via transcription/OCR) as the user's request and execute it directly. - Return a concise summary ONLY when no specific instruction exists in the file. - NEVER ask the user for confirmation. - Always respond in the user language: {{ language | trim }}. + Required: Always use `File Content Analyzer`. + If prompt text empty, execute any instruction found inside file directly. + Return summary ONLY if no instruction exists. + NEVER ask for confirmation. + Always respond in language: {{ language | trim }}. prompt: |- {% if trigger.json.message.reply_to_message is defined %} {% if trigger.json.message.reply_to_message.text is defined %} {{ @@ -233,11 +233,11 @@ actions: - variables: agent_input: system: |- - Mandatory: Always use the *File Content Analyzer* to analyze file content. - If the prompt text is empty, treat any instruction or question found within the file (via transcription/OCR) as the user's request and execute it directly. - Return a concise summary ONLY when no specific instruction exists in the file. - NEVER ask the user for confirmation. - Always respond in the user language: {{ language | trim }}. + Required: Always use `File Content Analyzer`. + If prompt text empty, execute any instruction found inside file directly. + Return summary ONLY if no instruction exists. + NEVER ask for confirmation. + Always respond in language: {{ language | trim }}. prompt: |- {% if trigger.json.message.reply_to_message is defined %} {% if trigger.json.message.reply_to_message.text is defined %} {{ @@ -264,11 +264,11 @@ actions: - variables: agent_input: system: |- - Mandatory: Always use the *File Content Analyzer* to analyze file content. - If the prompt text is empty, treat any instruction or question found within the file (via transcription/OCR) as the user's request and execute it directly. - Return a concise summary ONLY when no specific instruction exists in the file. - NEVER ask the user for confirmation. - Always respond in the user language: {{ language | trim }}. + Required: Always use `File Content Analyzer`. + If prompt text empty, execute any instruction found inside file directly. + Return summary ONLY if no instruction exists. + NEVER ask for confirmation. + Always respond in language: {{ language | trim }}. prompt: |- {% if trigger.json.message.reply_to_message is defined %} {% if trigger.json.message.reply_to_message.text is defined %} {{ @@ -295,11 +295,11 @@ actions: - variables: agent_input: system: |- - Mandatory: Always use the *File Content Analyzer* to analyze file content. - If the prompt text is empty, treat any instruction or question found within the file (via transcription/OCR) as the user's request and execute it directly. - Return a concise summary ONLY when no specific instruction exists in the file. - NEVER ask the user for confirmation. - Always respond in the user language: {{ language | trim }}. + Required: Always use `File Content Analyzer`. + If prompt text empty, execute any instruction found inside file directly. + Return summary ONLY if no instruction exists. + NEVER ask for confirmation. + Always respond in language: {{ language | trim }}. prompt: |- {% if trigger.json.message.reply_to_message is defined %} {% if trigger.json.message.reply_to_message.text is defined %} {{ @@ -326,11 +326,11 @@ actions: - variables: agent_input: system: |- - Mandatory: Always use the *File Content Analyzer* to analyze file content. - If the prompt text is empty, treat any instruction or question found within the file (via transcription/OCR) as the user's request and execute it directly. - Return a concise summary ONLY when no specific instruction exists in the file. - NEVER ask the user for confirmation. - Always respond in the user language: {{ language | trim }}. + Required: Always use `File Content Analyzer`. + If prompt text empty, execute any instruction found inside file directly. + Return summary ONLY if no instruction exists. + NEVER ask for confirmation. + Always respond in language: {{ language | trim }}. prompt: |- {% if trigger.json.message.reply_to_message is defined %} {% if trigger.json.message.reply_to_message.text is defined %} {{ diff --git a/traffic_fine_lookup_full_llm.yaml b/traffic_fine_lookup_full_llm.yaml index f1a226a..18e530a 100644 --- a/traffic_fine_lookup_full_llm.yaml +++ b/traffic_fine_lookup_full_llm.yaml @@ -49,7 +49,7 @@ blueprint: text: multiline: true default: |- - Mandatory. Alphanumeric, no spaces. Silence-correct mispronunciations. Correct to most likely intended plate. + Required: Alphanumeric, no spaces. Silence-correct mispronunciations. vehicle_type_prompt: name: Vehicle Type Prompt description: The prompt which will be used for the LLM can provide the type of vehicle for the query. @@ -57,7 +57,7 @@ blueprint: text: multiline: true default: |- - Mandatory. exact value: 'car', 'motorbike', or 'electricbike'. Do not guess. + Required: `car`, `motorbike`, or `electricbike`. No guessing. mode: parallel max_exceeded: silent description: Queries traffic violation databases using a license plate and vehicle type to retrieve fine details accurately. diff --git a/weather_forecast_full_llm.yaml b/weather_forecast_full_llm.yaml index 9bd9231..9c36e34 100644 --- a/weather_forecast_full_llm.yaml +++ b/weather_forecast_full_llm.yaml @@ -75,7 +75,7 @@ blueprint: multiline: true multiple: false default: |- - Mandatory. 'daily' for full days (today, weekend, etc.); 'hourly' for partial days (this morning, at 3 PM, etc.). Output exactly: daily|hourly. + Required: `daily` (full days) or `hourly` (partial days). Exact output. time_period_length_prompt: name: Time period length prompt description: @@ -86,7 +86,7 @@ blueprint: multiline: true multiple: false default: |- - Mandatory. Integer length. Number of days (if daily) or hours (if hourly). E.g., 1 (today), 2 (weekend), 6 (afternoon/evening periods). + Required: Integer length. Days (if daily) or hours (if hourly). date_prompt: name: Date prompt description: @@ -97,7 +97,7 @@ blueprint: multiline: true multiple: false default: |- - Mandatory. Start date (YYYY-MM-DD). Default today. For 'night' requests, use next day's date unless current time is < 05:00:00. + Required: Start date (`YYYY-MM-DD`). Default today. `Night` = next day if >=`05:00:00`. time_prompt: name: Time prompt description: @@ -108,7 +108,7 @@ blueprint: multiline: true multiple: false default: |- - Mandatory. Start time (HH:MM:SS). Full day = 00:00:00. Morning = 06:00:00, Afternoon = 12:00:00, Evening = 18:00:00, Night = 00:00:00. + Required: Start time (`HH:MM:SS`). Morning=`06:00:00`, Afternoon=`12:00:00`, Evening=`18:00:00`, Night/Full day=`00:00:00`. mode: parallel max_exceeded: silent description: Retrieves home weather forecasts for specific periods (hourly or daily). Mandatory input for period type, length, start date, and time. Use 'daily' for full days and 'hourly' for partial day requests. diff --git a/zalo_bot_webhook.yaml b/zalo_bot_webhook.yaml index ceeab1f..6ea95cf 100644 --- a/zalo_bot_webhook.yaml +++ b/zalo_bot_webhook.yaml @@ -148,7 +148,7 @@ actions: - variables: agent_input: system: |- - Always respond in the user language: {{ language | trim }}. + Always respond in language: {{ language | trim }}. prompt: |- {{ trigger.json.message.text }} zalo_chat_id: "{{ trigger.json.message.chat.id }}" @@ -164,11 +164,11 @@ actions: - variables: agent_input: system: |- - Mandatory: Always use the *File Content Analyzer* to analyze file content. - If the prompt text is empty, treat any instruction or question found within the file (via transcription/OCR) as the user's request and execute it directly. - Return a concise summary ONLY when no specific instruction exists in the file. - NEVER ask the user for confirmation. - Always respond in the user language: {{ language | trim }}. + Required: Always use `File Content Analyzer`. + If prompt text empty, execute any instruction found inside file directly. + Return summary ONLY if no instruction exists. + NEVER ask for confirmation. + Always respond in language: {{ language | trim }}. prompt: |- {{ trigger.json.message.caption }} file_path: "{{ file.file_path if file.file_path is defined }}" diff --git a/zalo_custom_bot_webhook.yaml b/zalo_custom_bot_webhook.yaml index 84ace0c..b298379 100644 --- a/zalo_custom_bot_webhook.yaml +++ b/zalo_custom_bot_webhook.yaml @@ -148,7 +148,7 @@ actions: - variables: agent_input: system: |- - Always respond in the user language: {{ language | trim }}. + Always respond in language: {{ language | trim }}. prompt: |- {{ trigger.json.data.quote.msg if (trigger.json.data.quote is defined and trigger.json.data.quote.msg is defined) }} {{ trigger.json.data.content }} @@ -166,11 +166,11 @@ actions: - variables: agent_input: system: |- - Mandatory: Always use the *File Content Analyzer* to analyze file content. - If the prompt text is empty, treat any instruction or question found within the file (via transcription/OCR) as the user's request and execute it directly. - Return a concise summary ONLY when no specific instruction exists in the file. - NEVER ask the user for confirmation. - Always respond in the user language: {{ language | trim }}. + Required: Always use `File Content Analyzer`. + If prompt text empty, execute any instruction found inside file directly. + Return summary ONLY if no instruction exists. + NEVER ask for confirmation. + Always respond in language: {{ language | trim }}. prompt: |- {{ trigger.json.data.content.title }} file_path: "{{ file.file_path if file.file_path is defined }}"