Close local release-quality gaps and reconcile workplan status
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 2s

Assistant: codex
Assistant-Model: gpt-6-astra
Assistant-Session: 01a0e332-3365-77c0-8491-084e9ea33ac1
This commit is contained in:
tegwick 2026-09-27 17:36:27 +02:00
parent 37436bb562
commit 7cd633986e
56 changed files with 462 additions and 237 deletions

View file

@ -2,7 +2,8 @@
Factory for creating embedding adapters by provider name.
"""
from typing import Optional, Any
from collections.abc import Callable
from typing import Any
from llm_connect.embedding_adapter import EmbeddingAdapter
from llm_connect.exceptions import LLMConfigurationError
@ -15,8 +16,8 @@ _EMBEDDING_PROVIDERS = {
def create_embedding_adapter(
provider: str = "openai",
model: Optional[str] = None,
api_key: Optional[str] = None,
model: str | None = None,
api_key: str | None = None,
**kwargs: Any,
) -> EmbeddingAdapter:
"""Instantiate an :class:`EmbeddingAdapter` for the given *provider*.
@ -45,6 +46,6 @@ def create_embedding_adapter(
module_path, class_name = fqn.rsplit(".", 1)
import importlib
mod = importlib.import_module(module_path)
cls = getattr(mod, class_name)
cls: Callable[..., EmbeddingAdapter] = getattr(mod, class_name)
return cls(model=model, api_key=api_key, provider=provider, **kwargs)