From b59bc45ef1f787a058f76e3d6e07ada39e690708 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 26 Oct 2025 09:20:43 -0400 Subject: [PATCH] Fix typo in Google Gen AI const (#155196) --- .../components/google_generative_ai_conversation/ai_task.py | 4 ++-- .../components/google_generative_ai_conversation/const.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/google_generative_ai_conversation/ai_task.py b/homeassistant/components/google_generative_ai_conversation/ai_task.py index 8355a3d260e..8c80af563b7 100644 --- a/homeassistant/components/google_generative_ai_conversation/ai_task.py +++ b/homeassistant/components/google_generative_ai_conversation/ai_task.py @@ -19,7 +19,7 @@ from .const import ( CONF_CHAT_MODEL, CONF_RECOMMENDED, LOGGER, - RECOMMENDED_A_TASK_MAX_TOKENS, + RECOMMENDED_AI_TASK_MAX_TOKENS, RECOMMENDED_IMAGE_MODEL, ) from .entity import ( @@ -80,7 +80,7 @@ class GoogleGenerativeAITaskEntity( ) -> ai_task.GenDataTaskResult: """Handle a generate data task.""" await self._async_handle_chat_log( - chat_log, task.structure, default_max_tokens=RECOMMENDED_A_TASK_MAX_TOKENS + chat_log, task.structure, default_max_tokens=RECOMMENDED_AI_TASK_MAX_TOKENS ) if not isinstance(chat_log.content[-1], conversation.AssistantContent): diff --git a/homeassistant/components/google_generative_ai_conversation/const.py b/homeassistant/components/google_generative_ai_conversation/const.py index d8b4c8e1b21..4626249a58f 100644 --- a/homeassistant/components/google_generative_ai_conversation/const.py +++ b/homeassistant/components/google_generative_ai_conversation/const.py @@ -33,7 +33,7 @@ RECOMMENDED_TOP_K = 64 CONF_MAX_TOKENS = "max_tokens" RECOMMENDED_MAX_TOKENS = 3000 # Input 5000, output 19400 = 0.05 USD -RECOMMENDED_A_TASK_MAX_TOKENS = 19400 +RECOMMENDED_AI_TASK_MAX_TOKENS = 19400 CONF_HARASSMENT_BLOCK_THRESHOLD = "harassment_block_threshold" CONF_HATE_BLOCK_THRESHOLD = "hate_block_threshold" CONF_SEXUAL_BLOCK_THRESHOLD = "sexual_block_threshold"