Add render prompt method when no API selected (#118136)

This commit is contained in:
Paulus Schoutsen 2024-05-26 07:35:15 -04:00 committed by GitHub
parent dff8c06166
commit 233c3bb2be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 6 deletions

View file

@ -23,10 +23,14 @@ from .singleton import singleton
LLM_API_ASSIST = "assist"
PROMPT_NO_API_CONFIGURED = (
"Only if the user wants to control a device, tell them to edit the AI configuration "
"and allow access to Home Assistant."
)
@callback
def async_render_no_api_prompt(hass: HomeAssistant) -> str:
"""Return the prompt to be used when no API is configured."""
return (
"Only if the user wants to control a device, tell them to edit the AI configuration "
"and allow access to Home Assistant."
)
@singleton("llm")