diff --git a/homeassistant/components/google_generative_ai_conversation/conversation.py b/homeassistant/components/google_generative_ai_conversation/conversation.py index f08c6c14e60..627b28d0966 100644 --- a/homeassistant/components/google_generative_ai_conversation/conversation.py +++ b/homeassistant/components/google_generative_ai_conversation/conversation.py @@ -224,7 +224,6 @@ class GoogleGenerativeAIConversationEntity( prompt = "\n".join( ( - api_prompt, template.Template( self.entry.options.get(CONF_PROMPT, DEFAULT_PROMPT), self.hass ).async_render( @@ -233,6 +232,7 @@ class GoogleGenerativeAIConversationEntity( }, parse_result=False, ), + api_prompt, ) ) diff --git a/homeassistant/components/openai_conversation/conversation.py b/homeassistant/components/openai_conversation/conversation.py index 2e6e985f8fd..2bd21429d9f 100644 --- a/homeassistant/components/openai_conversation/conversation.py +++ b/homeassistant/components/openai_conversation/conversation.py @@ -141,7 +141,6 @@ class OpenAIConversationEntity( prompt = "\n".join( ( - api_prompt, template.Template( options.get(CONF_PROMPT, DEFAULT_PROMPT), self.hass ).async_render( @@ -150,6 +149,7 @@ class OpenAIConversationEntity( }, parse_result=False, ), + api_prompt, ) ) diff --git a/tests/components/google_generative_ai_conversation/snapshots/test_conversation.ambr b/tests/components/google_generative_ai_conversation/snapshots/test_conversation.ambr index d3a4f4b4b58..e1f8141a692 100644 --- a/tests/components/google_generative_ai_conversation/snapshots/test_conversation.ambr +++ b/tests/components/google_generative_ai_conversation/snapshots/test_conversation.ambr @@ -30,8 +30,8 @@ 'history': list([ dict({ 'parts': ''' - Only if the user wants to control a device, tell them to edit the AI configuration and allow access to Home Assistant. Answer in plain text. Keep it simple and to the point. + Only if the user wants to control a device, tell them to edit the AI configuration and allow access to Home Assistant. ''', 'role': 'user', }), @@ -83,8 +83,8 @@ 'history': list([ dict({ 'parts': ''' - Only if the user wants to control a device, tell them to edit the AI configuration and allow access to Home Assistant. Answer in plain text. Keep it simple and to the point. + Only if the user wants to control a device, tell them to edit the AI configuration and allow access to Home Assistant. ''', 'role': 'user', }), @@ -136,8 +136,8 @@ 'history': list([ dict({ 'parts': ''' - Call the intent tools to control Home Assistant. Just pass the name to the intent. Answer in plain text. Keep it simple and to the point. + Call the intent tools to control Home Assistant. Just pass the name to the intent. ''', 'role': 'user', }), @@ -189,8 +189,8 @@ 'history': list([ dict({ 'parts': ''' - Call the intent tools to control Home Assistant. Just pass the name to the intent. Answer in plain text. Keep it simple and to the point. + Call the intent tools to control Home Assistant. Just pass the name to the intent. ''', 'role': 'user', }),