Skip to content

Commit

Permalink
[#217] fix warning of blocking call
Browse files Browse the repository at this point in the history
  • Loading branch information
jekalmin authored and jekalmin committed Nov 10, 2024
1 parent 399d5a7 commit 2d56659
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/extended_openai_conversation/helpers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from abc import ABC, abstractmethod
from datetime import timedelta
from functools import partial
import logging
import os
import re
Expand Down Expand Up @@ -152,7 +153,7 @@ async def validate_authentication(
http_client=get_async_client(hass),
)

await client.models.list(timeout=10)
await hass.async_add_executor_job(partial(client.models.list, timeout=10))


class FunctionExecutor(ABC):
Expand Down

0 comments on commit 2d56659

Please sign in to comment.