mirror of
https://github.com/acon96/home-llm.git
synced 2026-01-08 05:14:02 -05:00
Fix: merge entry.data with options so API key and base_url are available
This commit is contained in:
@@ -82,7 +82,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: LocalLLMConfigEntry) ->
|
||||
|
||||
def create_client(backend_type):
|
||||
_LOGGER.debug("Creating Local LLM client of type %s", backend_type)
|
||||
return BACKEND_TO_CLS[backend_type](hass, dict(entry.options))
|
||||
# Merge entry.data and entry.options - data has connection info, options has model settings
|
||||
client_options = {**dict(entry.data), **dict(entry.options)}
|
||||
return BACKEND_TO_CLS[backend_type](hass, client_options)
|
||||
|
||||
# create the agent in an executor job because the constructor calls `open()`
|
||||
backend_type = entry.data.get(CONF_BACKEND_TYPE, DEFAULT_BACKEND_TYPE)
|
||||
|
||||
Reference in New Issue
Block a user