AbstractAdapter
dataclass
Bases: ABC
The AbstractAdapter serves as the base for all concrete Adapter classes. It provides an interface for interaction between the Small Language Model (SLM) and the Backend.
backends: list[AbstractBackend]
abstractmethod
property
writable
Returns our backends
facts: list[str]
abstractmethod
property
Lists all known facts.
heuristics
abstractmethod
property
Lists all known heuristics.
inferencers
abstractmethod
property
Lists all known inferencers.
add_backend(backend)
abstractmethod
Adds a backend to our adapter
enumerate_backends(lambda_function)
Enumerate backends and apply lambda function to each backend.
load(storage_dir)
abstractmethod
Loads from the specified directory.
query_all(user_input, conversation=None)
abstractmethod
Queries the backends for a response to the user's input. :param user_query: The user's input. :return: The backend's response.
save(storage_dir)
abstractmethod
Saves to the specified directory.
select_facts(criteria)
abstractmethod
Selects or searches for facts based on provided criteria.
select_heuristics(criteria)
abstractmethod
Selects or searches for heuristics based on provided criteria.
select_inferencers(criteria)
abstractmethod
Selects or searches for inferencers based on provided criteria.