Skip to content

before_cat_bootstrap

Intervene before the Cat has instantiated its components.

Warning

Please, note that at this point the CheshireCat hasn't yet finished to instantiate and the only already existing component is the MadHatter (e.g., no language models yet).

Bootstrapping is the process of loading the plugins, the natural language objects (e.g., the LLM), the memories, the Main Agent, the Rabbit Hole and the White Rabbit.

This hook allows intercepting the start of this process and is executed in the middle of plugins and natural language objects loading.

This hook can be used to set or store variables to be propagated to subsequent loaded objects.

📄 Arguments

This hook has no input arguments, other than the default cat:

Name Type Description
cat StrayCat Cheshire Cat instance, allows you to use the framework components.

â†Šī¸ Return

Returns? Oh no, dear developer, this function is a one-way trip into the rabbit hole.

✍ Example

from cat.mad_hatter.decorators import hook

@hook  # default priority = 1
def before_cat_bootstrap(cat):
    # do whatever here