Source code for gptcache.embedding.base

from abc import ABCMeta, abstractmethod


[docs]class BaseEmbedding(metaclass=ABCMeta): """ Base Embedding interface. """
[docs] @abstractmethod def to_embeddings(self, data, **kwargs): pass
@property @abstractmethod def dimension(self) -> int: return 0