Improve LLM prompt (#118520)

This commit is contained in:
tronikos 2024-05-30 19:03:57 -07:00 committed by GitHub
parent 272c51fb38
commit 2bd142d3a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -253,8 +253,9 @@ class AssistAPI(API):
prompt = [ prompt = [
( (
"Call the intent tools to control Home Assistant. " "When controlling Home Assistant always call the intent tools. "
"Do not pass the domain to the intent tools as a list. " "Do not pass the domain to the intent tools as a list. "
"Use HassTurnOn to lock and HassTurnOff to unlock a lock. "
"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 domain." "When controlling an area, prefer passing just area name and domain."

View File

@ -422,8 +422,9 @@ async def test_assist_api_prompt(
+ yaml.dump(exposed_entities) + yaml.dump(exposed_entities)
) )
first_part_prompt = ( first_part_prompt = (
"Call the intent tools to control Home Assistant. " "When controlling Home Assistant always call the intent tools. "
"Do not pass the domain to the intent tools as a list. " "Do not pass the domain to the intent tools as a list. "
"Use HassTurnOn to lock and HassTurnOff to unlock a lock. "
"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 domain." "When controlling an area, prefer passing just area name and domain."