mirror of
https://github.com/smkrv/ha-text-ai.git
synced 2026-07-28 22:33:52 +08:00
Release v2.0.0
This commit is contained in:
@@ -213,7 +213,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
model=model,
|
model=model,
|
||||||
temperature=entry.data.get(CONF_TEMPERATURE, DEFAULT_TEMPERATURE),
|
temperature=entry.data.get(CONF_TEMPERATURE, DEFAULT_TEMPERATURE),
|
||||||
max_tokens=entry.data.get(CONF_MAX_TOKENS, DEFAULT_MAX_TOKENS),
|
max_tokens=entry.data.get(CONF_MAX_TOKENS, DEFAULT_MAX_TOKENS),
|
||||||
request_interval=entry.data.get(CONF_REQUEST_INTERVAL, DEFAULT_REQUEST_INTERVAL),
|
request_interval=float(entry.data.get(CONF_REQUEST_INTERVAL, DEFAULT_REQUEST_INTERVAL)),
|
||||||
session=session,
|
session=session,
|
||||||
is_anthropic=is_anthropic
|
is_anthropic=is_anthropic
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -41,6 +41,14 @@ class HATextAICoordinator(DataUpdateCoordinator):
|
|||||||
session: Optional[Any] = None,
|
session: Optional[Any] = None,
|
||||||
is_anthropic: bool = False,
|
is_anthropic: bool = False,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
request_interval = float(request_interval)
|
||||||
|
|
||||||
|
super().__init__(
|
||||||
|
hass,
|
||||||
|
_LOGGER,
|
||||||
|
name=DOMAIN,
|
||||||
|
update_interval=timedelta(seconds=request_interval),
|
||||||
|
)
|
||||||
"""Initialize coordinator."""
|
"""Initialize coordinator."""
|
||||||
super().__init__(
|
super().__init__(
|
||||||
hass,
|
hass,
|
||||||
|
|||||||
Reference in New Issue
Block a user