-
-
Save Anto79-ops/19dae1311c7e5330b740fe4819cf6827 to your computer and use it in GitHub Desktop.
intent_script examples for LLMs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copy paste this into configuration.yaml | |
# Adjust the entities for your calendar, TODO, and weather. | |
# Adjust the send notification intent names, descriptions, and the notify.mobile_app_x service calls. | |
# Restart HA. | |
# | |
# Then you can say: | |
# "you can chain tool calls, send tomorrow's calendar events after summarizing them to Marisol" (this will call CalendarGetEvents followed by SendNotificationMarisol) | |
# "what's in my todo list" "send them to Nikos" | |
# "who created Home Assistant" "send your response to Nikos" | |
# "send a message to Nikos: hi there" | |
# "what's in my calendar for today" | |
# "what's in my calendar for tomorrow" | |
# "what's in my todo list" BTW, with the built in intents you can add items to a list, e.g. "add buy milk to my personal tasks" | |
# chain tools "send the weather forecast as a notification to Name1 and Name2" | |
# | |
# The sentences here are only used by the built in Home Assistant agent. They are not used or seen by LLMs. | |
# Conversation and Intents for LLM | |
conversation: | |
intents: | |
WeatherGetForecast: | |
- "Get weather forecast" | |
TodoGetItems: | |
- "Get items in my TODO" | |
CalendarGetEvents: | |
- "Get events in my calendar" | |
SendNotificationName1: | |
- "Send notification to Name1" | |
SendNotificationName2: | |
- "Send notification to Name2" | |
intent_script: | |
WeatherGetForecast: | |
description: "Gets weather forecast" | |
action: | |
- service: weather.get_forecasts | |
target: | |
entity_id: weather.forecast_home | |
data: | |
type: hourly | |
response_variable: result | |
- stop: "" | |
response_variable: result | |
speech: | |
text: "{{ action_response }}" | |
TodoGetItems: | |
description: "Gets items in my TODO" | |
action: | |
- service: todo.get_items | |
target: | |
entity_id: | |
- todo.list1 | |
- todo.list2 | |
- todo.list3 | |
- todo. [...] | |
response_variable: result | |
- stop: "" | |
response_variable: result | |
speech: | |
text: "{{ action_response }}" | |
CalendarGetEvents: | |
description: "Gets events in my calendar" | |
action: | |
- service: calendar.get_events | |
target: | |
entity_id: | |
- calendar.cal1 | |
- calendar.cal2 | |
- calendar.cal3 | |
- calendar.cal4 | |
- calendar.cal5 | |
- calendar. [...] | |
data_template: | |
start_date_time: "{{ today_at('00:00') }}" | |
duration: { "hours": 48 } | |
response_variable: result | |
- stop: "" | |
response_variable: result | |
speech: | |
text: "{{ action_response }}" | |
SendNotificationName1: | |
description: "Sends a notification message to Name1. Args: msg" | |
action: | |
- service: notify.mobile_app_name1 | |
data: | |
message: "{{ msg }}" | |
speech: | |
text: "Done" | |
SendNotificationName2: | |
description: "Sends a notification message to Name2. Args: msg" | |
action: | |
- service: notify.mobile_app_mobile_name2 | |
data: | |
message: "{{ msg }}" | |
speech: | |
text: "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment