Skip to content

Commit

Permalink
Remove SDK factory leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
black-roland committed Dec 12, 2024
1 parent c141051 commit e091e4c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions custom_components/yandexgpt_conversation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from __future__ import annotations

import base64
from typing import Callable

import voluptuous as vol
from homeassistant.config_entries import ConfigEntry
Expand All @@ -22,7 +21,7 @@
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers import selector
from homeassistant.helpers.typing import ConfigType
from yandex_cloud_ml_sdk import AsyncYCloudML, YCloudML
from yandex_cloud_ml_sdk import AsyncYCloudML

from .const import ATTR_FILENAME, ATTR_PROMPT, ATTR_SEED, CONF_FOLDER_ID, DOMAIN
from .yandexart import YandexArt
Expand Down Expand Up @@ -89,10 +88,6 @@ async def render_image(call: ServiceCall) -> ServiceResponse:
return True


def sdk_factory(sdk, async_sdk) -> Callable[[bool], YCloudML | AsyncYCloudML]:
return lambda is_async: (async_sdk if is_async else sdk)


async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up YandexGPT from a config entry."""
settings = {**entry.data, **entry.options}
Expand Down

0 comments on commit e091e4c

Please sign in to comment.