mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-27 02:44:22 +01:00
* Collect all embedding code into a single module * Collect all embedding code into a single module * actually, llm_utils is a better place * Oh, and remove the module now that we don't use it --------- Co-authored-by: Nicholas Tindle <nick@ntindle.com>
29 lines
507 B
Python
29 lines
507 B
Python
"""Base class for memory providers."""
|
|
import abc
|
|
|
|
from autogpt.config import AbstractSingleton, Config
|
|
|
|
cfg = Config()
|
|
|
|
|
|
class MemoryProviderSingleton(AbstractSingleton):
|
|
@abc.abstractmethod
|
|
def add(self, data):
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def get(self, data):
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def clear(self):
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def get_relevant(self, data, num_relevant=5):
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def get_stats(self):
|
|
pass
|