Instruct LLM to not pass a list to the domain (#118451)
This commit is contained in:
parent
639f6c640c
commit
4893faa671
2 changed files with 4 additions and 2 deletions
|
@ -250,9 +250,10 @@ class AssistAPI(API):
|
||||||
prompt = [
|
prompt = [
|
||||||
(
|
(
|
||||||
"Call the intent tools to control Home Assistant. "
|
"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 "
|
"When controlling a device, prefer passing just its name and its domain "
|
||||||
"(what comes before the dot in its entity id). "
|
"(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
|
area: ar.AreaEntry | None = None
|
||||||
|
|
|
@ -423,9 +423,10 @@ 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. "
|
||||||
|
"Do not pass the domain to the intent tools as a list. "
|
||||||
"When controlling a device, prefer passing just its name and its domain "
|
"When controlling a device, prefer passing just its name and its domain "
|
||||||
"(what comes before the dot in its entity id). "
|
"(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."
|
no_timer_prompt = "This device does not support timers."
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue