Files
ha-text-ai/custom_components/ha_text_ai/const.py
T

31 lines
777 B
Python
Raw Normal View History

2024-11-18 00:43:28 +03:00
"""Constants for the HA text AI integration."""
from homeassistant.const import Platform
2024-11-14 18:30:03 +03:00
2024-11-19 00:51:57 +03:00
DOMAIN = "ha_text_ai"
2024-11-18 00:43:28 +03:00
PLATFORMS = [Platform.SENSOR]
2024-11-14 18:30:03 +03:00
2024-11-18 00:43:28 +03:00
# Configuration
CONF_MODEL = "model"
CONF_TEMPERATURE = "temperature"
CONF_MAX_TOKENS = "max_tokens"
CONF_API_ENDPOINT = "api_endpoint"
CONF_REQUEST_INTERVAL = "request_interval"
2024-11-15 00:59:39 +03:00
2024-11-18 00:43:28 +03:00
# Defaults
DEFAULT_MODEL = "gpt-3.5-turbo"
DEFAULT_TEMPERATURE = 0.7
DEFAULT_MAX_TOKENS = 1000
DEFAULT_API_ENDPOINT = "https://api.openai.com/v1"
DEFAULT_REQUEST_INTERVAL = 1.0
2024-11-18 02:02:36 +03:00
# Services
SERVICE_ASK_QUESTION = "ask_question"
SERVICE_CLEAR_HISTORY = "clear_history"
SERVICE_GET_HISTORY = "get_history"
SERVICE_SET_SYSTEM_PROMPT = "set_system_prompt"
2024-11-18 00:43:28 +03:00
# Attributes
ATTR_QUESTION = "question"
ATTR_RESPONSE = "response"
ATTR_LAST_UPDATED = "last_updated"