BaseSLM

Bases: AbstractSLM

adapter: AbstractAdapter property writable

Return the previous assigned Adapter, or a default Adapter if none was assigned.

conversations: dict property writable

Return the previous assigned conversations, or an empty dictionary if none was assigned.

__init__(adapter=None)

self.conversations is initialized as a dictionary of conversations, where each conversation is a list of user inputs and model replies.

do_discuss(user_input, conversation)

Add the user_input to the conversation, sends the whole conversation to the language model, and returns the reply.

load(storage_dir)

Loads from the specified directory.

save(storage_dir)

Saves to the specified directory.

PassthroughSLM

Bases: BaseSLM

The PassthroughSLM is a barebones SLM that simply passes all queries to the adapter.

do_discuss(user_input, conversation)

Pass through user input to the adapter and return the replies