mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Consume extra system prompt in first pipeline (#136958)
This commit is contained in:
parent
71a40d9234
commit
ad86f9efd5
@ -264,7 +264,6 @@ class AssistSatelliteEntity(entity.Entity):
|
|||||||
await self.async_start_conversation(announcement)
|
await self.async_start_conversation(announcement)
|
||||||
finally:
|
finally:
|
||||||
self._is_announcing = False
|
self._is_announcing = False
|
||||||
self._extra_system_prompt = None
|
|
||||||
|
|
||||||
async def async_start_conversation(
|
async def async_start_conversation(
|
||||||
self, start_announcement: AssistSatelliteAnnouncement
|
self, start_announcement: AssistSatelliteAnnouncement
|
||||||
@ -282,6 +281,10 @@ class AssistSatelliteEntity(entity.Entity):
|
|||||||
"""Triggers an Assist pipeline in Home Assistant from a satellite."""
|
"""Triggers an Assist pipeline in Home Assistant from a satellite."""
|
||||||
await self._cancel_running_pipeline()
|
await self._cancel_running_pipeline()
|
||||||
|
|
||||||
|
# Consume system prompt in first pipeline
|
||||||
|
extra_system_prompt = self._extra_system_prompt
|
||||||
|
self._extra_system_prompt = None
|
||||||
|
|
||||||
if self._wake_word_intercept_future and start_stage in (
|
if self._wake_word_intercept_future and start_stage in (
|
||||||
PipelineStage.WAKE_WORD,
|
PipelineStage.WAKE_WORD,
|
||||||
PipelineStage.STT,
|
PipelineStage.STT,
|
||||||
@ -358,7 +361,7 @@ class AssistSatelliteEntity(entity.Entity):
|
|||||||
),
|
),
|
||||||
start_stage=start_stage,
|
start_stage=start_stage,
|
||||||
end_stage=end_stage,
|
end_stage=end_stage,
|
||||||
conversation_extra_system_prompt=self._extra_system_prompt,
|
conversation_extra_system_prompt=extra_system_prompt,
|
||||||
),
|
),
|
||||||
f"{self.entity_id}_pipeline",
|
f"{self.entity_id}_pipeline",
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user