"""EmbeddingProvider port — 文本向量化能力契约。""" from typing import Protocol, runtime_checkable @runtime_checkable class EmbeddingProvider(Protocol): async def embed_text(self, text: str) -> list[float]: """Embed a single text into a vector.""" ... async def embed_texts(self, texts: list[str]) -> list[list[float]]: """Embed multiple texts into vectors.""" ...