More logic stuff

pull/18/head
bobloy 6 years ago
parent 00c20f5453
commit 9581374412

@ -9,6 +9,7 @@ from redbot.core.data_manager import cog_data_path
from chatter.chatterbot import ChatBot
from chatter.chatterbot.comparisons import levenshtein_distance
from chatter.chatterbot.response_selection import get_first_response
from chatter.chatterbot.trainers import ListTrainer
@ -32,7 +33,16 @@ class Chatter:
"ChatterBot",
storage_adapter='chatter.chatterbot.storage.SQLStorageAdapter',
database=str(data_path),
statement_comparison_function=levenshtein_distance
statement_comparison_function=levenshtein_distance,
response_selection_method=get_first_response,
logic_adapters=[
'chatter.chatterbot.logic.BestMatch',
{
'import_path': 'chatter.chatterbot.logic.LowConfidenceAdapter',
'threshold': 0.65,
'default_response': ':thinking:'
}
]
)
self.chatbot.set_trainer(ListTrainer)

Loading…
Cancel
Save