Fix ollama blocking on load_default_certs (#125012)
* Fix ollama blocking on load_default_certs * Use get_default_context instead of client_context
This commit is contained in:
parent
56667ec2bc
commit
ef8fc3913e
2 changed files with 6 additions and 2 deletions
|
@ -33,6 +33,7 @@ from homeassistant.helpers.selector import (
|
|||
TextSelectorConfig,
|
||||
TextSelectorType,
|
||||
)
|
||||
from homeassistant.util.ssl import get_default_context
|
||||
|
||||
from .const import (
|
||||
CONF_KEEP_ALIVE,
|
||||
|
@ -91,7 +92,9 @@ class OllamaConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||
errors = {}
|
||||
|
||||
try:
|
||||
self.client = ollama.AsyncClient(host=self.url)
|
||||
self.client = ollama.AsyncClient(
|
||||
host=self.url, verify=get_default_context()
|
||||
)
|
||||
async with asyncio.timeout(DEFAULT_TIMEOUT):
|
||||
response = await self.client.list()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue