""" Abstract base class for embedding adapters. Embedding adapters convert text into float vectors. This is a separate hierarchy from :class:`LLMAdapter` (text generation) because the API contract is fundamentally different: text in, float vectors out. """ from abc import ABC, abstractmethod class EmbeddingAdapter(ABC): """Base class for all embedding adapters.""" @abstractmethod def embed(self, texts: list[str]) -> list[list[float]]: """Embed a batch of texts into vectors. Args: texts: One or more strings to embed. Returns: A list of embedding vectors, one per input text, in the same order as *texts*. """ @abstractmethod def validate(self) -> bool: """Check that the adapter is configured correctly. Returns: ``True`` if the adapter has a valid configuration (e.g. API key present), ``False`` otherwise. """