-
Notifications
You must be signed in to change notification settings - Fork 578
Description
In PR#1374, we implemented the ability for conversation-managers to register hooks, so that they can apply conversation management in more places.
Long term this also unlocks the ability to be more losely coupled from the agent-loop - specifically, the base ConversationManager class could register callbacks so that apply_management and reduce_context are invoked via hooks instead of being hard-coded in the agent-loop.
Also, what is the story for transitioning from "manual" conversation management, meaning conversation_manager.apply_management, to using only hooks.
Originally posted by @dbschmigelski in #1374 (comment)
To do this, we'd need to do two things:
-
Allow hooks to intercept model (ContextOverflow) exceptions and retry model invocation
-
Update ConversationManager to subscribe to (2) and
apply_managementthat way
For backwards compatability, we would still need to expose apply_management and reduce_context as public methods, but we could still decouple it from the agent-loop.