public interface NCConversationContext
Conversation management is based on idea of a short-term-memory (STM). STM can be viewed as a condensed
short-term history of the user input for a given user and data model - both acting as a compound key for the STM.
Every submitted user request that wasn't
rejected is added to the conversation STM as a list of
tokens. Existing STM tokens belonging to
group will be overridden by the more recent tokens from the same group.
Note also that tokens in STM automatically expire (i.e. context is "forgotten") after a certain period of time
or based on other internal logic. Note that you should not rely on a specific expiration behavior as its logic
is not deterministic and may be changed in the future.
|Modifier and Type||Method and Description|
Removes all tokens satisfying given predicate from the current conversation STM.
Gets an ordered list of tokens stored in the current conversation STM for current user (i.e.
Note that this list excludes free words and stopwords. Note also that specific rules by which STM operates are undefined for the purpose of this function (i.e. callers should not rely on any observed behavior of how STM stores and evicts its content).
For example, in some cases the intent logic can assume the user current location as an implicit geo
location and therefore all existing
nlpcraft:geo tokens should be removed from the conversation STM
to maintain correct context.
filter- Token remove filter.
Copyright © 2013-2019 NLPCraft Project. All rights reserved.