Make intent lifespan configurable
Closed this issue · 0 comments
dariowho commented
AS A chatbot developer
I WANT Agents to remember context for longer than 5 turns or forget contexts arbitrarily
SO THAT I have more control on the information and followups that are available at a given point in conversation
Details
Currently each context has a default lifespan of 5 turns that is not configurable. Sometimes we want to make that lifespan longer, to retain context parameters and possible followups longer; sometimes we want to kill intents, to clean context and reduce ambiguity when interpreting new intents. This can be achieved with the following implementation
- A
Intent.lifespan
class variable can control the lifespan of a given intent - A
new_lifespan
parameter on thefollow()
relation can be used to extend the duration of a context, or removed altogether (follow(new_lifespan=0))
)