Skip to main content
Version: 25.3

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

NameTypeDefaultInfo
operator{"BEFORE", "AFTER", "BEFORE OR AFTER"}Indicates whether to search before or after the current utterance.
windowint1How 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.
valuestrThe value we should be searching for.
regexboolFalseIf this is True, value should be a RegEx Pattern.
case_sensitiveboolFalseCase sensitive or not.
tokenizeboolFalseOnly 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.