-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] WhiteRabbit expansion #839
Comments
Hi Jacopo, thanks for organizing this discussion. Regarding point 1): I think we should stick with the current code and make WhiteRabbit a property of StrayCat just like MadHatter, RabbitHole, etc. it makes the code more consistent ...
@property
def white_rabbit(self):
return CheshireCat().white_rabbit
... Regarding point 2) and your proposal: I was wondering: do we really need this for every scheduling function? One could do some work ignoring the session and schedule a system-level job, if you need Stray you can still pass it as argument in the kwargs: from cat.mad_hatter.decorators import hook
from cat.log import log
def log_greetings(cat):
llm_response = cat.llm("Hi!")
log.debug(f"LLM response: {llm_response }")
@hook
def after_cat_bootstrap(cat):
cat.white_rabbit.schedule_date_task(log_greetings, seconds=10, cat=cat) I think that WhiteRabbit should be called via Stray as: cat.white_rabbit.schedule_job(your_function, seconds=10, kwargs_to_your_function) I think it is better to avoid wrapping WhiteRabbit function in Stray to keep the separation of concerns. Plus, if I want to be consistent to my thesis, in which the session is not always needed in scheduling, the cat instance should not be invisible to developer, but he/she should decide whether to include it or not. Regarding point 3): As I suggested in your first PR we should support all the 3 types of scheduling job that are available in APScheduling:
|
Thank you Luca, it's all clear. |
About the path to follow for the WhiteRabbit. During the dev meeting we discussed:
About the first two points I have the following idea:
schedule_chat_message
.schedule_cat_message
)By doing that the plugin developer can schedule a message just like that:
It's a little bit a continuous communication between the StrayCat and the WhiteRabbit but it should make very easy the integration inside the plugins. @pieroit @lucagobbi what do you think?
The text was updated successfully, but these errors were encountered: