Skip to content

Commit

Permalink
Ensure LLM always knows context
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob committed Jan 12, 2025
1 parent 89b5235 commit 4e8e446
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion homeassistant/components/assist_satellite/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,11 @@ async def async_internal_start_conversation(
raise SatelliteBusyError

self._is_announcing = True
self._extra_system_prompt = extra_system_prompt
# Provide our start info to the LLM so it understands context of incoming message
if extra_system_prompt is not None:
self._extra_system_prompt = extra_system_prompt
else:
self._extra_system_prompt = start_message or None

try:
await self.async_start_conversation(announcement)
Expand Down
2 changes: 1 addition & 1 deletion tests/components/assist_satellite/test_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ async def test_vad_sensitivity_entity_not_found(
"start_media_id": "media-source://bla",
},
(
None,
"Hello",
AssistSatelliteAnnouncement(
"Hello", "https://www.home-assistant.io/resolved.mp3", "media_id"
),
Expand Down

0 comments on commit 4e8e446

Please sign in to comment.