BaseAdapter
Bases: AbstractAdapter
Base adapter class for SSMs.
backends: list[AbstractBackend]
property
writable
Side effect: if no backends are set, a default TextBackend is created.
facts
property
List facts from all backends.
heuristics
property
List heuristics from all backends.
inferencers
property
List inferencers from all backends.
add_backend(backend)
Add a backend to the list of backends.
add_fact(fact)
Idiom: add a fact to the first backend we have.
enumerate_backends(lambda_function)
Enumerate backends and apply lambda function to each backend.
load(storage_dir)
Loads from the specified directory.
query_all(user_input, conversation=None)
Queries the backends for a response to the user's input. :param user_query: The user's input. :return: The backend's responses
save(storage_dir)
Saves to the specified directory.
select_facts(criteria)
Select facts from all backends.
select_heuristics(criteria)
Select heuristics from all backends.
select_inferencers(criteria)
Select inferencers from all backends.