From 39d363dc54140f5e629a0bf105a4249ea69d020d Mon Sep 17 00:00:00 2001 From: smkrv <17809065+smkrv@users.noreply.github.com> Date: Thu, 14 Nov 2024 18:30:03 +0300 Subject: [PATCH] Create const.py --- custom_components/ha_text_ai/const.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 custom_components/ha_text_ai/const.py diff --git a/custom_components/ha_text_ai/const.py b/custom_components/ha_text_ai/const.py new file mode 100644 index 0000000..18b2b64 --- /dev/null +++ b/custom_components/ha_text_ai/const.py @@ -0,0 +1,12 @@ +"""Constants for the HA Text AI Integration.""" +DOMAIN = "ha_text_ai" + +CONF_API_KEY = "api_key" +CONF_API_BASE = "api_base" +CONF_REQUEST_INTERVAL = "request_interval" +DEFAULT_API_BASE = "https://api.openai.com/v1" +DEFAULT_REQUEST_INTERVAL = 2 + +# Text Helper related +TEXT_HELPER_MAX_LENGTH = 65536 +TEXT_HELPER_PREFIX = "text_ai_response_"