Filters are an efficient way to create base queries that can be passed to ChatterBot’s storage adapters. Filters will reduce the number of statements that a chat bot has to process when it is selecting a response.

Setting filters

chatbot = ChatBot(
    "My ChatterBot",

Filter classes

class chatterbot.filters.RepetitiveResponseFilter[source]

A filter that eliminates possibly repetitive responses to prevent a chat bot from repeating statements that it has recently said.

filter_selection(chatterbot, conversation_id)[source]

Because this is the base filter class, this method just returns the storage adapter’s base query. Other filters are expected to override this method.