Source code for langchain_db2.utils

"""Embeddings schema utils."""

from typing import Protocol, runtime_checkable


[docs] @runtime_checkable class EmbeddingsSchema(Protocol): """EmbeddingsSchema."""
[docs] def embed_documents(self, texts: list[str]) -> list[list[float]]: """Embed documents.""" ...
[docs] def embed_query(self, text: str) -> list[float]: """Embed query.""" ...