mirror of
https://github.com/smkrv/ha-text-ai.git
synced 2026-07-30 20:03:56 +08:00
Release v2.0.0
This commit is contained in:
@@ -44,8 +44,7 @@ from .const import (
|
|||||||
import logging
|
import logging
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
STEP_USER_DATA_SCHEMA = vol.Schema(
|
STEP_USER_DATA_SCHEMA = vol.Schema({
|
||||||
{
|
|
||||||
vol.Required(CONF_API_KEY): cv.string,
|
vol.Required(CONF_API_KEY): cv.string,
|
||||||
vol.Optional(CONF_MODEL, default=DEFAULT_MODEL): cv.string,
|
vol.Optional(CONF_MODEL, default=DEFAULT_MODEL): cv.string,
|
||||||
vol.Optional(
|
vol.Optional(
|
||||||
@@ -69,16 +68,14 @@ STEP_USER_DATA_SCHEMA = vol.Schema(
|
|||||||
cv.string,
|
cv.string,
|
||||||
vol.Match(r'^https?://.+', msg="Must be a valid HTTP(S) URL")
|
vol.Match(r'^https?://.+', msg="Must be a valid HTTP(S) URL")
|
||||||
),
|
),
|
||||||
): cv.string,
|
|
||||||
vol.Optional(
|
vol.Optional(
|
||||||
CONF_REQUEST_INTERVAL,
|
CONF_REQUEST_INTERVAL,
|
||||||
default=DEFAULT_REQUEST_INTERVAL
|
default=DEFAULT_REQUEST_INTERVAL
|
||||||
): vol.All(
|
): vol.All(
|
||||||
vol.Coerce(float),
|
vol.Coerce(float),
|
||||||
vol.Range(min=MIN_REQUEST_INTERVAL)
|
vol.Range(min=MIN_REQUEST_INTERVAL)
|
||||||
),
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
})
|
||||||
|
|
||||||
async def validate_api_connection(
|
async def validate_api_connection(
|
||||||
hass,
|
hass,
|
||||||
|
|||||||
Reference in New Issue
Block a user