Closed pieroit closed 1 month ago
I've tried with two dummies plugin like follows:
PLUGIN 1:
from cat.mad_hatter.decorators import hook
from cat.log import log
@hook(priority=3)
def before_cat_sends_message(final_output, cat):
# You can perform operations with the cat (modify working memory, access LLM, etc.)
log.debug("TEST ONE")
log.debug(final_output.content)
final_output.content += "TESTONE"
# You can return a new value that will be used instead of Cat calculated value
return final_output
PLUGIN 2:
from cat.mad_hatter.decorators import hook
from cat.log import log
@hook(priority=3)
def before_cat_sends_message(final_output, cat):
# You can perform operations with the cat (modify working memory, access LLM, etc.)
log.debug("TEST TWO")
log.debug(final_output.content)
final_output.content += "TESTTWO"
# You can return a new value that will be used instead of Cat calculated value
return final_output
and it seems to work correctly. The agent responds always with a message of the type: "GENERATED_TEXTTESTONETESTTWO". Maybe the bug that they exposed during the last dev meeting is only related to some hooks.
Did they provide more infos about it?
@jacopopalumbo01 same for me, could not manage to replicate the bug
@valentimarco do you have some hint?
The example of @jacopopalumbo01 is what i did with 2 plugins so idk...
(to be verified)
When there are two hooks with same name and same priority, one gets overridden.
Probably a bug in MadHatter's hooks cache