templates.UtteranceContextTemplateSchema
- class templates.UtteranceContextTemplateSchema(*args, **kwargs)
Utterance Context template
LF Template specific to conversational use-case. Looks for keywords/regex pattern in specified number of previous or next utterances.
- Parameters:
operator ({"BEFORE", "AFTER", "BEFORE OR AFTER"}) – Indicates whether to search before or after the current utterance.
window (int, default 1) – How many utterances should we restrict the search window to.
speakers ({"any", "current", "other", or speakername}) – List of speakers whose utterances will be considered for matching
value (str) – The value we should be searching for.
regex (bool, default False) – If this is True, value should be a RegEx Pattern.
case_sensitive (bool, default False) – Case sensitive or not
tokenize (bool, default False) – Only can be True if regex is False, we will search for an exact word match between value and span context and not match on substrings.