From 634e1c123fe6add9f1d5938892f2d6a3d5798162 Mon Sep 17 00:00:00 2001 From: tronikos Date: Thu, 30 May 2024 03:54:35 +0000 Subject: [PATCH] LLM prompt --- homeassistant/helpers/llm.py | 3 ++- tests/helpers/test_llm.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/homeassistant/helpers/llm.py b/homeassistant/helpers/llm.py index d1ce3047e7880a..535e2af4d042dd 100644 --- a/homeassistant/helpers/llm.py +++ b/homeassistant/helpers/llm.py @@ -250,9 +250,10 @@ def _async_get_api_prompt( prompt = [ ( "Call the intent tools to control Home Assistant. " + "Do not pass the domain to the intent tools as a list. " "When controlling a device, prefer passing just its name and its domain " "(what comes before the dot in its entity id). " - "When controlling an area, prefer passing just area name and a single domain." + "When controlling an area, prefer passing just area name and domain." ) ] area: ar.AreaEntry | None = None diff --git a/tests/helpers/test_llm.py b/tests/helpers/test_llm.py index 672b6a6642bbfb..63c1214dd6dcd3 100644 --- a/tests/helpers/test_llm.py +++ b/tests/helpers/test_llm.py @@ -423,9 +423,10 @@ def create_entity(device: dr.DeviceEntry, write_state=True) -> None: ) first_part_prompt = ( "Call the intent tools to control Home Assistant. " + "Do not pass the domain to the intent tools as a list. " "When controlling a device, prefer passing just its name and its domain " "(what comes before the dot in its entity id). " - "When controlling an area, prefer passing just area name and a single domain." + "When controlling an area, prefer passing just area name and domain." ) no_timer_prompt = "This device does not support timers."