Improve LLM prompt (#118443)

* Improve LLM prompt

* test

* improvements

* improvements
This commit is contained in:
tronikos 2024-05-29 18:44:33 -07:00 committed by Franck Nijhof
parent c6c36718b9
commit 3e0d9516a9
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
2 changed files with 6 additions and 2 deletions

View File

@ -250,7 +250,9 @@ class AssistAPI(API):
prompt = [ prompt = [
( (
"Call the intent tools to control Home Assistant. " "Call the intent tools to control Home Assistant. "
"When controlling an area, prefer passing area name and domain." "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."
) )
] ]
area: ar.AreaEntry | None = None area: ar.AreaEntry | None = None

View File

@ -423,7 +423,9 @@ async def test_assist_api_prompt(
) )
first_part_prompt = ( first_part_prompt = (
"Call the intent tools to control Home Assistant. " "Call the intent tools to control Home Assistant. "
"When controlling an area, prefer passing area name and domain." "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."
) )
no_timer_prompt = "This device does not support timers." no_timer_prompt = "This device does not support timers."